diff --git a/.env b/.env index af62eda2..2a010b79 100644 --- a/.env +++ b/.env @@ -2,4 +2,4 @@ DB_NAME=squid DB_PASS=squid DB_PORT=23798 PROCESSOR_PROMETHEUS_PORT=3000 -GQL_PORT=4350 +GQL_PORT=4350 \ No newline at end of file diff --git a/builds/moonriver-polkassembly-v1.tar.gz b/builds/moonriver-polkassembly-v1.tar.gz new file mode 100644 index 00000000..d7544448 Binary files /dev/null and b/builds/moonriver-polkassembly-v1.tar.gz differ diff --git a/squid.yaml b/squid.yaml index a00c457a..e4b437fd 100644 --- a/squid.yaml +++ b/squid.yaml @@ -1,8 +1,8 @@ manifestVersion: subsquid.io/v0.1 -name: moonbase-polkassembly -version: 2 +name: moonriver-polkassembly +version: 1 description: |- - Moonbase's governance proposals + Moonriver's governance proposals build: diff --git a/src/common/scheduledData.ts b/src/common/scheduledData.ts index bb37904c..9ac55998 100644 --- a/src/common/scheduledData.ts +++ b/src/common/scheduledData.ts @@ -34,8 +34,8 @@ interface ScheduledData { export function getDispatchedEventData(ctx: BatchContext, itemEvent: Event): ScheduledData | undefined { const event = new SchedulerDispatchedEvent(ctx, itemEvent) - if (event.isV40) { - const [[block, number], hash, result] = event.asV40 + if (event.isV49) { + const [[block, number], hash, result] = event.asV49 if(result.__kind == 'Ok'){ return { blockNumber: block @@ -60,16 +60,16 @@ export function getDispatchedEventData(ctx: BatchContext, itemEv } } return undefined - } else if (event.isV1400) { - const { task, id, result } = event.asV1400 + } else if (event.isV1401) { + const { task, id, result } = event.asV1401 if(result.__kind == 'Ok'){ return { blockNumber: task[0] } } return undefined - } else if (event.isV1603) { - const { task, id, result } = event.asV1603 + } else if (event.isV1605) { + const { task, id, result } = event.asV1605 if(result.__kind == 'Ok'){ return { blockNumber: task[0] diff --git a/src/mappings/democracy/events/getters.ts b/src/mappings/democracy/events/getters.ts index d134e0db..10cc9663 100644 --- a/src/mappings/democracy/events/getters.ts +++ b/src/mappings/democracy/events/getters.ts @@ -17,10 +17,10 @@ import { Store } from '@subsquid/typeorm-store' export function getCancelledData(ctx: BatchContext, itemEvent: Event): number { const event = new DemocracyCancelledEvent(ctx, itemEvent) - if (event.isV40) { - return event.asV40 - } else if (event.isV1200) { - return event.asV1200.refIndex + if (event.isV49) { + return event.asV49 + } else if (event.isV1201) { + return event.asV1201.refIndex } else { throw new UnknownVersionError(event.constructor.name) } @@ -28,20 +28,20 @@ export function getCancelledData(ctx: BatchContext, itemEvent: E export function getExecutedData(ctx: BatchContext, itemEvent: Event): number { const event = new DemocracyExecutedEvent(ctx, itemEvent) - if (event.isV40) { - return event.asV40[0] + if (event.isV49) { + return event.asV49[0] } else if (event.isV701) { return event.asV701[0] } else if (event.isV900) { return event.asV900[0] - } else if (event.isV1200) { - return event.asV1200.refIndex + } else if (event.isV1201) { + return event.asV1201.refIndex } else if (event.isV1300) { return event.asV1300.refIndex - } else if (event.isV1400) { - return event.asV1400.refIndex - } else if (event.isV1603) { - return event.asV1603.refIndex + } else if (event.isV1401) { + return event.asV1401.refIndex + } else if (event.isV1605) { + return event.asV1605.refIndex } else { const data = ctx._chain.decodeEvent(itemEvent) return data.refIndex @@ -50,10 +50,10 @@ export function getExecutedData(ctx: BatchContext, itemEvent: Ev export function getNotPassedData(ctx: BatchContext, itemEvent: Event): number { const event = new DemocracyNotPassedEvent(ctx, itemEvent) - if (event.isV40) { - return event.asV40 - } else if (event.isV1200) { - return event.asV1200.refIndex + if (event.isV49) { + return event.asV49 + } else if (event.isV1201) { + return event.asV1201.refIndex } else { throw new UnknownVersionError(event.constructor.name) } @@ -61,10 +61,10 @@ export function getNotPassedData(ctx: BatchContext, itemEvent: E export function getPassedData(ctx: BatchContext, itemEvent: Event): number { const event = new DemocracyPassedEvent(ctx, itemEvent) - if (event.isV40) { - return event.asV40 - } else if (event.isV1200) { - return event.asV1200.refIndex + if (event.isV49) { + return event.asV49 + } else if (event.isV1201) { + return event.asV1201.refIndex } else { throw new UnknownVersionError(event.constructor.name) } @@ -77,14 +77,14 @@ export interface PreimageInvalidData { export function getPreimageInvalidData(ctx: BatchContext, itemEvent: Event): PreimageInvalidData { const event = new DemocracyPreimageInvalidEvent(ctx, itemEvent) - if (event.isV40) { - const [hash, index] = event.asV40 + if (event.isV49) { + const [hash, index] = event.asV49 return { hash, index, } - } else if (event.isV1200) { - const { proposalHash: hash, refIndex: index } = event.asV1200 + } else if (event.isV1201) { + const { proposalHash: hash, refIndex: index } = event.asV1201 return { hash, index, @@ -101,14 +101,14 @@ export interface PreimageMissingData { export function getPreimageMissingData(ctx: BatchContext, itemEvent: Event): PreimageMissingData { const event = new DemocracyPreimageMissingEvent(ctx, itemEvent) - if (event.isV40) { - const [hash, index] = event.asV40 + if (event.isV49) { + const [hash, index] = event.asV49 return { hash, index, } - } else if (event.isV1200) { - const { proposalHash: hash, refIndex: index } = event.asV1200 + } else if (event.isV1201) { + const { proposalHash: hash, refIndex: index } = event.asV1201 return { hash, index, @@ -126,15 +126,15 @@ interface PreimageNotedData { export function getPreimageNotedData(ctx: BatchContext, itemEvent: Event): PreimageNotedData { const event = new DemocracyPreimageNotedEvent(ctx, itemEvent) - if (event.isV40) { - const [hash, provider, deposit] = event.asV40 + if (event.isV49) { + const [hash, provider, deposit] = event.asV49 return { hash, provider, deposit, } - } else if (event.isV1200) { - const { proposalHash: hash, who: provider, deposit } = event.asV1200 + } else if (event.isV1201) { + const { proposalHash: hash, who: provider, deposit } = event.asV1201 return { hash, provider, @@ -153,15 +153,15 @@ export interface PreimageReapedData { export function getPreimageReapedData(ctx: BatchContext, itemEvent: Event): PreimageReapedData { const event = new DemocracyPreimageReapedEvent(ctx, itemEvent) - if (event.isV40) { - const [hash, provider, deposit] = event.asV40 + if (event.isV49) { + const [hash, provider, deposit] = event.asV49 return { hash, provider, deposit, } - } else if (event.isV1200) { - const { proposalHash: hash, provider, deposit } = event.asV1200 + } else if (event.isV1201) { + const { proposalHash: hash, provider, deposit } = event.asV1201 return { hash, provider, @@ -180,15 +180,15 @@ export interface PreimageUsedData { export function getPreimageUsedData(ctx: BatchContext, itemEvent: Event): PreimageUsedData { const event = new DemocracyPreimageUsedEvent(ctx, itemEvent) - if (event.isV40) { - const [hash, provider, deposit] = event.asV40 + if (event.isV49) { + const [hash, provider, deposit] = event.asV49 return { hash, provider, deposit, } - } else if (event.isV1200) { - const { proposalHash: hash, provider, deposit } = event.asV1200 + } else if (event.isV1201) { + const { proposalHash: hash, provider, deposit } = event.asV1201 return { hash, provider, @@ -212,8 +212,8 @@ export function getDemocracySecondedData(ctx: BatchContext, item accountId: seconder, refIndex: propIndex } - } else if (event.isV1200) { - const { who: seconder, proposalIndex: propIndex } = event.asV1200 + } else if (event.isV1201) { + const { who: seconder, proposalIndex: propIndex } = event.asV1201 return { accountId: seconder, refIndex: propIndex diff --git a/src/mappings/democracy/events/preimageNoted.ts b/src/mappings/democracy/events/preimageNoted.ts index c07a064f..362bcbbe 100644 --- a/src/mappings/democracy/events/preimageNoted.ts +++ b/src/mappings/democracy/events/preimageNoted.ts @@ -43,8 +43,8 @@ async function getStorageData(ctx: BatchContext, hash: Uint8Arra deposit, block: since, } - } else if (storage.isV40) { - const storageData = await storage.asV40.get(hash) + } else if (storage.isV49) { + const storageData = await storage.asV49.get(hash) if (!storageData || storageData.__kind === 'Missing') return undefined const { provider, deposit, since, data } = storageData.value diff --git a/src/mappings/democracy/events/proposed.ts b/src/mappings/democracy/events/proposed.ts index 1f0ab52a..52ee8239 100644 --- a/src/mappings/democracy/events/proposed.ts +++ b/src/mappings/democracy/events/proposed.ts @@ -18,14 +18,14 @@ interface DemocracyProposalEventData { function getEventData(ctx: BatchContext, itemEvent: Event): DemocracyProposalEventData { const event = new DemocracyProposedEvent(ctx, itemEvent) - if (event.isV40) { - const [index, deposit] = event.asV40 + if (event.isV49) { + const [index, deposit] = event.asV49 return { index, deposit, } - } else if (event.isV1200) { - const { proposalIndex: index, deposit } = event.asV1200 + } else if (event.isV1201) { + const { proposalIndex: index, deposit } = event.asV1201 return { index, deposit, diff --git a/src/mappings/democracy/events/started.ts b/src/mappings/democracy/events/started.ts index 90596c73..caeceaa6 100644 --- a/src/mappings/democracy/events/started.ts +++ b/src/mappings/democracy/events/started.ts @@ -18,14 +18,14 @@ interface ReferendumEventData { function getEventData(ctx: BatchContext, itemEvent: Event): ReferendumEventData { const event = new DemocracyStartedEvent(ctx, itemEvent) - if (event.isV40) { - const [index, threshold] = event.asV40 + if (event.isV49) { + const [index, threshold] = event.asV49 return { index, threshold: threshold.__kind, } - } else if (event.isV1200) { - const { refIndex: index, threshold } = event.asV1200 + } else if (event.isV1201) { + const { refIndex: index, threshold } = event.asV1201 return { index, threshold: threshold.__kind, diff --git a/src/mappings/democracy/events/tabled.ts b/src/mappings/democracy/events/tabled.ts index f1ab22c1..740ddd2e 100644 --- a/src/mappings/democracy/events/tabled.ts +++ b/src/mappings/democracy/events/tabled.ts @@ -16,15 +16,15 @@ interface TabledEventData { function getEventData(ctx: BatchContext, itemEvent: Event): TabledEventData { const event = new DemocracyTabledEvent(ctx, itemEvent) - if (event.isV40) { - const [index, deposit, depositors] = event.asV40 + if (event.isV49) { + const [index, deposit, depositors] = event.asV49 return { index, deposit, depositors, } - } else if (event.isV1200) { - const { proposalIndex: index, deposit, depositors } = event.asV1200 + } else if (event.isV1201) { + const { proposalIndex: index, deposit, depositors } = event.asV1201 return { index, deposit, diff --git a/src/mappings/democracy/extrinsics/getters.ts b/src/mappings/democracy/extrinsics/getters.ts index 0025726b..d7242f65 100644 --- a/src/mappings/democracy/extrinsics/getters.ts +++ b/src/mappings/democracy/extrinsics/getters.ts @@ -23,8 +23,8 @@ interface DemocracyVoteCallData { export function getVoteData(ctx: BatchContext, itemCall: any): DemocracyVoteCallData { const event = new DemocracyVoteCall(ctx, itemCall) - if (event.isV40) { - const { refIndex, vote } = event.asV40 + if (event.isV49) { + const { refIndex, vote } = event.asV49 if (vote.__kind === 'Standard') { return { index: refIndex, diff --git a/src/mappings/ethereum/events/getters.ts b/src/mappings/ethereum/events/getters.ts index 4dcabff3..ab419f26 100644 --- a/src/mappings/ethereum/events/getters.ts +++ b/src/mappings/ethereum/events/getters.ts @@ -13,8 +13,8 @@ interface EthExecuted { export function getExecutedData(ctx: BatchContext, itemEvent: Event): EthExecuted { const event = new EthereumExecutedEvent(ctx, itemEvent) - if (event.isV40) { - const [from, to, transactionHash, exitReason] = event.asV40 + if (event.isV49) { + const [from, to, transactionHash, exitReason] = event.asV49 if (exitReason.__kind == 'Succeed') { return { success: true, @@ -27,8 +27,8 @@ export function getExecutedData(ctx: BatchContext, itemEvent: Ev txnHash: transactionHash } } - } else if (event.isV1200) { - const [from, to, transactionHash, exitReason] = event.asV1200 + } else if (event.isV1201) { + const [from, to, transactionHash, exitReason] = event.asV1201 if (exitReason.__kind == 'Succeed') { return { success: true, @@ -41,8 +41,8 @@ export function getExecutedData(ctx: BatchContext, itemEvent: Ev txnHash: transactionHash } } - } else if (event.isV1400) { - const [from, to, transactionHash, exitReason] = event.asV1400 + } else if (event.isV1401) { + const [from, to, transactionHash, exitReason] = event.asV1401 if (exitReason.__kind == 'Succeed') { return { success: true, @@ -55,8 +55,8 @@ export function getExecutedData(ctx: BatchContext, itemEvent: Ev txnHash: transactionHash } } - } else if (event.isV1700) { - const [from, to, transactionHash, exitReason] = event.asV1700 + } else if (event.isV1701) { + const [from, to, transactionHash, exitReason] = event.asV1701 if (exitReason.__kind == 'Succeed') { return { success: true, @@ -69,8 +69,8 @@ export function getExecutedData(ctx: BatchContext, itemEvent: Ev txnHash: transactionHash } } - } else if (event.isV1800) { - const { from, to, transactionHash, exitReason } = event.asV1800 + } else if (event.isV1801) { + const { from, to, transactionHash, exitReason } = event.asV1801 if (exitReason.__kind == 'Succeed') { return { success: true, diff --git a/src/mappings/preimageV2/events/getters.ts b/src/mappings/preimageV2/events/getters.ts index 6b6ac568..5629b724 100644 --- a/src/mappings/preimageV2/events/getters.ts +++ b/src/mappings/preimageV2/events/getters.ts @@ -16,8 +16,8 @@ interface PreimageNotedData { export function getPreimageNotedData(ctx: BatchContext, itemEvent: Event): PreimageNotedData { const event = new PreimageNotedEvent(ctx, itemEvent) - if (event.isV1900) { - const { hash } = event.asV1900 + if (event.isV2000) { + const { hash } = event.asV2000 return { hash } @@ -32,8 +32,8 @@ export interface PreimageRequestedData { export function getPreimageRequestedData(ctx: BatchContext, itemEvent: Event): PreimageRequestedData { const event = new PreimageRequestedEvent(ctx, itemEvent) - if (event.isV1900) { - const {hash} = event.asV1900 + if (event.isV2000) { + const {hash} = event.asV2000 return { hash } @@ -48,8 +48,8 @@ export interface PreimageClearedData { export function getPreimageClearedData(ctx: BatchContext, itemEvent: Event): PreimageClearedData { const event = new PreimageClearedEvent(ctx, itemEvent) - if (event.isV1900) { - const {hash} = event.asV1900 + if (event.isV2000) { + const {hash} = event.asV2000 return { hash } diff --git a/src/mappings/preimageV2/events/preimageNoted.ts b/src/mappings/preimageV2/events/preimageNoted.ts index 1e0c5d52..70aedc78 100644 --- a/src/mappings/preimageV2/events/preimageNoted.ts +++ b/src/mappings/preimageV2/events/preimageNoted.ts @@ -30,16 +30,7 @@ async function getStorageData(ctx: BatchContext, hash: Uint8Arra const storage = new PreimagePreimageForStorage(ctx, block) const preimageStatus: PreimageStatusStorageData | undefined = await getPreimageStatusData(ctx, hash, block) - if (storage.isV1900) { - const storageData = await storage.asV1900.get(hash) - if (!storageData) return undefined - - return { - data: storageData, - ...preimageStatus - } - } - else if(storage.isV2000) { + if(storage.isV2000) { if(preimageStatus && preimageStatus.len){ const storageData = await storage.asV2000.get([hash, preimageStatus.len]) if (!storageData) return undefined @@ -65,16 +56,7 @@ interface PreimageStatusStorageData{ export async function getPreimageStatusData(ctx: BatchContext, hash: Uint8Array, block: SubstrateBlock): Promise { const preimageStorage = new PreimageStatusForStorage(ctx, block) - if (preimageStorage.isV1900) { - const storageData = await preimageStorage.asV1900.get(hash) - if (!storageData) return undefined - return { - status: storageData.__kind, - value: storageData.value, - len: undefined - } - } - else if(preimageStorage.isV2000) { + if(preimageStorage.isV2000) { const storageData = await preimageStorage.asV2000.get(hash) if (!storageData) return undefined return { diff --git a/src/mappings/referendumV2/events/getters.ts b/src/mappings/referendumV2/events/getters.ts index e423751c..805b85a2 100644 --- a/src/mappings/referendumV2/events/getters.ts +++ b/src/mappings/referendumV2/events/getters.ts @@ -24,15 +24,8 @@ interface ReferendumEventData { export function getEventData(ctx: BatchContext, itemEvent: Event): ReferendumEventData { const event = new ReferendaSubmittedEvent(ctx, itemEvent) - if (event.isV1900) { - const {index, track, proposalHash } = event.asV1900 - return { - index, - track, - hash: proposalHash - } - } else if (event.isV2000) { - const {index, track, proposal } = event.asV2000 + if (event.isV2100) { + const {index, track, proposal } = event.asV2100 let hash = null; if(proposal.__kind == "Inline") { hash = proposal.value @@ -57,8 +50,8 @@ export interface ReferendaData { export function getCancelledData(ctx: BatchContext, itemEvent: Event): ReferendaData { const event = new ReferendaCancelledEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, tally } = event.asV1900 + if (event.isV2100) { + const { index, tally } = event.asV2100 return { index, tally @@ -74,8 +67,8 @@ export interface ReferendaIndexData { export function getApprovedData(ctx: BatchContext, itemEvent: Event): ReferendaIndexData { const event = new ReferendaApprovedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index } = event.asV1900 + if (event.isV2100) { + const { index } = event.asV2100 return { index } @@ -86,8 +79,8 @@ export function getApprovedData(ctx: BatchContext, itemEvent: Ev export function getKilledData(ctx: BatchContext, itemEvent: Event): ReferendaData { const event = new ReferendaKilledEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, tally } = event.asV1900 + if (event.isV2100) { + const { index, tally } = event.asV2100 return { index, tally @@ -99,8 +92,8 @@ export function getKilledData(ctx: BatchContext, itemEvent: Even export function getTimedOutData(ctx: BatchContext, itemEvent: Event): ReferendaData { const event = new ReferendaTimedOutEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, tally } = event.asV1900 + if (event.isV2100) { + const { index, tally } = event.asV2100 return { index, tally @@ -112,8 +105,8 @@ export function getTimedOutData(ctx: BatchContext, itemEvent: Ev export function getRejectedData(ctx: BatchContext, itemEvent: Event): ReferendaData { const event = new ReferendaRejectedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, tally } = event.asV1900 + if (event.isV2100) { + const { index, tally } = event.asV2100 return { index, tally @@ -125,8 +118,8 @@ export function getRejectedData(ctx: BatchContext, itemEvent: Ev export function getConfirmAbortedData(ctx: BatchContext, itemEvent: Event): ReferendaIndexData { const event = new ReferendaConfirmAbortedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index } = event.asV1900 + if (event.isV2100) { + const { index } = event.asV2100 return { index } @@ -137,8 +130,8 @@ export function getConfirmAbortedData(ctx: BatchContext, itemEve export function getConfirmedData(ctx: BatchContext, itemEvent: Event): ReferendaData { const event = new ReferendaConfirmedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, tally } = event.asV1900 + if (event.isV2100) { + const { index, tally } = event.asV2100 return { index, tally @@ -150,8 +143,8 @@ export function getConfirmedData(ctx: BatchContext, itemEvent: E export function getConfirmStartedData(ctx: BatchContext, itemEvent: Event): ReferendaIndexData { const event = new ReferendaConfirmStartedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index } = event.asV1900 + if (event.isV2100) { + const { index } = event.asV2100 return { index, } @@ -168,8 +161,8 @@ export interface ReferendaDepositData { export function getDecisionDepositPlacedData(ctx: BatchContext, itemEvent: Event): ReferendaDepositData { const event = new ReferendaDecisionDepositPlacedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, who, amount } = event.asV1900 + if (event.isV2100) { + const { index, who, amount } = event.asV2100 return { index, who, @@ -189,16 +182,8 @@ export interface ReferendaDecisionStartedData { export function getDecisionStartedData(ctx: BatchContext, itemEvent: Event): ReferendaDecisionStartedData { const event = new ReferendaDecisionStartedEvent(ctx, itemEvent) - if (event.isV1900) { - const { index, track, proposalHash, tally} = event.asV1900 - return { - index, - track, - tally, - hash: proposalHash - } - } else if (event.isV2000) { - const { index, track, proposal, tally} = event.asV2000 + if (event.isV2100) { + const { index, track, proposal, tally} = event.asV2100 let hash = null; if(proposal.__kind == "Inline") { hash = proposal.value diff --git a/src/mappings/referendumV2/events/referendaSubmitted.ts b/src/mappings/referendumV2/events/referendaSubmitted.ts index d8e82f10..4ed0c740 100644 --- a/src/mappings/referendumV2/events/referendaSubmitted.ts +++ b/src/mappings/referendumV2/events/referendaSubmitted.ts @@ -28,58 +28,7 @@ interface ReferendumInfo { export async function getStorageData(ctx: BatchContext, index: number, block: SubstrateBlock): Promise { const storage = new ReferendaReferendumInfoForStorage(ctx, block) - if (storage.isV1900) { - const storageData = await storage.asV1900.get(index) - if (!storageData) return undefined - if(storageData.__kind === 'Ongoing') { - let enactmentAt = undefined - let enactmentAfter = undefined; - if(storageData.value.enactment.__kind === 'At') { - enactmentAt = storageData.value.enactment.value - } - else if(storageData.value.enactment.__kind === 'After') { - enactmentAfter = storageData.value.enactment.value - } - return { - index, - trackNumber: storageData.value.track, - origin: storageData.value.origin.value.__kind, - enactmentAt: enactmentAt, - enactmentAfter: enactmentAfter, - submittedAt: storageData.value.submitted, - submissionDeposit: storageData.value.submissionDeposit, - decisionDeposit: storageData.value.decisionDeposit, - deciding: storageData.value.deciding, - tally: storageData.value.tally - } - } - }else if(storage.isV2000){ - const storageData = await storage.asV2000.get(index) - if (!storageData) return undefined - if(storageData.__kind === 'Ongoing') { - let enactmentAt = undefined - let enactmentAfter = undefined; - if(storageData.value.enactment.__kind === 'At') { - enactmentAt = storageData.value.enactment.value - } - else if(storageData.value.enactment.__kind === 'After') { - enactmentAfter = storageData.value.enactment.value - } - return { - index, - trackNumber: storageData.value.track, - origin: storageData.value.origin.value.__kind, - enactmentAt: enactmentAt, - enactmentAfter: enactmentAfter, - submittedAt: storageData.value.submitted, - submissionDeposit: storageData.value.submissionDeposit, - decisionDeposit: storageData.value.decisionDeposit, - deciding: storageData.value.deciding, - tally: storageData.value.tally - } - } - - }else if(storage.isV2100){ + if(storage.isV2100){ const storageData = await storage.asV2100.get(index) if (!storageData) return undefined if(storageData.__kind === 'Ongoing') { diff --git a/src/mappings/referendumV2/extrinsics/getters.ts b/src/mappings/referendumV2/extrinsics/getters.ts index 480cf013..ad4c112e 100644 --- a/src/mappings/referendumV2/extrinsics/getters.ts +++ b/src/mappings/referendumV2/extrinsics/getters.ts @@ -33,8 +33,8 @@ interface DemocracyVoteCallData { export function getVoteData(ctx: BatchContext, itemCall: any): DemocracyVoteCallData { const event = new ConvictionVotingVoteCall(ctx, itemCall) - if (event.isV1900) { - const { pollIndex, vote } = event.asV1900 + if (event.isV2100) { + const { pollIndex, vote } = event.asV2100 if(vote.__kind === 'Standard') { return { index: pollIndex, @@ -71,9 +71,9 @@ export interface ConvictionVoteDelegateCallData { export function getDelegateData(ctx: BatchContext, itemCall: any): ConvictionVoteDelegateCallData { const event = new ConvictionVotingDelegateCall(ctx, itemCall) - if (event.isV1900) { + if (event.isV2100) { //{ class, to, conviction, balance} - const eventData = event.asV1900 + const eventData = event.asV2100 return { track: eventData.class, to: eventData.to, @@ -91,8 +91,8 @@ export interface ConvictionVoteUndelegateCallData { export function getUndelegateData(ctx: BatchContext, itemCall: any): ConvictionVoteUndelegateCallData { const event = new ConvictionVotingUndelegateCall(ctx, itemCall) - if (event.isV1900) { - const eventData = event.asV1900 + if (event.isV2100) { + const eventData = event.asV2100 return { track: eventData.class } @@ -108,8 +108,8 @@ export interface ConvictionVotingRemoveVoteCallData { export function getRemoveVoteData(ctx: BatchContext, itemCall: any): ConvictionVotingRemoveVoteCallData { const event = new ConvictionVotingRemoveVoteCall(ctx, itemCall) - if (event.isV1900) { - const eventData = event.asV1900 + if (event.isV2100) { + const eventData = event.asV2100 return { index: eventData.index, track: eventData.class @@ -127,8 +127,8 @@ export interface ConvictionVotingRemoveOtherVoteCallData { export function getRemoveOtherVoteData(ctx: BatchContext, itemCall: any): ConvictionVotingRemoveOtherVoteCallData { const event = new ConvictionVotingRemoveOtherVoteCall(ctx, itemCall) - if (event.isV1900) { - const eventData = event.asV1900 + if (event.isV2100) { + const eventData = event.asV2100 return { index: eventData.index, track: eventData.class, diff --git a/src/mappings/treasury/events/getters.ts b/src/mappings/treasury/events/getters.ts index 2157720e..cd720d3e 100644 --- a/src/mappings/treasury/events/getters.ts +++ b/src/mappings/treasury/events/getters.ts @@ -10,8 +10,8 @@ interface ProposedData { export function getProposedData(ctx: BatchContext, itemEvent: Event): ProposedData { const event = new TreasuryProposedEvent(ctx, itemEvent) - if (event.isV47) { - const index = event.asV47 + if (event.isV49) { + const index = event.asV49 return { index, } @@ -31,8 +31,8 @@ interface RejectedData { export function getRejectedData(ctx: BatchContext, itemEvent: Event): RejectedData { const event = new TreasuryRejectedEvent(ctx, itemEvent) - if (event.isV47) { - const [index] = event.asV47 + if (event.isV49) { + const [index] = event.asV49 return { index, } @@ -52,8 +52,8 @@ interface AwarderData { export function getAwarderData(ctx: BatchContext, itemEvent: Event): AwarderData { const event = new TreasuryAwardedEvent(ctx, itemEvent) - if (event.isV47) { - const [index] = event.asV47 + if (event.isV49) { + const [index] = event.asV49 return { index, } @@ -76,8 +76,8 @@ interface SpendApprovedData { export function getSpendApprovedData(ctx: BatchContext, itemEvent: Event): SpendApprovedData { const event = new TreasurySpendApprovedEvent(ctx, itemEvent) - if (event.isV1800) { - const { proposalIndex, amount, beneficiary}= event.asV1800 + if (event.isV1801) { + const { proposalIndex, amount, beneficiary}= event.asV1801 return { proposalIndex, amount, diff --git a/src/processor.ts b/src/processor.ts index ff50ee6e..53a895aa 100644 --- a/src/processor.ts +++ b/src/processor.ts @@ -8,8 +8,8 @@ import { getTransaction } from '@subsquid/frontier' //@ts-ignore ts(2589) const processor = new SubstrateBatchProcessor() .setDataSource({ - chain: 'wss://wss.api.moonbase.moonbeam.network', - archive: lookupArchive('moonbase', { release: 'FireSquid' }), + chain: 'wss://wss.moonriver.moonbeam.network', + archive: lookupArchive('moonriver', { release: 'FireSquid' }), }) .setBlockRange({from: 0}) .addEvent('Democracy.Proposed', { data: { event: { args: true, extrinsic: { hash: true, } }, } } as const) diff --git a/src/storage/democracy/proposals.ts b/src/storage/democracy/proposals.ts index 0cb3aee4..b04c590e 100644 --- a/src/storage/democracy/proposals.ts +++ b/src/storage/democracy/proposals.ts @@ -12,8 +12,8 @@ interface DemocracyProposalStorageData { async function getStorageData(ctx: BatchContext, block: SubstrateBlock): Promise { const storage = new DemocracyPublicPropsStorage(ctx, block) - if (storage.isV40) { - const storageData = await storage.asV40.get() + if (storage.isV49) { + const storageData = await storage.asV49.get() if (!storageData) return undefined return storageData.map((proposal: any): DemocracyProposalStorageData => { diff --git a/src/storage/democracy/referendumInfoOf.ts b/src/storage/democracy/referendumInfoOf.ts index a46afcd1..8f68b1d9 100644 --- a/src/storage/democracy/referendumInfoOf.ts +++ b/src/storage/democracy/referendumInfoOf.ts @@ -1,7 +1,7 @@ import { UnknownVersionError } from '../../common/errors' import { BlockContext } from '../../types/support' import { DemocracyReferendumInfoOfStorage } from '../../types/storage' -import * as v40 from '../../types/v40' +import * as v49 from '../../types/v49' import * as v900 from '../../types/v900' import * as v2000 from '../../types/v2000' import { BatchContext, SubstrateBlock } from '@subsquid/substrate-processor' @@ -28,13 +28,13 @@ type ReferendumStorageData = FinishedReferendumData | OngoingReferendumData // eslint-disable-next-line sonarjs/cognitive-complexity async function getStorageData(ctx: BatchContext, index: number, block: SubstrateBlock): Promise { const storage = new DemocracyReferendumInfoOfStorage(ctx, block) - if (storage.isV40) { - const storageData = await storage.asV40.get(index) + if (storage.isV49) { + const storageData = await storage.asV49.get(index) if (!storageData) return undefined const { __kind: status } = storageData if (status === 'Ongoing') { - const { proposalHash: hash, end, delay, threshold } = (storageData as v40.ReferendumInfo_Ongoing).value + const { proposalHash: hash, end, delay, threshold } = (storageData as v49.ReferendumInfo_Ongoing).value return { status, hash, @@ -43,7 +43,7 @@ async function getStorageData(ctx: BatchContext, index: number, threshold: threshold.__kind, } } else { - const { end, approved } = (storageData as v40.ReferendumInfo_Finished).value + const { end, approved } = (storageData as v49.ReferendumInfo_Finished).value return { status, end, diff --git a/src/storage/treasury/proposals.ts b/src/storage/treasury/proposals.ts index 1ac81827..0ea02ed3 100644 --- a/src/storage/treasury/proposals.ts +++ b/src/storage/treasury/proposals.ts @@ -15,8 +15,8 @@ async function getStorageData(ctx: BatchContext, index: number, const storage = new TreasuryProposalsStorage(ctx, block) if (!storage.isExists) return undefined - if (storage.isV47) { - return await storage.asV47.get(index) + if (storage.isV49) { + return await storage.asV49.get(index) } else { throw new UnknownVersionError(storage.constructor.name) } diff --git a/src/types/calls.ts b/src/types/calls.ts index baee14c1..9cb57610 100644 --- a/src/types/calls.ts +++ b/src/types/calls.ts @@ -1,9 +1,9 @@ import assert from 'assert' import {Chain, ChainContext, CallContext, Call, Result, Option} from './support' -import * as v40 from './v40' +import * as v49 from './v49' import * as v900 from './v900' -import * as v1200 from './v1200' -import * as v1900 from './v1900' +import * as v1201 from './v1201' +import * as v2100 from './v2100' export class ConvictionVotingDelegateCall { private readonly _chain: Chain @@ -43,7 +43,7 @@ export class ConvictionVotingDelegateCall { * 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. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getCallHash('ConvictionVoting.delegate') === '0047ced5ecf678f44965588bb856e701eebb4511cf82448739f03ecaeb15c145' } @@ -72,8 +72,8 @@ export class ConvictionVotingDelegateCall { * 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. */ - get asV1900(): {class: number, to: Uint8Array, conviction: v1900.Conviction, balance: bigint} { - assert(this.isV1900) + get asV2100(): {class: number, to: Uint8Array, conviction: v2100.Conviction, balance: bigint} { + assert(this.isV2100) return this._chain.decodeCall(this.call) } } @@ -109,7 +109,7 @@ export class ConvictionVotingRemoveOtherVoteCall { * 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. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getCallHash('ConvictionVoting.remove_other_vote') === 'c547dd3078ad7242b020eb9970d13cda8f45abe0c6950209c239ca95a62b6ee7' } @@ -131,8 +131,8 @@ export class ConvictionVotingRemoveOtherVoteCall { * 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. */ - get asV1900(): {target: Uint8Array, class: number, index: number} { - assert(this.isV1900) + get asV2100(): {target: Uint8Array, class: number, index: number} { + assert(this.isV2100) return this._chain.decodeCall(this.call) } } @@ -181,7 +181,7 @@ export class ConvictionVotingRemoveVoteCall { * 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. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getCallHash('ConvictionVoting.remove_vote') === 'be8a5ba82f77b6bda5e0784b678fdfe0fe9d28837d87406cb5d907269bb45b25' } @@ -216,8 +216,8 @@ export class ConvictionVotingRemoveVoteCall { * 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. */ - get asV1900(): {class: (number | undefined), index: number} { - assert(this.isV1900) + get asV2100(): {class: (number | undefined), index: number} { + assert(this.isV2100) return this._chain.decodeCall(this.call) } } @@ -251,7 +251,7 @@ export class ConvictionVotingUndelegateCall { * 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. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getCallHash('ConvictionVoting.undelegate') === '55363f75c61dc45265060eec3a1e578e86c93c9059f3f1b3d63fc1f2da6e7ea5' } @@ -271,8 +271,8 @@ export class ConvictionVotingUndelegateCall { * 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. */ - get asV1900(): {class: number} { - assert(this.isV1900) + get asV2100(): {class: number} { + assert(this.isV2100) return this._chain.decodeCall(this.call) } } @@ -301,7 +301,7 @@ export class ConvictionVotingVoteCall { * * Weight: `O(R)` where R is the number of polls the voter has voted on. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getCallHash('ConvictionVoting.vote') === 'd10ef1b298a681ecd2445c4d8c083dbabfcf6f60a2f8103238e6ab7895b95b86' } @@ -316,8 +316,8 @@ export class ConvictionVotingVoteCall { * * Weight: `O(R)` where R is the number of polls the voter has voted on. */ - get asV1900(): {pollIndex: number, vote: v1900.AccountVote} { - assert(this.isV1900) + get asV2100(): {pollIndex: number, vote: v2100.AccountVote} { + assert(this.isV2100) return this._chain.decodeCall(this.call) } } @@ -357,7 +357,7 @@ export class DemocracyDelegateCall { * Weight: `O(R)` where R is the number of referendums the voter delegating to has * voted on. Weight is charged as if maximum votes. */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getCallHash('Democracy.delegate') === 'ea6d9056c97bede42218d3ea9d4c8633f234aca966d9502b1e8fcd6de60ba33e' } @@ -383,8 +383,8 @@ export class DemocracyDelegateCall { * Weight: `O(R)` where R is the number of referendums the voter delegating to has * voted on. Weight is charged as if maximum votes. */ - get asV40(): {to: Uint8Array, conviction: v40.Conviction, balance: bigint} { - assert(this.isV40) + get asV49(): {to: Uint8Array, conviction: v49.Conviction, balance: bigint} { + assert(this.isV49) return this._chain.decodeCall(this.call) } } @@ -419,7 +419,7 @@ export class DemocracyRemoveOtherVoteCall { * 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. */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getCallHash('Democracy.remove_other_vote') === '99f879d671c8ba0ed32f19cf13acb14ab923d50415a4267048e1e58754bc46c9' } @@ -440,8 +440,8 @@ export class DemocracyRemoveOtherVoteCall { * 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. */ - get asV40(): {target: Uint8Array, index: number} { - assert(this.isV40) + get asV49(): {target: Uint8Array, index: number} { + assert(this.isV49) return this._chain.decodeCall(this.call) } } @@ -488,7 +488,7 @@ export class DemocracyRemoveVoteCall { * 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. */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getCallHash('Democracy.remove_vote') === '25a99cc820e15400356f62165725d9d84847d859e62ca1e5fd6eb340dc5c217e' } @@ -521,8 +521,8 @@ export class DemocracyRemoveVoteCall { * 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. */ - get asV40(): {index: number} { - assert(this.isV40) + get asV49(): {index: number} { + assert(this.isV49) return this._chain.decodeCall(this.call) } } @@ -554,7 +554,7 @@ export class DemocracyUndelegateCall { * Weight: `O(R)` where R is the number of referendums the voter delegating to has * voted on. Weight is charged as if maximum votes. */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getCallHash('Democracy.undelegate') === '01f2f9c28aa1d4d36a81ff042620b6677d25bf07c2bf4acc37b58658778a4fca' } @@ -572,8 +572,8 @@ export class DemocracyUndelegateCall { * Weight: `O(R)` where R is the number of referendums the voter delegating to has * voted on. Weight is charged as if maximum votes. */ - get asV40(): null { - assert(this.isV40) + get asV49(): null { + assert(this.isV49) return this._chain.decodeCall(this.call) } } @@ -602,7 +602,7 @@ export class DemocracyVoteCall { * * Weight: `O(R)` where R is the number of referendums the voter has voted on. */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getCallHash('Democracy.vote') === '6cdb35b5ffcb74405cdf222b0cc0bf7ad7025d59f676bea6712d77bcc9aff1db' } @@ -617,8 +617,8 @@ export class DemocracyVoteCall { * * Weight: `O(R)` where R is the number of referendums the voter has voted on. */ - get asV40(): {refIndex: number, vote: v40.AccountVote} { - assert(this.isV40) + get asV49(): {refIndex: number, vote: v49.AccountVote} { + assert(this.isV49) return this._chain.decodeCall(this.call) } @@ -670,30 +670,30 @@ export class EthereumTransactCall { /** * Transact an Ethereum transaction. */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getCallHash('Ethereum.transact') === '5428ddd9e500c37fab03733ba478898e4067902f2f5f71871a41c7242422fe10' } /** * Transact an Ethereum transaction. */ - get asV40(): {transaction: v40.EthTransaction} { - assert(this.isV40) + get asV49(): {transaction: v49.EthTransaction} { + assert(this.isV49) return this._chain.decodeCall(this.call) } /** * Transact an Ethereum transaction. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getCallHash('Ethereum.transact') === '1415fd2e9fbe639b903297515a3d773224e43cd3e03aa9e6c3f0ae82fe4e93f4' } /** * Transact an Ethereum transaction. */ - get asV1200(): {transaction: v1200.TransactionV2} { - assert(this.isV1200) + get asV1201(): {transaction: v1201.TransactionV2} { + assert(this.isV1201) return this._chain.decodeCall(this.call) } } diff --git a/src/types/events.ts b/src/types/events.ts index d13e76b0..197435d3 100644 --- a/src/types/events.ts +++ b/src/types/events.ts @@ -1,16 +1,16 @@ import assert from 'assert' import {Chain, ChainContext, EventContext, Event, Result, Option} from './support' -import * as v40 from './v40' +import * as v49 from './v49' import * as v701 from './v701' import * as v900 from './v900' -import * as v1200 from './v1200' +import * as v1201 from './v1201' import * as v1300 from './v1300' -import * as v1400 from './v1400' -import * as v1603 from './v1603' -import * as v1700 from './v1700' -import * as v1800 from './v1800' -import * as v1900 from './v1900' +import * as v1401 from './v1401' +import * as v1605 from './v1605' +import * as v1701 from './v1701' +import * as v1801 from './v1801' import * as v2000 from './v2000' +import * as v2100 from './v2100' export class DemocracyCancelledEvent { private readonly _chain: Chain @@ -28,30 +28,30 @@ export class DemocracyCancelledEvent { /** * A referendum has been cancelled. \[ref_index\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.Cancelled') === '0a0f30b1ade5af5fade6413c605719d59be71340cf4884f65ee9858eb1c38f6c' } /** * A referendum has been cancelled. \[ref_index\] */ - get asV40(): number { - assert(this.isV40) + get asV49(): number { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A referendum has been cancelled. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Cancelled') === '8a84371403a09e2f8fc2aac80f5a8a53229b346c4b3859069867b8e656b13450' } /** * A referendum has been cancelled. */ - get asV1200(): {refIndex: number} { - assert(this.isV1200) + get asV1201(): {refIndex: number} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -72,15 +72,15 @@ export class DemocracyExecutedEvent { /** * A proposal has been enacted. \[ref_index, is_ok\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.Executed') === 'f267e1fa04f32dd15473e3a6d2514ae684bd7ba5516d192ba70e4d49211868aa' } /** * A proposal has been enacted. \[ref_index, is_ok\] */ - get asV40(): [number, boolean] { - assert(this.isV40) + get asV49(): [number, boolean] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } @@ -109,7 +109,7 @@ export class DemocracyExecutedEvent { /** * A proposal has been enacted. \[ref_index, result\] */ - get asV900(): [number, v900.Type_33] { + get asV900(): [number, v900.Type_43] { assert(this.isV900) return this._chain.decodeEvent(this.event) } @@ -117,15 +117,15 @@ export class DemocracyExecutedEvent { /** * A proposal has been enacted. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Executed') === '0077901b6de880646efe44eef6ddcdc431a84c0fe153cc9f8e6e66c9354cbb13' } /** * A proposal has been enacted. */ - get asV1200(): {refIndex: number, result: v1200.Type_27} { - assert(this.isV1200) + get asV1201(): {refIndex: number, result: v1201.Type_41} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } @@ -139,7 +139,7 @@ export class DemocracyExecutedEvent { /** * A proposal has been enacted. */ - get asV1300(): {refIndex: number, result: v1300.Type_27} { + get asV1300(): {refIndex: number, result: v1300.Type_41} { assert(this.isV1300) return this._chain.decodeEvent(this.event) } @@ -147,30 +147,30 @@ export class DemocracyExecutedEvent { /** * A proposal has been enacted. */ - get isV1400(): boolean { + get isV1401(): boolean { return this._chain.getEventHash('Democracy.Executed') === '270512fa9651c9fa2eb584a439cab409bb758634bd42c08ad5fc0e9bbed943b0' } /** * A proposal has been enacted. */ - get asV1400(): {refIndex: number, result: v1400.Type_28} { - assert(this.isV1400) + get asV1401(): {refIndex: number, result: v1401.Type_42} { + assert(this.isV1401) return this._chain.decodeEvent(this.event) } /** * A proposal has been enacted. */ - get isV1603(): boolean { + get isV1605(): boolean { return this._chain.getEventHash('Democracy.Executed') === '957b797337eaa1f370b65a94f7685042cc04730ba165349e248cfdde80b53c25' } /** * A proposal has been enacted. */ - get asV1603(): {refIndex: number, result: v1603.Type_29} { - assert(this.isV1603) + get asV1605(): {refIndex: number, result: v1605.Type_47} { + assert(this.isV1605) return this._chain.decodeEvent(this.event) } } @@ -191,30 +191,30 @@ export class DemocracyNotPassedEvent { /** * A proposal has been rejected by referendum. \[ref_index\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.NotPassed') === '0a0f30b1ade5af5fade6413c605719d59be71340cf4884f65ee9858eb1c38f6c' } /** * A proposal has been rejected by referendum. \[ref_index\] */ - get asV40(): number { - assert(this.isV40) + get asV49(): number { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A proposal has been rejected by referendum. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.NotPassed') === '8a84371403a09e2f8fc2aac80f5a8a53229b346c4b3859069867b8e656b13450' } /** * A proposal has been rejected by referendum. */ - get asV1200(): {refIndex: number} { - assert(this.isV1200) + get asV1201(): {refIndex: number} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -235,30 +235,30 @@ export class DemocracyPassedEvent { /** * A proposal has been approved by referendum. \[ref_index\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.Passed') === '0a0f30b1ade5af5fade6413c605719d59be71340cf4884f65ee9858eb1c38f6c' } /** * A proposal has been approved by referendum. \[ref_index\] */ - get asV40(): number { - assert(this.isV40) + get asV49(): number { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A proposal has been approved by referendum. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Passed') === '8a84371403a09e2f8fc2aac80f5a8a53229b346c4b3859069867b8e656b13450' } /** * A proposal has been approved by referendum. */ - get asV1200(): {refIndex: number} { - assert(this.isV1200) + get asV1201(): {refIndex: number} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -280,7 +280,7 @@ export class DemocracyPreimageInvalidEvent { * A proposal could not be executed because its preimage was invalid. * \[proposal_hash, ref_index\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.PreimageInvalid') === 'a86a85822cc09ae7b3b9587f12944d2954476832a499d679c195ffaa86c16212' } @@ -288,23 +288,23 @@ export class DemocracyPreimageInvalidEvent { * A proposal could not be executed because its preimage was invalid. * \[proposal_hash, ref_index\] */ - get asV40(): [Uint8Array, number] { - assert(this.isV40) + get asV49(): [Uint8Array, number] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A proposal could not be executed because its preimage was invalid. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.PreimageInvalid') === 'd21a40db31aa35f736256c62aed3838360364afbf5d732372a68110d811862d6' } /** * A proposal could not be executed because its preimage was invalid. */ - get asV1200(): {proposalHash: Uint8Array, refIndex: number} { - assert(this.isV1200) + get asV1201(): {proposalHash: Uint8Array, refIndex: number} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -326,7 +326,7 @@ export class DemocracyPreimageMissingEvent { * A proposal could not be executed because its preimage was missing. * \[proposal_hash, ref_index\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.PreimageMissing') === 'a86a85822cc09ae7b3b9587f12944d2954476832a499d679c195ffaa86c16212' } @@ -334,23 +334,23 @@ export class DemocracyPreimageMissingEvent { * A proposal could not be executed because its preimage was missing. * \[proposal_hash, ref_index\] */ - get asV40(): [Uint8Array, number] { - assert(this.isV40) + get asV49(): [Uint8Array, number] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A proposal could not be executed because its preimage was missing. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.PreimageMissing') === 'd21a40db31aa35f736256c62aed3838360364afbf5d732372a68110d811862d6' } /** * A proposal could not be executed because its preimage was missing. */ - get asV1200(): {proposalHash: Uint8Array, refIndex: number} { - assert(this.isV1200) + get asV1201(): {proposalHash: Uint8Array, refIndex: number} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -371,30 +371,30 @@ export class DemocracyPreimageNotedEvent { /** * A proposal's preimage was noted, and the deposit taken. \[proposal_hash, who, deposit\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.PreimageNoted') === '317eeaadc76ca7d763e634bff31da2b98d72376d5e842a0cded1cf421e0694c1' } /** * A proposal's preimage was noted, and the deposit taken. \[proposal_hash, who, deposit\] */ - get asV40(): [Uint8Array, Uint8Array, bigint] { - assert(this.isV40) + get asV49(): [Uint8Array, Uint8Array, bigint] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A proposal's preimage was noted, and the deposit taken. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.PreimageNoted') === 'd47be2e4a05481fd42e21a0e80292e7b68789de4198c4087194b44ca5b857093' } /** * A proposal's preimage was noted, and the deposit taken. */ - get asV1200(): {proposalHash: Uint8Array, who: Uint8Array, deposit: bigint} { - assert(this.isV1200) + get asV1201(): {proposalHash: Uint8Array, who: Uint8Array, deposit: bigint} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -416,7 +416,7 @@ export class DemocracyPreimageReapedEvent { * A registered preimage was removed and the deposit collected by the reaper. * \[proposal_hash, provider, deposit, reaper\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.PreimageReaped') === 'c1f551cd38e3880870dfafd43056cf3e144a85c870b0b513c2a042c7e4634bf7' } @@ -424,23 +424,23 @@ export class DemocracyPreimageReapedEvent { * A registered preimage was removed and the deposit collected by the reaper. * \[proposal_hash, provider, deposit, reaper\] */ - get asV40(): [Uint8Array, Uint8Array, bigint, Uint8Array] { - assert(this.isV40) + get asV49(): [Uint8Array, Uint8Array, bigint, Uint8Array] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A registered preimage was removed and the deposit collected by the reaper. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.PreimageReaped') === '79380123f072831563a9a29ef7dd7d312f309e2ba7fb0a62b701bc6410ad30b7' } /** * A registered preimage was removed and the deposit collected by the reaper. */ - get asV1200(): {proposalHash: Uint8Array, provider: Uint8Array, deposit: bigint, reaper: Uint8Array} { - assert(this.isV1200) + get asV1201(): {proposalHash: Uint8Array, provider: Uint8Array, deposit: bigint, reaper: Uint8Array} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -462,7 +462,7 @@ export class DemocracyPreimageUsedEvent { * A proposal preimage was removed and used (the deposit was returned). * \[proposal_hash, provider, deposit\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.PreimageUsed') === '317eeaadc76ca7d763e634bff31da2b98d72376d5e842a0cded1cf421e0694c1' } @@ -470,23 +470,23 @@ export class DemocracyPreimageUsedEvent { * A proposal preimage was removed and used (the deposit was returned). * \[proposal_hash, provider, deposit\] */ - get asV40(): [Uint8Array, Uint8Array, bigint] { - assert(this.isV40) + get asV49(): [Uint8Array, Uint8Array, bigint] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A proposal preimage was removed and used (the deposit was returned). */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.PreimageUsed') === '84e66e8024f25586e9c223173463c55e83f2ff96130417e7f93374803337e024' } /** * A proposal preimage was removed and used (the deposit was returned). */ - get asV1200(): {proposalHash: Uint8Array, provider: Uint8Array, deposit: bigint} { - assert(this.isV1200) + get asV1201(): {proposalHash: Uint8Array, provider: Uint8Array, deposit: bigint} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -507,30 +507,30 @@ export class DemocracyProposedEvent { /** * A motion has been proposed by a public account. \[proposal_index, deposit\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.Proposed') === 'a0e51e81445baa317309351746e010ed2435e30ff7e53fbb2cf59283f3b9c536' } /** * A motion has been proposed by a public account. \[proposal_index, deposit\] */ - get asV40(): [number, bigint] { - assert(this.isV40) + get asV49(): [number, bigint] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A motion has been proposed by a public account. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Proposed') === '02ae149915d453560f4d12074a380744b3bbb2fe4c235e963f440e2d79243477' } /** * A motion has been proposed by a public account. */ - get asV1200(): {proposalIndex: number, deposit: bigint} { - assert(this.isV1200) + get asV1201(): {proposalIndex: number, deposit: bigint} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -566,15 +566,15 @@ export class DemocracySecondedEvent { /** * An account has secconded a proposal */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Seconded') === '64da6ce35c02cb0c27b0e16f55fa6a5bafc454011188894a92a86fae6c04c2aa' } /** * An account has secconded a proposal */ - get asV1200(): {who: Uint8Array, proposalIndex: number} { - assert(this.isV1200) + get asV1201(): {who: Uint8Array, proposalIndex: number} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } @@ -610,30 +610,30 @@ export class DemocracyStartedEvent { /** * A referendum has begun. \[ref_index, threshold\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.Started') === '31dcae10175d30392db6fc8a872e963baae4bcf3ee28dfd38b1653a0751c031f' } /** * A referendum has begun. \[ref_index, threshold\] */ - get asV40(): [number, v40.VoteThreshold] { - assert(this.isV40) + get asV49(): [number, v49.VoteThreshold] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A referendum has begun. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Started') === '663653944bacc0e562b015a412877b12c32bc62814b673192c550438bf618ab4' } /** * A referendum has begun. */ - get asV1200(): {refIndex: number, threshold: v1200.VoteThreshold} { - assert(this.isV1200) + get asV1201(): {refIndex: number, threshold: v1201.VoteThreshold} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } } @@ -654,30 +654,30 @@ export class DemocracyTabledEvent { /** * A public proposal has been tabled for referendum vote. \[proposal_index, deposit, depositors\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Democracy.Tabled') === 'a02fb718124f3ad2168551f865aebb4f81eb1cfe14c9fb743a86ef04f294e29b' } /** * A public proposal has been tabled for referendum vote. \[proposal_index, deposit, depositors\] */ - get asV40(): [number, bigint, Uint8Array[]] { - assert(this.isV40) + get asV49(): [number, bigint, Uint8Array[]] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * A public proposal has been tabled for referendum vote. */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Democracy.Tabled') === '2b043f58d8d5c231c7840a8ddeda0d0c9db1b6f9985329aaaac42d4661be939e' } /** * A public proposal has been tabled for referendum vote. */ - get asV1200(): {proposalIndex: number, deposit: bigint, depositors: Uint8Array[]} { - assert(this.isV1200) + get asV1201(): {proposalIndex: number, deposit: bigint, depositors: Uint8Array[]} { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } @@ -713,75 +713,75 @@ export class EthereumExecutedEvent { /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Ethereum.Executed') === '0c7eb5ef81fb6e87c05b96ed25f52c62fffc067198343642f01289fbb0011fce' } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get asV40(): [Uint8Array, Uint8Array, Uint8Array, v40.ExitReason] { - assert(this.isV40) + get asV49(): [Uint8Array, Uint8Array, Uint8Array, v49.ExitReason] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get isV1200(): boolean { + get isV1201(): boolean { return this._chain.getEventHash('Ethereum.Executed') === '4548a1e2cc89d3c4c1d89f3020a6fb505032fdfd5236d5749c897815fb7db5de' } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get asV1200(): [Uint8Array, Uint8Array, Uint8Array, v1200.ExitReason] { - assert(this.isV1200) + get asV1201(): [Uint8Array, Uint8Array, Uint8Array, v1201.ExitReason] { + assert(this.isV1201) return this._chain.decodeEvent(this.event) } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get isV1400(): boolean { + get isV1401(): boolean { return this._chain.getEventHash('Ethereum.Executed') === '19a41316cbc97760af789cb1da772172d6a9f09521ee0e5e8f18125c1db318df' } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get asV1400(): [Uint8Array, Uint8Array, Uint8Array, v1400.ExitReason] { - assert(this.isV1400) + get asV1401(): [Uint8Array, Uint8Array, Uint8Array, v1401.ExitReason] { + assert(this.isV1401) return this._chain.decodeEvent(this.event) } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get isV1700(): boolean { + get isV1701(): boolean { return this._chain.getEventHash('Ethereum.Executed') === '42c632fb85f0ab54f0811a41be276501476d6d3e1e0169c6a6db6afdd63e7893' } /** * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason] */ - get asV1700(): [Uint8Array, Uint8Array, Uint8Array, v1700.ExitReason] { - assert(this.isV1700) + get asV1701(): [Uint8Array, Uint8Array, Uint8Array, v1701.ExitReason] { + assert(this.isV1701) return this._chain.decodeEvent(this.event) } /** * An ethereum transaction was successfully executed. */ - get isV1800(): boolean { + get isV1801(): boolean { return this._chain.getEventHash('Ethereum.Executed') === '85a0045758a84a2cd09a563b9e9fc2194e6054385c70290178792fb71cd20021' } /** * An ethereum transaction was successfully executed. */ - get asV1800(): {from: Uint8Array, to: Uint8Array, transactionHash: Uint8Array, exitReason: v1800.ExitReason} { - assert(this.isV1800) + get asV1801(): {from: Uint8Array, to: Uint8Array, transactionHash: Uint8Array, exitReason: v1801.ExitReason} { + assert(this.isV1801) return this._chain.decodeEvent(this.event) } } @@ -802,15 +802,15 @@ export class PreimageClearedEvent { /** * A preimage has ben cleared. */ - get isV1900(): boolean { + get isV2000(): boolean { return this._chain.getEventHash('Preimage.Cleared') === '19b8576fc9fe9553b0b5ad154324ccae0d0d43fdccbdffddf2bb6066a9b37b5c' } /** * A preimage has ben cleared. */ - get asV1900(): {hash: Uint8Array} { - assert(this.isV1900) + get asV2000(): {hash: Uint8Array} { + assert(this.isV2000) return this._chain.decodeEvent(this.event) } } @@ -831,15 +831,15 @@ export class PreimageNotedEvent { /** * A preimage has been noted. */ - get isV1900(): boolean { + get isV2000(): boolean { return this._chain.getEventHash('Preimage.Noted') === '19b8576fc9fe9553b0b5ad154324ccae0d0d43fdccbdffddf2bb6066a9b37b5c' } /** * A preimage has been noted. */ - get asV1900(): {hash: Uint8Array} { - assert(this.isV1900) + get asV2000(): {hash: Uint8Array} { + assert(this.isV2000) return this._chain.decodeEvent(this.event) } } @@ -860,15 +860,15 @@ export class PreimageRequestedEvent { /** * A preimage has been requested. */ - get isV1900(): boolean { + get isV2000(): boolean { return this._chain.getEventHash('Preimage.Requested') === '19b8576fc9fe9553b0b5ad154324ccae0d0d43fdccbdffddf2bb6066a9b37b5c' } /** * A preimage has been requested. */ - get asV1900(): {hash: Uint8Array} { - assert(this.isV1900) + get asV2000(): {hash: Uint8Array} { + assert(this.isV2000) return this._chain.decodeEvent(this.event) } } @@ -889,15 +889,15 @@ export class ReferendaApprovedEvent { /** * A referendum has been approved and its proposal has been scheduled. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.Approved') === '25a99cc820e15400356f62165725d9d84847d859e62ca1e5fd6eb340dc5c217e' } /** * A referendum has been approved and its proposal has been scheduled. */ - get asV1900(): {index: number} { - assert(this.isV1900) + get asV2100(): {index: number} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -918,15 +918,15 @@ export class ReferendaCancelledEvent { /** * A referendum has been cancelled. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.Cancelled') === '70d6a902ac9b2bb5bbfe0c144d90f4f6173d5a1789c49a1fde94843431be6f82' } /** * A referendum has been cancelled. */ - get asV1900(): {index: number, tally: v1900.Tally} { - assert(this.isV1900) + get asV2100(): {index: number, tally: v2100.Tally} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -944,12 +944,12 @@ export class ReferendaConfirmAbortedEvent { this.event = event } - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.ConfirmAborted') === '25a99cc820e15400356f62165725d9d84847d859e62ca1e5fd6eb340dc5c217e' } - get asV1900(): {index: number} { - assert(this.isV1900) + get asV2100(): {index: number} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -967,12 +967,12 @@ export class ReferendaConfirmStartedEvent { this.event = event } - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.ConfirmStarted') === '25a99cc820e15400356f62165725d9d84847d859e62ca1e5fd6eb340dc5c217e' } - get asV1900(): {index: number} { - assert(this.isV1900) + get asV2100(): {index: number} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -993,15 +993,15 @@ export class ReferendaConfirmedEvent { /** * A referendum has ended its confirmation phase and is ready for approval. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.Confirmed') === '70d6a902ac9b2bb5bbfe0c144d90f4f6173d5a1789c49a1fde94843431be6f82' } /** * A referendum has ended its confirmation phase and is ready for approval. */ - get asV1900(): {index: number, tally: v1900.Tally} { - assert(this.isV1900) + get asV2100(): {index: number, tally: v2100.Tally} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1022,15 +1022,15 @@ export class ReferendaDecisionDepositPlacedEvent { /** * The decision deposit has been placed. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.DecisionDepositPlaced') === '5f4efdfb06509d37b98e33824ae6590ba8b3edb296ad4f18a1153ccb231b91e1' } /** * The decision deposit has been placed. */ - get asV1900(): {index: number, who: Uint8Array, amount: bigint} { - assert(this.isV1900) + get asV2100(): {index: number, who: Uint8Array, amount: bigint} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1051,30 +1051,15 @@ export class ReferendaDecisionStartedEvent { /** * A referendum has moved into the deciding phase. */ - get isV1900(): boolean { - return this._chain.getEventHash('Referenda.DecisionStarted') === 'e483ba61ca292dfe5c261bb23b4be45bd4e5054b6c1a5711ee9f8eeb2603caf6' - } - - /** - * A referendum has moved into the deciding phase. - */ - get asV1900(): {index: number, track: number, proposalHash: Uint8Array, tally: v1900.Tally} { - assert(this.isV1900) - return this._chain.decodeEvent(this.event) - } - - /** - * A referendum has moved into the deciding phase. - */ - get isV2000(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.DecisionStarted') === '93e86498f68feebf124dad7a87010c14ba0e2cc07333331054e866079ff834a5' } /** * A referendum has moved into the deciding phase. */ - get asV2000(): {index: number, track: number, proposal: v2000.Bounded, tally: v2000.Tally} { - assert(this.isV2000) + get asV2100(): {index: number, track: number, proposal: v2100.Bounded, tally: v2100.Tally} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1095,15 +1080,15 @@ export class ReferendaKilledEvent { /** * A referendum has been killed. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.Killed') === '70d6a902ac9b2bb5bbfe0c144d90f4f6173d5a1789c49a1fde94843431be6f82' } /** * A referendum has been killed. */ - get asV1900(): {index: number, tally: v1900.Tally} { - assert(this.isV1900) + get asV2100(): {index: number, tally: v2100.Tally} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1124,15 +1109,15 @@ export class ReferendaRejectedEvent { /** * A proposal has been rejected by referendum. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.Rejected') === '70d6a902ac9b2bb5bbfe0c144d90f4f6173d5a1789c49a1fde94843431be6f82' } /** * A proposal has been rejected by referendum. */ - get asV1900(): {index: number, tally: v1900.Tally} { - assert(this.isV1900) + get asV2100(): {index: number, tally: v2100.Tally} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1153,30 +1138,15 @@ export class ReferendaSubmittedEvent { /** * A referendum has being submitted. */ - get isV1900(): boolean { - return this._chain.getEventHash('Referenda.Submitted') === 'f3d99a635e6a54348c4a26958c1b599626768cff5c94d3044d6e0da21078da90' - } - - /** - * A referendum has being submitted. - */ - get asV1900(): {index: number, track: number, proposalHash: Uint8Array} { - assert(this.isV1900) - return this._chain.decodeEvent(this.event) - } - - /** - * A referendum has being submitted. - */ - get isV2000(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.Submitted') === 'dd1db40cab9e2e0c54e203f9c60347029a08160d5930b550604e5378d4c502df' } /** * A referendum has being submitted. */ - get asV2000(): {index: number, track: number, proposal: v2000.Bounded} { - assert(this.isV2000) + get asV2100(): {index: number, track: number, proposal: v2100.Bounded} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1197,15 +1167,15 @@ export class ReferendaTimedOutEvent { /** * A referendum has been timed out without being decided. */ - get isV1900(): boolean { + get isV2100(): boolean { return this._chain.getEventHash('Referenda.TimedOut') === '70d6a902ac9b2bb5bbfe0c144d90f4f6173d5a1789c49a1fde94843431be6f82' } /** * A referendum has been timed out without being decided. */ - get asV1900(): {index: number, tally: v1900.Tally} { - assert(this.isV1900) + get asV2100(): {index: number, tally: v2100.Tally} { + assert(this.isV2100) return this._chain.decodeEvent(this.event) } } @@ -1226,15 +1196,15 @@ export class SchedulerDispatchedEvent { /** * Dispatched some task. \[task, id, result\] */ - get isV40(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Scheduler.Dispatched') === '8932a074b1c2cd5ce9792be58d56c1325be1d704098dac81f23ff6804e2d5fee' } /** * Dispatched some task. \[task, id, result\] */ - get asV40(): [[number, number], (Uint8Array | undefined), v40.DispatchResult] { - assert(this.isV40) + get asV49(): [[number, number], (Uint8Array | undefined), v49.DispatchResult] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } @@ -1248,7 +1218,7 @@ export class SchedulerDispatchedEvent { /** * Dispatched some task. \[task, id, result\] */ - get asV900(): [[number, number], (Uint8Array | undefined), v900.Type_33] { + get asV900(): [[number, number], (Uint8Array | undefined), v900.Type_43] { assert(this.isV900) return this._chain.decodeEvent(this.event) } @@ -1263,7 +1233,7 @@ export class SchedulerDispatchedEvent { /** * Dispatched some task. */ - get asV1300(): {task: [number, number], id: (Uint8Array | undefined), result: v1300.Type_27} { + get asV1300(): {task: [number, number], id: (Uint8Array | undefined), result: v1300.Type_41} { assert(this.isV1300) return this._chain.decodeEvent(this.event) } @@ -1271,30 +1241,30 @@ export class SchedulerDispatchedEvent { /** * Dispatched some task. */ - get isV1400(): boolean { + get isV1401(): boolean { return this._chain.getEventHash('Scheduler.Dispatched') === '4439d3bf37ab8e1b7b14c411aa9c4d9622aa96b4dd169cb67da04ec196da4c09' } /** * Dispatched some task. */ - get asV1400(): {task: [number, number], id: (Uint8Array | undefined), result: v1400.Type_28} { - assert(this.isV1400) + get asV1401(): {task: [number, number], id: (Uint8Array | undefined), result: v1401.Type_42} { + assert(this.isV1401) return this._chain.decodeEvent(this.event) } /** * Dispatched some task. */ - get isV1603(): boolean { + get isV1605(): boolean { return this._chain.getEventHash('Scheduler.Dispatched') === 'ba59527b3bb4801aee2fda92f8229d8d572cc38c565e139a667a87dd8171194b' } /** * Dispatched some task. */ - get asV1603(): {task: [number, number], id: (Uint8Array | undefined), result: v1603.Type_29} { - assert(this.isV1603) + get asV1605(): {task: [number, number], id: (Uint8Array | undefined), result: v1605.Type_47} { + assert(this.isV1605) return this._chain.decodeEvent(this.event) } @@ -1308,7 +1278,7 @@ export class SchedulerDispatchedEvent { /** * Dispatched some task. */ - get asV2000(): {task: [number, number], id: (Uint8Array | undefined), result: v2000.Type_31} { + get asV2000(): {task: [number, number], id: (Uint8Array | undefined), result: v2000.Type_50} { assert(this.isV2000) return this._chain.decodeEvent(this.event) } @@ -1330,15 +1300,15 @@ export class TreasuryAwardedEvent { /** * Some funds have been allocated. \[proposal_index, award, beneficiary\] */ - get isV47(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Treasury.Awarded') === '1ca1bbccad98d48e2621a47ca30161714034e352019415514ef1338743ce0fd8' } /** * Some funds have been allocated. \[proposal_index, award, beneficiary\] */ - get asV47(): [number, bigint, Uint8Array] { - assert(this.isV47) + get asV49(): [number, bigint, Uint8Array] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } @@ -1374,15 +1344,15 @@ export class TreasuryProposedEvent { /** * New proposal. \[proposal_index\] */ - get isV47(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Treasury.Proposed') === '0a0f30b1ade5af5fade6413c605719d59be71340cf4884f65ee9858eb1c38f6c' } /** * New proposal. \[proposal_index\] */ - get asV47(): number { - assert(this.isV47) + get asV49(): number { + assert(this.isV49) return this._chain.decodeEvent(this.event) } @@ -1418,15 +1388,15 @@ export class TreasuryRejectedEvent { /** * A proposal was rejected; funds were slashed. \[proposal_index, slashed\] */ - get isV47(): boolean { + get isV49(): boolean { return this._chain.getEventHash('Treasury.Rejected') === 'a0e51e81445baa317309351746e010ed2435e30ff7e53fbb2cf59283f3b9c536' } /** * A proposal was rejected; funds were slashed. \[proposal_index, slashed\] */ - get asV47(): [number, bigint] { - assert(this.isV47) + get asV49(): [number, bigint] { + assert(this.isV49) return this._chain.decodeEvent(this.event) } @@ -1462,15 +1432,15 @@ export class TreasurySpendApprovedEvent { /** * A new spend proposal has been approved. */ - get isV1800(): boolean { + get isV1801(): boolean { return this._chain.getEventHash('Treasury.SpendApproved') === 'b4eb6b90eeb0d3e68cf78482f1b230bc81892df3e145784d4494e6832f0715c5' } /** * A new spend proposal has been approved. */ - get asV1800(): {proposalIndex: number, amount: bigint, beneficiary: Uint8Array} { - assert(this.isV1800) + get asV1801(): {proposalIndex: number, amount: bigint, beneficiary: Uint8Array} { + assert(this.isV1801) return this._chain.decodeEvent(this.event) } } diff --git a/src/types/storage.ts b/src/types/storage.ts index 8d9a817c..71faa88a 100644 --- a/src/types/storage.ts +++ b/src/types/storage.ts @@ -1,19 +1,15 @@ import assert from 'assert' import {Block, BlockContext, Chain, ChainContext, Option, Result, StorageBase} from './support' -import * as v40 from './v40' -import * as v47 from './v47' -import * as v52 from './v52' +import * as v49 from './v49' +import * as v53 from './v53' import * as v155 from './v155' import * as v159 from './v159' import * as v200 from './v200' -import * as v300 from './v300' import * as v400 from './v400' import * as v501 from './v501' import * as v600 from './v600' import * as v701 from './v701' -import * as v800 from './v800' import * as v900 from './v900' -import * as v1900 from './v1900' import * as v2000 from './v2000' import * as v2100 from './v2100' @@ -31,7 +27,7 @@ export class BalancesAccountStorage extends StorageBase { * * NOTE: This is only used in the case that this pallet is used to store balances. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === '17669917f628c38832645ae9b39d0bab5a99964e3446b9b2ef904cad2f4bd653' } @@ -40,8 +36,8 @@ export class BalancesAccountStorage extends StorageBase { * * NOTE: This is only used in the case that this pallet is used to store balances. */ - get asV40(): BalancesAccountStorageV40 { - assert(this.isV40) + get asV49(): BalancesAccountStorageV49 { + assert(this.isV49) return this as any } } @@ -51,18 +47,18 @@ export class BalancesAccountStorage extends StorageBase { * * NOTE: This is only used in the case that this pallet is used to store balances. */ -export interface BalancesAccountStorageV40 { - get(key: Uint8Array): Promise - getAll(): Promise - getMany(keys: Uint8Array[]): Promise +export interface BalancesAccountStorageV49 { + get(key: Uint8Array): Promise + getAll(): Promise + getMany(keys: Uint8Array[]): Promise getKeys(): Promise getKeys(key: Uint8Array): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v40.AccountData][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v40.AccountData][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v40.AccountData][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v40.AccountData][]> + getPairs(): Promise<[k: Uint8Array, v: v49.AccountData][]> + getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v49.AccountData][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v49.AccountData][]> + getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v49.AccountData][]> } export class BalancesTotalIssuanceStorage extends StorageBase { @@ -77,15 +73,15 @@ export class BalancesTotalIssuanceStorage extends StorageBase { /** * The total units issued in the system. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === 'f8ebe28eb30158172c0ccf672f7747c46a244f892d08ef2ebcbaadde34a26bc0' } /** * The total units issued in the system. */ - get asV40(): BalancesTotalIssuanceStorageV40 { - assert(this.isV40) + get asV49(): BalancesTotalIssuanceStorageV49 { + assert(this.isV49) return this as any } } @@ -93,7 +89,7 @@ export class BalancesTotalIssuanceStorage extends StorageBase { /** * The total units issued in the system. */ -export interface BalancesTotalIssuanceStorageV40 { +export interface BalancesTotalIssuanceStorageV49 { get(): Promise } @@ -110,7 +106,7 @@ export class ConvictionVotingVotingForStorage extends StorageBase { * All voting for a particular voter in a particular voting class. We store the balance for the * number of votes that we have recorded. */ - get isV1900(): boolean { + get isV2100(): boolean { return this.getTypeHash() === '8c1164ab39d3c5f285bf12dfaebbe55282a793f2153b615f061f5e7f498039bd' } @@ -118,8 +114,8 @@ export class ConvictionVotingVotingForStorage extends StorageBase { * All voting for a particular voter in a particular voting class. We store the balance for the * number of votes that we have recorded. */ - get asV1900(): ConvictionVotingVotingForStorageV1900 { - assert(this.isV1900) + get asV2100(): ConvictionVotingVotingForStorageV2100 { + assert(this.isV2100) return this as any } } @@ -128,22 +124,22 @@ export class ConvictionVotingVotingForStorage extends StorageBase { * All voting for a particular voter in a particular voting class. We store the balance for the * number of votes that we have recorded. */ -export interface ConvictionVotingVotingForStorageV1900 { - get(key1: Uint8Array, key2: number): Promise - getAll(): Promise - getMany(keys: [Uint8Array, number][]): Promise +export interface ConvictionVotingVotingForStorageV2100 { + get(key1: Uint8Array, key2: number): Promise + getAll(): Promise + getMany(keys: [Uint8Array, number][]): Promise getKeys(): Promise<[Uint8Array, number][]> getKeys(key1: Uint8Array): Promise<[Uint8Array, number][]> getKeys(key1: Uint8Array, key2: number): Promise<[Uint8Array, number][]> getKeysPaged(pageSize: number): AsyncIterable<[Uint8Array, number][]> getKeysPaged(pageSize: number, key1: Uint8Array): AsyncIterable<[Uint8Array, number][]> getKeysPaged(pageSize: number, key1: Uint8Array, key2: number): AsyncIterable<[Uint8Array, number][]> - getPairs(): Promise<[k: [Uint8Array, number], v: v1900.Type_535][]> - getPairs(key1: Uint8Array): Promise<[k: [Uint8Array, number], v: v1900.Type_535][]> - getPairs(key1: Uint8Array, key2: number): Promise<[k: [Uint8Array, number], v: v1900.Type_535][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: [Uint8Array, number], v: v1900.Type_535][]> - getPairsPaged(pageSize: number, key1: Uint8Array): AsyncIterable<[k: [Uint8Array, number], v: v1900.Type_535][]> - getPairsPaged(pageSize: number, key1: Uint8Array, key2: number): AsyncIterable<[k: [Uint8Array, number], v: v1900.Type_535][]> + getPairs(): Promise<[k: [Uint8Array, number], v: v2100.Type_468][]> + getPairs(key1: Uint8Array): Promise<[k: [Uint8Array, number], v: v2100.Type_468][]> + getPairs(key1: Uint8Array, key2: number): Promise<[k: [Uint8Array, number], v: v2100.Type_468][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: [Uint8Array, number], v: v2100.Type_468][]> + getPairsPaged(pageSize: number, key1: Uint8Array): AsyncIterable<[k: [Uint8Array, number], v: v2100.Type_468][]> + getPairsPaged(pageSize: number, key1: Uint8Array, key2: number): AsyncIterable<[k: [Uint8Array, number], v: v2100.Type_468][]> } export class DemocracyPreimagesStorage extends StorageBase { @@ -159,7 +155,7 @@ export class DemocracyPreimagesStorage extends StorageBase { * Map of hashes to the proposal preimage, along with who registered it and their deposit. * The block number is the block at which it was deposited. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === '4cfebf1c3ec4cbc591b367aceaef472ee18ccb1d7b4a188ca5284e65390f4835' } @@ -167,8 +163,8 @@ export class DemocracyPreimagesStorage extends StorageBase { * Map of hashes to the proposal preimage, along with who registered it and their deposit. * The block number is the block at which it was deposited. */ - get asV40(): DemocracyPreimagesStorageV40 { - assert(this.isV40) + get asV49(): DemocracyPreimagesStorageV49 { + assert(this.isV49) return this as any } @@ -194,18 +190,18 @@ export class DemocracyPreimagesStorage extends StorageBase { * Map of hashes to the proposal preimage, along with who registered it and their deposit. * The block number is the block at which it was deposited. */ -export interface DemocracyPreimagesStorageV40 { - get(key: Uint8Array): Promise<(v40.PreimageStatus | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(v40.PreimageStatus | undefined)[]> +export interface DemocracyPreimagesStorageV49 { + get(key: Uint8Array): Promise<(v49.PreimageStatus | undefined)> + getAll(): Promise + getMany(keys: Uint8Array[]): Promise<(v49.PreimageStatus | undefined)[]> getKeys(): Promise getKeys(key: Uint8Array): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v40.PreimageStatus][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v40.PreimageStatus][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v40.PreimageStatus][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v40.PreimageStatus][]> + getPairs(): Promise<[k: Uint8Array, v: v49.PreimageStatus][]> + getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v49.PreimageStatus][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v49.PreimageStatus][]> + getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v49.PreimageStatus][]> } /** @@ -238,15 +234,15 @@ export class DemocracyPublicPropCountStorage extends StorageBase { /** * The number of (public) proposals that have been made so far. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === '81bbbe8e62451cbcc227306706c919527aa2538970bd6d67a9969dd52c257d02' } /** * The number of (public) proposals that have been made so far. */ - get asV40(): DemocracyPublicPropCountStorageV40 { - assert(this.isV40) + get asV49(): DemocracyPublicPropCountStorageV49 { + assert(this.isV49) return this as any } } @@ -254,7 +250,7 @@ export class DemocracyPublicPropCountStorage extends StorageBase { /** * The number of (public) proposals that have been made so far. */ -export interface DemocracyPublicPropCountStorageV40 { +export interface DemocracyPublicPropCountStorageV49 { get(): Promise } @@ -270,15 +266,15 @@ export class DemocracyPublicPropsStorage extends StorageBase { /** * The public proposals. Unsorted. The second item is the proposal's hash. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === '50ae2b6d7ba179c0ff783cad2f9c19cbf1f250422f7e7b7cca7df80c63db8f09' } /** * The public proposals. Unsorted. The second item is the proposal's hash. */ - get asV40(): DemocracyPublicPropsStorageV40 { - assert(this.isV40) + get asV49(): DemocracyPublicPropsStorageV49 { + assert(this.isV49) return this as any } @@ -301,7 +297,7 @@ export class DemocracyPublicPropsStorage extends StorageBase { /** * The public proposals. Unsorted. The second item is the proposal's hash. */ -export interface DemocracyPublicPropsStorageV40 { +export interface DemocracyPublicPropsStorageV49 { get(): Promise<[number, Uint8Array, Uint8Array][]> } @@ -326,7 +322,7 @@ export class DemocracyReferendumInfoOfStorage extends StorageBase { * * TWOX-NOTE: SAFE as indexes are not under an attacker’s control. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === '657d9c0cc58504c79c02d5040424e2dce3c3e5fe2b52b13a7a024ff5b06c7a99' } @@ -335,8 +331,8 @@ export class DemocracyReferendumInfoOfStorage extends StorageBase { * * TWOX-NOTE: SAFE as indexes are not under an attacker’s control. */ - get asV40(): DemocracyReferendumInfoOfStorageV40 { - assert(this.isV40) + get asV49(): DemocracyReferendumInfoOfStorageV49 { + assert(this.isV49) return this as any } @@ -384,18 +380,18 @@ export class DemocracyReferendumInfoOfStorage extends StorageBase { * * TWOX-NOTE: SAFE as indexes are not under an attacker’s control. */ -export interface DemocracyReferendumInfoOfStorageV40 { - get(key: number): Promise<(v40.ReferendumInfo | undefined)> - getAll(): Promise - getMany(keys: number[]): Promise<(v40.ReferendumInfo | undefined)[]> +export interface DemocracyReferendumInfoOfStorageV49 { + get(key: number): Promise<(v49.ReferendumInfo | undefined)> + getAll(): Promise + getMany(keys: number[]): Promise<(v49.ReferendumInfo | undefined)[]> getKeys(): Promise getKeys(key: number): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: number): AsyncIterable - getPairs(): Promise<[k: number, v: v40.ReferendumInfo][]> - getPairs(key: number): Promise<[k: number, v: v40.ReferendumInfo][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v40.ReferendumInfo][]> - getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v40.ReferendumInfo][]> + getPairs(): Promise<[k: number, v: v49.ReferendumInfo][]> + getPairs(key: number): Promise<[k: number, v: v49.ReferendumInfo][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v49.ReferendumInfo][]> + getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v49.ReferendumInfo][]> } /** @@ -448,15 +444,15 @@ export class EthereumCurrentTransactionStatusesStorage extends StorageBase { /** * The current transaction statuses. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === '258bd41865de2f8cfa5372dc3a38af8b5110322e5098a04f50c36a5195a4c893' } /** * The current transaction statuses. */ - get asV40(): EthereumCurrentTransactionStatusesStorageV40 { - assert(this.isV40) + get asV49(): EthereumCurrentTransactionStatusesStorageV49 { + assert(this.isV49) return this as any } @@ -479,8 +475,8 @@ export class EthereumCurrentTransactionStatusesStorage extends StorageBase { /** * The current transaction statuses. */ -export interface EthereumCurrentTransactionStatusesStorageV40 { - get(): Promise<(v40.EthTransactionStatus[] | undefined)> +export interface EthereumCurrentTransactionStatusesStorageV49 { + get(): Promise<(v49.EthTransactionStatus[] | undefined)> } /** @@ -502,15 +498,15 @@ export class Instance1CollectiveMembersStorage extends StorageBase { /** * The current members of the collective. This is stored sorted (just by value). */ - get isV47(): boolean { + get isV49(): boolean { return this.getTypeHash() === 'd14508def9da76532021b53d553e9048fd079e2e735d2393e6d531e6d1fd29ca' } /** * The current members of the collective. This is stored sorted (just by value). */ - get asV47(): Instance1CollectiveMembersStorageV47 { - assert(this.isV47) + get asV49(): Instance1CollectiveMembersStorageV49 { + assert(this.isV49) return this as any } } @@ -518,7 +514,7 @@ export class Instance1CollectiveMembersStorage extends StorageBase { /** * The current members of the collective. This is stored sorted (just by value). */ -export interface Instance1CollectiveMembersStorageV47 { +export interface Instance1CollectiveMembersStorageV49 { get(): Promise } @@ -534,15 +530,15 @@ export class Instance1CollectiveProposalCountStorage extends StorageBase { /** * Proposals so far. */ - get isV47(): boolean { + get isV49(): boolean { return this.getTypeHash() === '81bbbe8e62451cbcc227306706c919527aa2538970bd6d67a9969dd52c257d02' } /** * Proposals so far. */ - get asV47(): Instance1CollectiveProposalCountStorageV47 { - assert(this.isV47) + get asV49(): Instance1CollectiveProposalCountStorageV49 { + assert(this.isV49) return this as any } } @@ -550,7 +546,7 @@ export class Instance1CollectiveProposalCountStorage extends StorageBase { /** * Proposals so far. */ -export interface Instance1CollectiveProposalCountStorageV47 { +export interface Instance1CollectiveProposalCountStorageV49 { get(): Promise } @@ -566,30 +562,30 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { /** * Actual proposal for a given hash, if it's current. */ - get isV47(): boolean { - return this.getTypeHash() === 'd48127d2e9137407288bf17e7c524f740e899b2c44d2a7b48698e8ce353f8848' + get isV49(): boolean { + return this.getTypeHash() === '8ca82453861f38ca55a75abe2ddba8a95fc8c769166f39d8b6a7577f159816ae' } /** * Actual proposal for a given hash, if it's current. */ - get asV47(): Instance1CollectiveProposalOfStorageV47 { - assert(this.isV47) + get asV49(): Instance1CollectiveProposalOfStorageV49 { + assert(this.isV49) return this as any } /** * Actual proposal for a given hash, if it's current. */ - get isV52(): boolean { - return this.getTypeHash() === 'f8358744773d62a9d22663727c01c32549f65b859dc8260f1e895988a699b3bf' + get isV53(): boolean { + return this.getTypeHash() === '459a807b868907d27334e796710b62a9bf93cde9ce4991ebff0343c895735b36' } /** * Actual proposal for a given hash, if it's current. */ - get asV52(): Instance1CollectiveProposalOfStorageV52 { - assert(this.isV52) + get asV53(): Instance1CollectiveProposalOfStorageV53 { + assert(this.isV53) return this as any } @@ -597,7 +593,7 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { * Actual proposal for a given hash, if it's current. */ get isV155(): boolean { - return this.getTypeHash() === '6c3430bb515a76b69cb9445eed4e2b361d0358942be65e2a2cc5c247136fddf4' + return this.getTypeHash() === '9651e3cff016716f006cb870ae8c3dbf96240c78b2c09797b4268040f4750a52' } /** @@ -612,7 +608,7 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { * Actual proposal for a given hash, if it's current. */ get isV159(): boolean { - return this.getTypeHash() === 'c2535829681739d511aa717dcd43e2f7d060f65d9547f908a55c5707500ca6e5' + return this.getTypeHash() === 'e40293bf8d996e7135981492cb05da389901df511b5e9d61a28f811bf5420623' } /** @@ -627,7 +623,7 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { * Actual proposal for a given hash, if it's current. */ get isV200(): boolean { - return this.getTypeHash() === '86b2a01b4b174c573b5fbc141ffec9b6e2b2cf092a7bf7b7fd59e919a819ac57' + return this.getTypeHash() === '9890baa3b0a5fc391ea6df8c25e2360250c5fd7068c146834dff47e69d90c0d6' } /** @@ -638,26 +634,11 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { return this as any } - /** - * Actual proposal for a given hash, if it's current. - */ - get isV300(): boolean { - return this.getTypeHash() === 'c2535829681739d511aa717dcd43e2f7d060f65d9547f908a55c5707500ca6e5' - } - - /** - * Actual proposal for a given hash, if it's current. - */ - get asV300(): Instance1CollectiveProposalOfStorageV300 { - assert(this.isV300) - return this as any - } - /** * Actual proposal for a given hash, if it's current. */ get isV400(): boolean { - return this.getTypeHash() === '0b8312de089cadb50e8a5dbf4401b577622c1a7cfbdf974f41016604e3d0554e' + return this.getTypeHash() === '15a0e4b1bb8aa34e251f4b51240698d1d8809dcdfae76e69a989f63ff2e2f343' } /** @@ -672,7 +653,7 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { * Actual proposal for a given hash, if it's current. */ get isV501(): boolean { - return this.getTypeHash() === 'db40246edec28b1903f81cf287d8d6b9b21ff4de4a2e2eb25531a7b269a96744' + return this.getTypeHash() === '7ea473ab07ce006358199c6cc0efb0a7eb8e6761a5b9b605ad35bcd1df91119f' } /** @@ -687,7 +668,7 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { * Actual proposal for a given hash, if it's current. */ get isV600(): boolean { - return this.getTypeHash() === '0b8312de089cadb50e8a5dbf4401b577622c1a7cfbdf974f41016604e3d0554e' + return this.getTypeHash() === '15a0e4b1bb8aa34e251f4b51240698d1d8809dcdfae76e69a989f63ff2e2f343' } /** @@ -702,7 +683,7 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { * Actual proposal for a given hash, if it's current. */ get isV701(): boolean { - return this.getTypeHash() === '740845978a93a8a85ed14efa13e6e9615b1200c298931ca5b4afb1567f2dcc5d' + return this.getTypeHash() === 'b867b08a01f2d55a9bec2d3367a3b089ee619970922048bd0b72a53a1aa06bf4' } /** @@ -712,55 +693,40 @@ export class Instance1CollectiveProposalOfStorage extends StorageBase { assert(this.isV701) return this as any } - - /** - * Actual proposal for a given hash, if it's current. - */ - get isV800(): boolean { - return this.getTypeHash() === '8a2f2f534bf16315ba3eaaed9278e8ce9fedd063a9d153932762c9ab6fb7ce22' - } - - /** - * Actual proposal for a given hash, if it's current. - */ - get asV800(): Instance1CollectiveProposalOfStorageV800 { - assert(this.isV800) - return this as any - } } /** * Actual proposal for a given hash, if it's current. */ -export interface Instance1CollectiveProposalOfStorageV47 { - get(key: Uint8Array): Promise<(v47.Proposal | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(v47.Proposal | undefined)[]> +export interface Instance1CollectiveProposalOfStorageV49 { + get(key: Uint8Array): Promise<(v49.Proposal | undefined)> + getAll(): Promise + getMany(keys: Uint8Array[]): Promise<(v49.Proposal | undefined)[]> getKeys(): Promise getKeys(key: Uint8Array): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v47.Proposal][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v47.Proposal][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v47.Proposal][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v47.Proposal][]> + getPairs(): Promise<[k: Uint8Array, v: v49.Proposal][]> + getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v49.Proposal][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v49.Proposal][]> + getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v49.Proposal][]> } /** * Actual proposal for a given hash, if it's current. */ -export interface Instance1CollectiveProposalOfStorageV52 { - get(key: Uint8Array): Promise<(v52.Proposal | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(v52.Proposal | undefined)[]> +export interface Instance1CollectiveProposalOfStorageV53 { + get(key: Uint8Array): Promise<(v53.Proposal | undefined)> + getAll(): Promise + getMany(keys: Uint8Array[]): Promise<(v53.Proposal | undefined)[]> getKeys(): Promise getKeys(key: Uint8Array): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v52.Proposal][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v52.Proposal][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v52.Proposal][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v52.Proposal][]> + getPairs(): Promise<[k: Uint8Array, v: v53.Proposal][]> + getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v53.Proposal][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v53.Proposal][]> + getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v53.Proposal][]> } /** @@ -814,23 +780,6 @@ export interface Instance1CollectiveProposalOfStorageV200 { getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v200.Proposal][]> } -/** - * Actual proposal for a given hash, if it's current. - */ -export interface Instance1CollectiveProposalOfStorageV300 { - get(key: Uint8Array): Promise<(v300.Proposal | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(v300.Proposal | undefined)[]> - getKeys(): Promise - getKeys(key: Uint8Array): Promise - getKeysPaged(pageSize: number): AsyncIterable - getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v300.Proposal][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v300.Proposal][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v300.Proposal][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v300.Proposal][]> -} - /** * Actual proposal for a given hash, if it's current. */ @@ -899,23 +848,6 @@ export interface Instance1CollectiveProposalOfStorageV701 { getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v701.Proposal][]> } -/** - * Actual proposal for a given hash, if it's current. - */ -export interface Instance1CollectiveProposalOfStorageV800 { - get(key: Uint8Array): Promise<(v800.Proposal | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(v800.Proposal | undefined)[]> - getKeys(): Promise - getKeys(key: Uint8Array): Promise - getKeysPaged(pageSize: number): AsyncIterable - getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v800.Proposal][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v800.Proposal][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v800.Proposal][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v800.Proposal][]> -} - export class PreimagePreimageForStorage extends StorageBase { protected getPrefix() { return 'Preimage' @@ -925,21 +857,6 @@ export class PreimagePreimageForStorage extends StorageBase { return 'PreimageFor' } - /** - * The preimages stored by this pallet. - */ - get isV1900(): boolean { - return this.getTypeHash() === '2c57d2b4da44b4d6783b1eb7d03f42f23490455080a2c71c813169067dfe1a54' - } - - /** - * The preimages stored by this pallet. - */ - get asV1900(): PreimagePreimageForStorageV1900 { - assert(this.isV1900) - return this as any - } - get isV2000(): boolean { return this.getTypeHash() === '55fa1a08a9fac4bcf15d53fce590e3fb5af7fbc408ac4b8e1ed28f5f8a242534' } @@ -950,23 +867,6 @@ export class PreimagePreimageForStorage extends StorageBase { } } -/** - * The preimages stored by this pallet. - */ -export interface PreimagePreimageForStorageV1900 { - get(key: Uint8Array): Promise<(Uint8Array | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(Uint8Array | undefined)[]> - getKeys(): Promise - getKeys(key: Uint8Array): Promise - getKeysPaged(pageSize: number): AsyncIterable - getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: Uint8Array][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: Uint8Array][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: Uint8Array][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: Uint8Array][]> -} - export interface PreimagePreimageForStorageV2000 { get(key: [Uint8Array, number]): Promise<(Uint8Array | undefined)> getAll(): Promise @@ -990,21 +890,6 @@ export class PreimageStatusForStorage extends StorageBase { return 'StatusFor' } - /** - * The request status of a given hash. - */ - get isV1900(): boolean { - return this.getTypeHash() === 'a441b1aa6fac392c566cf52cbd4d9950e3c794632605a828429197db97e04949' - } - - /** - * The request status of a given hash. - */ - get asV1900(): PreimageStatusForStorageV1900 { - assert(this.isV1900) - return this as any - } - /** * The request status of a given hash. */ @@ -1021,23 +906,6 @@ export class PreimageStatusForStorage extends StorageBase { } } -/** - * The request status of a given hash. - */ -export interface PreimageStatusForStorageV1900 { - get(key: Uint8Array): Promise<(v1900.RequestStatus | undefined)> - getAll(): Promise - getMany(keys: Uint8Array[]): Promise<(v1900.RequestStatus | undefined)[]> - getKeys(): Promise - getKeys(key: Uint8Array): Promise - getKeysPaged(pageSize: number): AsyncIterable - getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v1900.RequestStatus][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v1900.RequestStatus][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v1900.RequestStatus][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v1900.RequestStatus][]> -} - /** * The request status of a given hash. */ @@ -1064,41 +932,11 @@ export class ReferendaReferendumInfoForStorage extends StorageBase { return 'ReferendumInfoFor' } - /** - * Information concerning any given referendum. - */ - get isV1900(): boolean { - return this.getTypeHash() === '0adda90d9f31e0c617a1e0f20edeb66fa8a049c4e0257d05a63b5b9d5e8cfa2d' - } - - /** - * Information concerning any given referendum. - */ - get asV1900(): ReferendaReferendumInfoForStorageV1900 { - assert(this.isV1900) - return this as any - } - - /** - * Information concerning any given referendum. - */ - get isV2000(): boolean { - return this.getTypeHash() === 'aa29ea2df895480112bbe5e1e507c4798ac3c0752f2bb0cc4cd0fc997760c5e0' - } - - /** - * Information concerning any given referendum. - */ - get asV2000(): ReferendaReferendumInfoForStorageV2000 { - assert(this.isV2000) - return this as any - } - /** * Information concerning any given referendum. */ get isV2100(): boolean { - return this.getTypeHash() === 'cafd3daa38acd69064af51bb89370940feeb3b34dcfdefba590e61fc80ccb3f0' + return this.getTypeHash() === '27d80b8e86e69bb7510d934b39884be2471c46a1fd44c014d9e9c637062114ba' } /** @@ -1110,55 +948,21 @@ export class ReferendaReferendumInfoForStorage extends StorageBase { } } -/** - * Information concerning any given referendum. - */ -export interface ReferendaReferendumInfoForStorageV1900 { - get(key: number): Promise<(v1900.Type_547 | undefined)> - getAll(): Promise - getMany(keys: number[]): Promise<(v1900.Type_547 | undefined)[]> - getKeys(): Promise - getKeys(key: number): Promise - getKeysPaged(pageSize: number): AsyncIterable - getKeysPaged(pageSize: number, key: number): AsyncIterable - getPairs(): Promise<[k: number, v: v1900.Type_547][]> - getPairs(key: number): Promise<[k: number, v: v1900.Type_547][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v1900.Type_547][]> - getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v1900.Type_547][]> -} - -/** - * Information concerning any given referendum. - */ -export interface ReferendaReferendumInfoForStorageV2000 { - get(key: number): Promise<(v2000.Type_552 | undefined)> - getAll(): Promise - getMany(keys: number[]): Promise<(v2000.Type_552 | undefined)[]> - getKeys(): Promise - getKeys(key: number): Promise - getKeysPaged(pageSize: number): AsyncIterable - getKeysPaged(pageSize: number, key: number): AsyncIterable - getPairs(): Promise<[k: number, v: v2000.Type_552][]> - getPairs(key: number): Promise<[k: number, v: v2000.Type_552][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v2000.Type_552][]> - getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v2000.Type_552][]> -} - /** * Information concerning any given referendum. */ export interface ReferendaReferendumInfoForStorageV2100 { - get(key: number): Promise<(v2100.Type_556 | undefined)> - getAll(): Promise - getMany(keys: number[]): Promise<(v2100.Type_556 | undefined)[]> + get(key: number): Promise<(v2100.Type_480 | undefined)> + getAll(): Promise + getMany(keys: number[]): Promise<(v2100.Type_480 | undefined)[]> getKeys(): Promise getKeys(key: number): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: number): AsyncIterable - getPairs(): Promise<[k: number, v: v2100.Type_556][]> - getPairs(key: number): Promise<[k: number, v: v2100.Type_556][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v2100.Type_556][]> - getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v2100.Type_556][]> + getPairs(): Promise<[k: number, v: v2100.Type_480][]> + getPairs(key: number): Promise<[k: number, v: v2100.Type_480][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v2100.Type_480][]> + getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v2100.Type_480][]> } export class SystemAccountStorage extends StorageBase { @@ -1173,15 +977,15 @@ export class SystemAccountStorage extends StorageBase { /** * The full account information for a particular account ID. */ - get isV40(): boolean { + get isV49(): boolean { return this.getTypeHash() === 'a83a7372c51978aa017bd09db5672f3ea3957f0882455abd9726ac2b6d4b61dc' } /** * The full account information for a particular account ID. */ - get asV40(): SystemAccountStorageV40 { - assert(this.isV40) + get asV49(): SystemAccountStorageV49 { + assert(this.isV49) return this as any } } @@ -1189,18 +993,18 @@ export class SystemAccountStorage extends StorageBase { /** * The full account information for a particular account ID. */ -export interface SystemAccountStorageV40 { - get(key: Uint8Array): Promise - getAll(): Promise - getMany(keys: Uint8Array[]): Promise +export interface SystemAccountStorageV49 { + get(key: Uint8Array): Promise + getAll(): Promise + getMany(keys: Uint8Array[]): Promise getKeys(): Promise getKeys(key: Uint8Array): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: Uint8Array): AsyncIterable - getPairs(): Promise<[k: Uint8Array, v: v40.AccountInfo][]> - getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v40.AccountInfo][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v40.AccountInfo][]> - getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v40.AccountInfo][]> + getPairs(): Promise<[k: Uint8Array, v: v49.AccountInfo][]> + getPairs(key: Uint8Array): Promise<[k: Uint8Array, v: v49.AccountInfo][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: Uint8Array, v: v49.AccountInfo][]> + getPairsPaged(pageSize: number, key: Uint8Array): AsyncIterable<[k: Uint8Array, v: v49.AccountInfo][]> } export class TreasuryProposalsStorage extends StorageBase { @@ -1215,15 +1019,15 @@ export class TreasuryProposalsStorage extends StorageBase { /** * Proposals that have been made. */ - get isV47(): boolean { + get isV49(): boolean { return this.getTypeHash() === '5809021f1759a617a0966e43472afb05550ea26070ada63315ba0f5aab3dcf85' } /** * Proposals that have been made. */ - get asV47(): TreasuryProposalsStorageV47 { - assert(this.isV47) + get asV49(): TreasuryProposalsStorageV49 { + assert(this.isV49) return this as any } } @@ -1231,16 +1035,16 @@ export class TreasuryProposalsStorage extends StorageBase { /** * Proposals that have been made. */ -export interface TreasuryProposalsStorageV47 { - get(key: number): Promise<(v47.TreasuryProposal | undefined)> - getAll(): Promise - getMany(keys: number[]): Promise<(v47.TreasuryProposal | undefined)[]> +export interface TreasuryProposalsStorageV49 { + get(key: number): Promise<(v49.TreasuryProposal | undefined)> + getAll(): Promise + getMany(keys: number[]): Promise<(v49.TreasuryProposal | undefined)[]> getKeys(): Promise getKeys(key: number): Promise getKeysPaged(pageSize: number): AsyncIterable getKeysPaged(pageSize: number, key: number): AsyncIterable - getPairs(): Promise<[k: number, v: v47.TreasuryProposal][]> - getPairs(key: number): Promise<[k: number, v: v47.TreasuryProposal][]> - getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v47.TreasuryProposal][]> - getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v47.TreasuryProposal][]> + getPairs(): Promise<[k: number, v: v49.TreasuryProposal][]> + getPairs(key: number): Promise<[k: number, v: v49.TreasuryProposal][]> + getPairsPaged(pageSize: number): AsyncIterable<[k: number, v: v49.TreasuryProposal][]> + getPairsPaged(pageSize: number, key: number): AsyncIterable<[k: number, v: v49.TreasuryProposal][]> } diff --git a/src/types/v1200.ts b/src/types/v1201.ts similarity index 98% rename from src/types/v1200.ts rename to src/types/v1201.ts index 3dc6a610..6ffffc89 100644 --- a/src/types/v1200.ts +++ b/src/types/v1201.ts @@ -1,12 +1,12 @@ import type {Result, Option} from './support' -export type Type_27 = Type_27_Ok | Type_27_Err +export type Type_41 = Type_41_Ok | Type_41_Err -export interface Type_27_Ok { +export interface Type_41_Ok { __kind: 'Ok' } -export interface Type_27_Err { +export interface Type_41_Err { __kind: 'Err' value: DispatchError } diff --git a/src/types/v1300.ts b/src/types/v1300.ts index e5b91f80..3c641955 100644 --- a/src/types/v1300.ts +++ b/src/types/v1300.ts @@ -1,12 +1,12 @@ import type {Result, Option} from './support' -export type Type_27 = Type_27_Ok | Type_27_Err +export type Type_41 = Type_41_Ok | Type_41_Err -export interface Type_27_Ok { +export interface Type_41_Ok { __kind: 'Ok' } -export interface Type_27_Err { +export interface Type_41_Err { __kind: 'Err' value: DispatchError } diff --git a/src/types/v1400.ts b/src/types/v1401.ts similarity index 97% rename from src/types/v1400.ts rename to src/types/v1401.ts index 8b292a0d..dee78694 100644 --- a/src/types/v1400.ts +++ b/src/types/v1401.ts @@ -1,12 +1,12 @@ import type {Result, Option} from './support' -export type Type_28 = Type_28_Ok | Type_28_Err +export type Type_42 = Type_42_Ok | Type_42_Err -export interface Type_28_Ok { +export interface Type_42_Ok { __kind: 'Ok' } -export interface Type_28_Err { +export interface Type_42_Err { __kind: 'Err' value: DispatchError } diff --git a/src/types/v155.ts b/src/types/v155.ts index b9449ddd..a50dacc1 100644 --- a/src/types/v155.ts +++ b/src/types/v155.ts @@ -1,15 +1,20 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_RandomnessCollectiveFlip | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_RandomnessCollectiveFlip | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_Sudo | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall +} + +export interface Proposal_RandomnessCollectiveFlip { + __kind: 'RandomnessCollectiveFlip' + value: RandomnessCollectiveFlipCall } export interface Proposal_Timestamp { @@ -22,19 +27,39 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Proposal_RandomnessCollectiveFlip { - __kind: 'RandomnessCollectiveFlip' - value: RandomnessCollectiveFlipCall +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Sudo { + __kind: 'Sudo' + value: SudoCall } export interface Proposal_EVM { @@ -47,11 +72,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -77,31 +97,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -250,74 +250,54 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } +export type RandomnessCollectiveFlipCall = never + export type TimestampCall = TimestampCall_set /** @@ -466,235 +446,52 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_set_key { - __kind: 'set_key' +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' new: Uint8Array } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the percent of inflation set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } -export type RandomnessCollectiveFlipCall = never - -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. - */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators + * Set the commission for all collators */ export interface ParachainStakingCall_set_collator_commission { __kind: 'set_collator_commission' @@ -807,298 +604,808 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } +export type AuthorFilterCall = AuthorFilterCall_set_eligible + /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_cancel { - __kind: 'cancel' - when: number - index: number +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Schedule a named task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Cancel a named scheduled task. + * Change your AuthorId. * - * # - * - 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 - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + /** - * Schedule a named task after a delay. + * 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`). * * # - * Same as [`schedule_named`]. + * - 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 SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_72[] } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - /** - * Propose a sensitive action to be taken. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * 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. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * 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. * - * Emits `Proposed`. + * NOTE: Prior to version *12, this was called `as_limited_sub`. * - * Weight: `O(p)` + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_72 } /** - * Signals agreement with a particular proposal. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * May be called from any origin. * - * - `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. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * 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 DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_72[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * 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. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be _Signed_. + * Removes any corresponding announcement(s). * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_72 } /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `CancellationOrigin`. + * The dispatch origin for this call must be _Signed_. * - * -`ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Unregister a proxy account for the sender. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to - * schedule an external referendum. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `ExternalDefaultOrigin`. + * Requires a `Signed` origin. * - * - `proposal_hash`: The preimage hash of the proposal. + * - `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. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number } /** - * 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. + * Removes a previously spawned anonymous proxy. * - * The dispatch of this call must be `FastTrackOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `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. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Started`. + * - `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. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number - delay: number +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Veto and blacklist the external proposal hash. - * - * The dispatch origin of this call must be `VetoOrigin`. + * Publish the hash of a proxy-call that will be made in the future. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * 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. * - * Emits `Vetoed`. + * No more than `MaxPending` announcements may be made at any one time. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` - */ -export interface DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array -} - -/** - * Remove a referendum. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * The dispatch origin of this call must be _Root_. + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. * - * - `ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number +export interface ProxyCall_announce { + __kind: 'announce' + real: Uint8Array + callHash: Uint8Array } /** - * Cancel a proposal queued for enactment. + * Remove a given announcement. * - * The dispatch origin of this call must be _Root_. + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * - `which`: The index of the referendum to cancel. + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_72 +} + +export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as + +/** + * Authenticates the sudo key and dispatches a function call with `Root` origin. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # + */ +export interface SudoCall_sudo { + __kind: 'sudo' + call: Type_72 +} + +/** + * Authenticates the sudo key and dispatches a function call with `Root` origin. + * This function does not check the weight of the call, and instead allows the + * Sudo user to specify the weight of the call. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - The weight of this call is defined by the caller. + * # + */ +export interface SudoCall_sudo_unchecked_weight { + __kind: 'sudo_unchecked_weight' + call: Type_72 + weight: bigint +} + +/** + * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface SudoCall_set_key { + __kind: 'set_key' + new: Uint8Array +} + +/** + * Authenticates the sudo key and dispatches a function call with `Signed` origin from + * a given account. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # + */ +export interface SudoCall_sudo_as { + __kind: 'sudo_as' + who: Uint8Array + call: Type_72 +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances pallet. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_72 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_72 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_72 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_72 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array + votingPeriod: number + delay: number +} + +/** + * 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: Uint8Array +} + +/** + * 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 +} + +/** + * 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`. */ @@ -1312,224 +1619,52 @@ export interface DemocracyCall_remove_other_vote { } /** - * 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: Uint8Array - index: number -} - -/** - * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 - * # + * Enact a proposal from a referendum. For now we just make the weight be the maximum. */ -export interface CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Uint8Array index: number - approve: boolean } /** - * 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. + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. * - * 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 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. * - * 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. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * + `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. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * # - * ## 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 - * # + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1557,7 +1692,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1576,7 +1711,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1611,7 +1746,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1634,7 +1769,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1670,446 +1805,311 @@ export interface TechComitteeCollectiveCall_vote { * - 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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. The first time each - * contributor calls this function pays no fees - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We only set this to "initialized" once we receive index==limit - * This is expected to be executed with batch_all, that atomically initializes contributions - * TODO Should we perform sanity checks here? (i.e., min contribution) - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] - index: number - limit: number -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. + * - up to 3 events + * # */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } /** - * Clear your AuthorId. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. + * 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 AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. + * Set the collective's membership. * - * Removes any corresponding announcement(s). + * - `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. * - * The dispatch origin for this call must be _Signed_. + * Requires root origin. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * 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_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister a proxy account for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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. + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Add an aye or nay vote for the sender to the given proposal. * - * 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.** + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array + index: number + approve: boolean } /** - * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and - * initialize it with a proxy of `proxy_type` for `origin` sender. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * Requires a `Signed` origin. + * May be called by any signed account in order to finish voting and close the proposal. * - * - `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. + * 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. * - * Fails with `Duplicate` if this has already been called in this transaction, from the - * same sender, with the same parameters. + * 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. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * - `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. + * Must be called by the Root origin. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType - index: number - height: number - extIndex: number +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + /** - * 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. + * 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. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` * # */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature +} + +/** + * Collect whatever portion of your reward are currently vested. The first time each + * contributor calls this function pays no fees + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} + +/** + * Update reward address. To determine whether its something we want to keep + */ +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We only set this to "initialized" once we receive index==limit + * This is expected to be executed with batch_all, that atomically initializes contributions + * TODO Should we perform sanity checks here? (i.e., min contribution) + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] + index: number + limit: number } export interface ChangesTrieConfiguration { @@ -2117,113 +2117,149 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_RandomnessCollectiveFlip | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_72 = Type_72_System | Type_72_ParachainSystem | Type_72_RandomnessCollectiveFlip | Type_72_Timestamp | Type_72_Balances | Type_72_ParachainStaking | Type_72_AuthorInherent | Type_72_AuthorFilter | Type_72_AuthorMapping | Type_72_Utility | Type_72_Proxy | Type_72_Sudo | Type_72_EVM | Type_72_Ethereum | Type_72_Scheduler | Type_72_Democracy | Type_72_CouncilCollective | Type_72_TechComitteeCollective | Type_72_Treasury | Type_72_CrowdloanRewards -export interface Type_35_System { +export interface Type_72_System { __kind: 'System' value: SystemCall } -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_72_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall +} + +export interface Type_72_RandomnessCollectiveFlip { + __kind: 'RandomnessCollectiveFlip' + value: RandomnessCollectiveFlipCall } -export interface Type_35_Timestamp { +export interface Type_72_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_35_Balances { +export interface Type_72_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Type_72_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Type_35_RandomnessCollectiveFlip { - __kind: 'RandomnessCollectiveFlip' - value: RandomnessCollectiveFlipCall +export interface Type_72_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_72_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_72_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_72_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_72_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_72_Sudo { + __kind: 'Sudo' + value: SudoCall } -export interface Type_35_EVM { +export interface Type_72_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_35_Ethereum { +export interface Type_72_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { +export interface Type_72_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_35_Democracy { +export interface Type_72_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_35_CouncilCollective { +export interface Type_72_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_35_TechComitteeCollective { +export interface Type_72_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_35_Treasury { +export interface Type_72_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_72_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2236,12 +2272,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2301,36 +2331,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v159.ts b/src/types/v159.ts index c67c9fc8..76a00394 100644 --- a/src/types/v159.ts +++ b/src/types/v159.ts @@ -1,15 +1,15 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_Sudo | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } export interface Proposal_Timestamp { @@ -22,16 +22,41 @@ export interface Proposal_Balances { value: BalancesCall } +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall +} + +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + export interface Proposal_Sudo { __kind: 'Sudo' value: SudoCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - export interface Proposal_EVM { __kind: 'EVM' value: EVMCall @@ -42,11 +67,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -72,31 +92,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -245,72 +245,50 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } export type TimestampCall = TimestampCall_set @@ -461,248 +439,67 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_set_key { - __kind: 'set_key' +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' new: Uint8Array } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the percent of inflation set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade +/** + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round + */ +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number +} /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the commission for all collators */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_collator_commission { + __kind: 'set_collator_commission' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. + * Set blocks per round + * - if called with `new` less than length of current round, will transition immediately + * in the next block + * - also updates per-round inflation config */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number +export interface ParachainStakingCall_set_blocks_per_round { + __kind: 'set_blocks_per_round' + new: number } /** @@ -800,298 +597,808 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } -/** - * 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 -} +export type AuthorFilterCall = AuthorFilterCall_set_eligible /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Cancel a named scheduled task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Change your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Schedule a named task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule_named`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all /** - * Propose a sensitive action to be taken. + * Send a batch of dispatch calls. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * May be called from any origin. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * - `calls`: The calls to be dispatched from the same origin. * - * Emits `Proposed`. + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). * - * Weight: `O(p)` + * # + * - 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 DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_71[] } /** - * Signals agreement with a particular proposal. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * 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. * - * - `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. + * 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. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_71 } /** - * 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. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_. + * May be called from any origin. * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_71[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be `CancellationOrigin`. + * Removes any corresponding announcement(s). * - * -`ref_index`: The index of the referendum to cancel. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(1)`. + * 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 DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister a proxy account for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * 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. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `FastTrackOrigin`. + * Requires a `Signed` origin. * - * - `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. + * - `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. * - * Emits `Started`. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType delay: number + index: number } /** - * Veto and blacklist the external proposal hash. + * Removes a previously spawned anonymous proxy. * - * The dispatch origin of this call must be `VetoOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Vetoed`. + * - `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. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` + * 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 DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Remove a referendum. - * - * The dispatch origin of this call must be _Root_. + * Publish the hash of a proxy-call that will be made in the future. * - * - `ref_index`: The index of the referendum to cancel. + * 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. * - * # Weight: `O(1)`. - */ -export interface DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number -} - -/** - * Cancel a proposal queued for enactment. + * No more than `MaxPending` announcements may be made at any one time. * - * The dispatch origin of this call must be _Root_. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * - `which`: The index of the referendum to cancel. + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 +} + +export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as + +/** + * Authenticates the sudo key and dispatches a function call with `Root` origin. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # + */ +export interface SudoCall_sudo { + __kind: 'sudo' + call: Type_71 +} + +/** + * Authenticates the sudo key and dispatches a function call with `Root` origin. + * This function does not check the weight of the call, and instead allows the + * Sudo user to specify the weight of the call. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - The weight of this call is defined by the caller. + * # + */ +export interface SudoCall_sudo_unchecked_weight { + __kind: 'sudo_unchecked_weight' + call: Type_71 + weight: bigint +} + +/** + * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface SudoCall_set_key { + __kind: 'set_key' + new: Uint8Array +} + +/** + * Authenticates the sudo key and dispatches a function call with `Signed` origin from + * a given account. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # + */ +export interface SudoCall_sudo_as { + __kind: 'sudo_as' + who: Uint8Array + call: Type_71 +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances pallet. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_71 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_71 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array + votingPeriod: number + delay: number +} + +/** + * 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: Uint8Array +} + +/** + * 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 +} + +/** + * 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`. */ @@ -1304,225 +1611,53 @@ export interface DemocracyCall_remove_other_vote { index: 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: Uint8Array - index: number -} - -/** - * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 - * # +/** + * Enact a proposal from a referendum. For now we just make the weight be the maximum. */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' proposalHash: Uint8Array index: number - proposalWeightBound: bigint - lengthBound: number } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. * - * Must be called by the Root origin. + * 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. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * - `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 CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array + maybeRefIndex: (number | undefined) } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +/** + * 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 +} + +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1550,7 +1685,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1569,7 +1704,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1604,7 +1739,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1627,7 +1762,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1657,458 +1792,323 @@ export interface TechComitteeCollectiveCall_vote { * - `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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end relay block is higher than the init relay block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We check that the number of contributors inserted is less than T::MaxInitContributors::get() - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. + * - `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 AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. - * - * Removes any corresponding announcement(s). + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal + /** - * Register a proxy account for the sender that is able to make calls on its behalf. + * Set the collective's membership. * - * The dispatch origin for this call must be _Signed_. + * - `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. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Unregister a proxy account for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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.** + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * 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. + * Add an aye or nay vote for the sender to the given proposal. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array index: number + approve: boolean } /** - * Removes a previously spawned anonymous proxy. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * WARNING: **All access to this account will be lost.** Any funds held in it will be - * inaccessible. + * May be called by any signed account in order to finish voting and close the proposal. * - * Requires a `Signed` origin, and the sender account must have been created by a call to - * `anonymous` with corresponding parameters. + * 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. * - * - `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. + * 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. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number - height: number - extIndex: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # + */ +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array +} + +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + +/** + * 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 ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature +} + +/** + * Collect whatever portion of your reward are currently vested. + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} + +/** + * Update reward address. To determine whether its something we want to keep + */ +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array +} + +/** + * This extrinsic completes the initialization if some checks are fullfiled. These checks are: + * -The reward contribution money matches the crowdloan pot + * -The end relay block is higher than the init relay block + * -The initialization has not complete yet + */ +export interface CrowdloanRewardsCall_complete_initialization { + __kind: 'complete_initialization' + leaseEndingBlock: number +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We check that the number of contributors inserted is less than T::MaxInitContributors::get() + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] } export interface ChangesTrieConfiguration { @@ -2116,108 +2116,144 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_71 = Type_71_System | Type_71_ParachainSystem | Type_71_Timestamp | Type_71_Balances | Type_71_ParachainStaking | Type_71_AuthorInherent | Type_71_AuthorFilter | Type_71_AuthorMapping | Type_71_Utility | Type_71_Proxy | Type_71_Sudo | Type_71_EVM | Type_71_Ethereum | Type_71_Scheduler | Type_71_Democracy | Type_71_CouncilCollective | Type_71_TechComitteeCollective | Type_71_Treasury | Type_71_CrowdloanRewards -export interface Type_35_System { +export interface Type_71_System { __kind: 'System' value: SystemCall } -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_71_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export interface Type_35_Timestamp { +export interface Type_71_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_35_Balances { +export interface Type_71_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Type_71_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_71_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Type_71_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_71_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_71_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_71_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_71_Sudo { + __kind: 'Sudo' + value: SudoCall } -export interface Type_35_EVM { +export interface Type_71_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_35_Ethereum { +export interface Type_71_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { +export interface Type_71_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_35_Democracy { +export interface Type_71_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_35_CouncilCollective { +export interface Type_71_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_35_TechComitteeCollective { +export interface Type_71_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_35_Treasury { +export interface Type_71_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_71_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2230,12 +2266,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2295,36 +2325,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v1603.ts b/src/types/v1605.ts similarity index 95% rename from src/types/v1603.ts rename to src/types/v1605.ts index 62a9efdc..1cd0650e 100644 --- a/src/types/v1603.ts +++ b/src/types/v1605.ts @@ -1,12 +1,12 @@ import type {Result, Option} from './support' -export type Type_29 = Type_29_Ok | Type_29_Err +export type Type_47 = Type_47_Ok | Type_47_Err -export interface Type_29_Ok { +export interface Type_47_Ok { __kind: 'Ok' } -export interface Type_29_Err { +export interface Type_47_Err { __kind: 'Err' value: DispatchError } diff --git a/src/types/v1700.ts b/src/types/v1701.ts similarity index 100% rename from src/types/v1700.ts rename to src/types/v1701.ts diff --git a/src/types/v1800.ts b/src/types/v1801.ts similarity index 100% rename from src/types/v1800.ts rename to src/types/v1801.ts diff --git a/src/types/v1900.ts b/src/types/v1900.ts deleted file mode 100644 index e727f10f..00000000 --- a/src/types/v1900.ts +++ /dev/null @@ -1,527 +0,0 @@ -import type {Result, Option} from './support' - -export interface Tally { - ayes: bigint - nays: bigint - support: bigint -} - -export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x - -export interface Conviction_None { - __kind: '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 type AccountVote = AccountVote_Standard | AccountVote_Split - -export interface AccountVote_Standard { - __kind: 'Standard' - vote: number - balance: bigint -} - -export interface AccountVote_Split { - __kind: 'Split' - aye: bigint - nay: bigint -} - -export type Type_535 = Type_535_Casting | Type_535_Delegating - -export interface Type_535_Casting { - __kind: 'Casting' - value: Casting -} - -export interface Type_535_Delegating { - __kind: 'Delegating' - value: Delegating -} - -export type RequestStatus = RequestStatus_Unrequested | RequestStatus_Requested - -export interface RequestStatus_Unrequested { - __kind: 'Unrequested' - value: ([Uint8Array, bigint] | undefined) -} - -export interface RequestStatus_Requested { - __kind: 'Requested' - value: number -} - -export type Type_547 = Type_547_Ongoing | Type_547_Approved | Type_547_Rejected | Type_547_Cancelled | Type_547_TimedOut | Type_547_Killed - -export interface Type_547_Ongoing { - __kind: 'Ongoing' - value: Type_548 -} - -export interface Type_547_Approved { - __kind: 'Approved' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_547_Rejected { - __kind: 'Rejected' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_547_Cancelled { - __kind: 'Cancelled' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_547_TimedOut { - __kind: 'TimedOut' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_547_Killed { - __kind: 'Killed' - value: number -} - -export interface Casting { - votes: [number, AccountVote][] - delegations: Type_540 - prior: [number, bigint] -} - -export interface Delegating { - balance: bigint - target: Uint8Array - conviction: Conviction - delegations: Type_540 - prior: [number, bigint] -} - -export interface Type_548 { - track: number - origin: OriginCaller - proposalHash: Uint8Array - enactment: DispatchTime - submitted: number - submissionDeposit: Deposit - decisionDeposit: (Deposit | undefined) - deciding: (DecidingStatus | undefined) - tally: Tally - inQueue: boolean - alarm: ([number, [number, number]] | undefined) -} - -export interface Deposit { - who: Uint8Array - amount: bigint -} - -export interface Type_540 { - votes: bigint - capital: bigint -} - -export type OriginCaller = OriginCaller_system | OriginCaller_Ethereum | OriginCaller_CouncilCollective | OriginCaller_TechCommitteeCollective | OriginCaller_CumulusXcm | OriginCaller_PolkadotXcm | OriginCaller_EthereumXcm | OriginCaller_TreasuryCouncilCollective | OriginCaller_Origins | OriginCaller_Void - -export interface OriginCaller_system { - __kind: 'system' - value: RawOrigin -} - -export interface OriginCaller_Ethereum { - __kind: 'Ethereum' - value: Type_336 -} - -export interface OriginCaller_CouncilCollective { - __kind: 'CouncilCollective' - value: Type_337 -} - -export interface OriginCaller_TechCommitteeCollective { - __kind: 'TechCommitteeCollective' - value: Type_338 -} - -export interface OriginCaller_CumulusXcm { - __kind: 'CumulusXcm' - value: Origin -} - -export interface OriginCaller_PolkadotXcm { - __kind: 'PolkadotXcm' - value: Type_340 -} - -export interface OriginCaller_EthereumXcm { - __kind: 'EthereumXcm' - value: Type_341 -} - -export interface OriginCaller_TreasuryCouncilCollective { - __kind: 'TreasuryCouncilCollective' - value: Type_342 -} - -export interface OriginCaller_Origins { - __kind: 'Origins' - value: Type_343 -} - -export interface OriginCaller_Void { - __kind: 'Void' - value: Void -} - -export type DispatchTime = DispatchTime_At | DispatchTime_After - -export interface DispatchTime_At { - __kind: 'At' - value: number -} - -export interface DispatchTime_After { - __kind: 'After' - value: number -} - -export interface DecidingStatus { - since: number - confirming: (number | undefined) -} - -export type RawOrigin = RawOrigin_Root | RawOrigin_Signed | RawOrigin_None - -export interface RawOrigin_Root { - __kind: 'Root' -} - -export interface RawOrigin_Signed { - __kind: 'Signed' - value: Uint8Array -} - -export interface RawOrigin_None { - __kind: 'None' -} - -export type Type_336 = Type_336_EthereumTransaction - -export interface Type_336_EthereumTransaction { - __kind: 'EthereumTransaction' - value: Uint8Array -} - -export type Type_337 = Type_337_Members | Type_337_Member | Type_337__Phantom - -export interface Type_337_Members { - __kind: 'Members' - value: [number, number] -} - -export interface Type_337_Member { - __kind: 'Member' - value: Uint8Array -} - -export interface Type_337__Phantom { - __kind: '_Phantom' -} - -export type Type_338 = Type_338_Members | Type_338_Member | Type_338__Phantom - -export interface Type_338_Members { - __kind: 'Members' - value: [number, number] -} - -export interface Type_338_Member { - __kind: 'Member' - value: Uint8Array -} - -export interface Type_338__Phantom { - __kind: '_Phantom' -} - -export type Origin = Origin_Relay | Origin_SiblingParachain - -export interface Origin_Relay { - __kind: 'Relay' -} - -export interface Origin_SiblingParachain { - __kind: 'SiblingParachain' - value: number -} - -export type Type_340 = Type_340_Xcm | Type_340_Response - -export interface Type_340_Xcm { - __kind: 'Xcm' - value: V1MultiLocation -} - -export interface Type_340_Response { - __kind: 'Response' - value: V1MultiLocation -} - -export type Type_341 = Type_341_XcmEthereumTransaction - -export interface Type_341_XcmEthereumTransaction { - __kind: 'XcmEthereumTransaction' - value: Uint8Array -} - -export type Type_342 = Type_342_Members | Type_342_Member | Type_342__Phantom - -export interface Type_342_Members { - __kind: 'Members' - value: [number, number] -} - -export interface Type_342_Member { - __kind: 'Member' - value: Uint8Array -} - -export interface Type_342__Phantom { - __kind: '_Phantom' -} - -export type Type_343 = Type_343_Treasurer | Type_343_ReferendumCanceller | Type_343_ReferendumKiller | Type_343_SmallSpender | Type_343_MediumSpender | Type_343_BigSpender | Type_343_WhitelistedCaller - -export interface Type_343_Treasurer { - __kind: 'Treasurer' -} - -export interface Type_343_ReferendumCanceller { - __kind: 'ReferendumCanceller' -} - -export interface Type_343_ReferendumKiller { - __kind: 'ReferendumKiller' -} - -export interface Type_343_SmallSpender { - __kind: 'SmallSpender' -} - -export interface Type_343_MediumSpender { - __kind: 'MediumSpender' -} - -export interface Type_343_BigSpender { - __kind: 'BigSpender' -} - -export interface Type_343_WhitelistedCaller { - __kind: 'WhitelistedCaller' -} - -export type Void = never - -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_Parachain | V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_PalletInstance | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_Plurality - -export interface V1Junction_Parachain { - __kind: 'Parachain' - value: number -} - -export interface V1Junction_AccountId32 { - __kind: 'AccountId32' - network: V0NetworkId - id: Uint8Array -} - -export interface V1Junction_AccountIndex64 { - __kind: 'AccountIndex64' - network: V0NetworkId - index: bigint -} - -export interface V1Junction_AccountKey20 { - __kind: 'AccountKey20' - network: V0NetworkId - key: Uint8Array -} - -export interface V1Junction_PalletInstance { - __kind: 'PalletInstance' - value: number -} - -export interface V1Junction_GeneralIndex { - __kind: 'GeneralIndex' - value: bigint -} - -export interface V1Junction_GeneralKey { - __kind: 'GeneralKey' - value: Uint8Array -} - -export interface V1Junction_OnlyChild { - __kind: 'OnlyChild' -} - -export interface V1Junction_Plurality { - __kind: 'Plurality' - id: V0BodyId - part: V0BodyPart -} - -export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Named | V0NetworkId_Polkadot | V0NetworkId_Kusama - -export interface V0NetworkId_Any { - __kind: 'Any' -} - -export interface V0NetworkId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface V0NetworkId_Polkadot { - __kind: 'Polkadot' -} - -export interface V0NetworkId_Kusama { - __kind: 'Kusama' -} - -export type V0BodyId = V0BodyId_Unit | V0BodyId_Named | V0BodyId_Index | V0BodyId_Executive | V0BodyId_Technical | V0BodyId_Legislative | V0BodyId_Judicial - -export interface V0BodyId_Unit { - __kind: 'Unit' -} - -export interface V0BodyId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface V0BodyId_Index { - __kind: 'Index' - value: number -} - -export interface V0BodyId_Executive { - __kind: 'Executive' -} - -export interface V0BodyId_Technical { - __kind: 'Technical' -} - -export interface V0BodyId_Legislative { - __kind: 'Legislative' -} - -export interface V0BodyId_Judicial { - __kind: 'Judicial' -} - -export type V0BodyPart = V0BodyPart_Voice | V0BodyPart_Members | V0BodyPart_Fraction | V0BodyPart_AtLeastProportion | V0BodyPart_MoreThanProportion - -export interface V0BodyPart_Voice { - __kind: 'Voice' -} - -export interface V0BodyPart_Members { - __kind: 'Members' - count: number -} - -export interface V0BodyPart_Fraction { - __kind: 'Fraction' - nom: number - denom: number -} - -export interface V0BodyPart_AtLeastProportion { - __kind: 'AtLeastProportion' - nom: number - denom: number -} - -export interface V0BodyPart_MoreThanProportion { - __kind: 'MoreThanProportion' - nom: number - denom: number -} diff --git a/src/types/v200.ts b/src/types/v200.ts index eef1bebe..92e4df7b 100644 --- a/src/types/v200.ts +++ b/src/types/v200.ts @@ -1,15 +1,15 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } export interface Proposal_Timestamp { @@ -22,9 +22,34 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall +} + +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall } export interface Proposal_EVM { @@ -37,11 +62,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -67,31 +87,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -240,72 +240,50 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } export type TimestampCall = TimestampCall_set @@ -456,115 +434,6 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - -/** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. - */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number -} - -/** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. - */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** @@ -725,216 +594,654 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } +export type AuthorFilterCall = AuthorFilterCall_set_eligible + /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_cancel { - __kind: 'cancel' - when: number - index: number +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Schedule a named task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Cancel a named scheduled task. + * Change your AuthorId. * - * # - * - 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 - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + /** - * Schedule a named task after a delay. + * 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`). * * # - * Same as [`schedule_named`]. + * - 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 SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_71[] } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - /** - * Propose a sensitive action to be taken. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * 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. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * 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. * - * Emits `Proposed`. + * NOTE: Prior to version *12, this was called `as_limited_sub`. * - * Weight: `O(p)` + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_71 } /** - * Signals agreement with a particular proposal. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * May be called from any origin. * - * - `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. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * 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 DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_71[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * 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. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be _Signed_. + * Removes any corresponding announcement(s). * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 } /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `CancellationOrigin`. + * The dispatch origin for this call must be _Signed_. * - * -`ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Unregister a proxy account for the sender. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` - */ -export interface DemocracyCall_external_propose_majority { + * # + * Weight is a function of the number of proxies the user has (P). + * # + */ +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' +} + +/** + * 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: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances pallet. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_71 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_71 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array } @@ -1239,215 +1546,43 @@ export interface DemocracyCall_enact_proposal { } /** - * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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. + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. * - * 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 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. * - * 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. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * + `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. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * # - * ## 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 - * # + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1475,7 +1610,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1494,7 +1629,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1529,7 +1664,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1552,7 +1687,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1586,454 +1721,319 @@ export interface TechComitteeCollectiveCall_vote { * - `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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end relay block is higher than the init relay block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We check that the number of contributors inserted is less than T::MaxInitContributors::get() - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. + * - 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 AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } /** - * Clear your AuthorId. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. + * 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 AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. + * Set the collective's membership. * - * Removes any corresponding announcement(s). + * - `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. * - * The dispatch origin for this call must be _Signed_. + * Requires root origin. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * 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_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister a proxy account for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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. + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Add an aye or nay vote for the sender to the given proposal. * - * 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.** + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array + index: number + approve: boolean } /** - * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and - * initialize it with a proxy of `proxy_type` for `origin` sender. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * Requires a `Signed` origin. + * May be called by any signed account in order to finish voting and close the proposal. * - * - `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. + * 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. * - * Fails with `Duplicate` if this has already been called in this transaction, from the - * same sender, with the same parameters. + * 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. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * - `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. + * Must be called by the Root origin. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType - index: number - height: number - extIndex: number +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + /** - * 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. + * 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. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` * # */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature +} + +/** + * Collect whatever portion of your reward are currently vested. + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} + +/** + * Update reward address. To determine whether its something we want to keep + */ +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array +} + +/** + * This extrinsic completes the initialization if some checks are fullfiled. These checks are: + * -The reward contribution money matches the crowdloan pot + * -The end relay block is higher than the init relay block + * -The initialization has not complete yet + */ +export interface CrowdloanRewardsCall_complete_initialization { + __kind: 'complete_initialization' + leaseEndingBlock: number +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We check that the number of contributors inserted is less than T::MaxInitContributors::get() + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] } export interface ChangesTrieConfiguration { @@ -2041,103 +2041,139 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_71 = Type_71_System | Type_71_ParachainSystem | Type_71_Timestamp | Type_71_Balances | Type_71_ParachainStaking | Type_71_AuthorInherent | Type_71_AuthorFilter | Type_71_AuthorMapping | Type_71_Utility | Type_71_Proxy | Type_71_EVM | Type_71_Ethereum | Type_71_Scheduler | Type_71_Democracy | Type_71_CouncilCollective | Type_71_TechComitteeCollective | Type_71_Treasury | Type_71_CrowdloanRewards -export interface Type_35_System { +export interface Type_71_System { __kind: 'System' value: SystemCall } -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_71_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export interface Type_35_Timestamp { +export interface Type_71_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_35_Balances { +export interface Type_71_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_71_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall +} + +export interface Type_71_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Type_71_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_71_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_71_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_71_Proxy { + __kind: 'Proxy' + value: ProxyCall } -export interface Type_35_EVM { +export interface Type_71_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_35_Ethereum { +export interface Type_71_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { +export interface Type_71_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_35_Democracy { +export interface Type_71_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_35_CouncilCollective { +export interface Type_71_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_35_TechComitteeCollective { +export interface Type_71_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_35_Treasury { +export interface Type_71_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_71_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2150,12 +2186,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2215,36 +2245,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v2000.ts b/src/types/v2000.ts index d9162615..bcad01ab 100644 --- a/src/types/v2000.ts +++ b/src/types/v2000.ts @@ -1,5 +1,16 @@ import type {Result, Option} from './support' +export type Type_50 = Type_50_Ok | Type_50_Err + +export interface Type_50_Ok { + __kind: 'Ok' +} + +export interface Type_50_Err { + __kind: 'Err' + value: DispatchError +} + export type Bounded = Bounded_Legacy | Bounded_Inline | Bounded_Lookup export interface Bounded_Legacy { @@ -18,23 +29,6 @@ export interface Bounded_Lookup { len: number } -export interface Tally { - ayes: bigint - nays: bigint - support: bigint -} - -export type Type_31 = Type_31_Ok | Type_31_Err - -export interface Type_31_Ok { - __kind: 'Ok' -} - -export interface Type_31_Err { - __kind: 'Err' - value: DispatchError -} - export type ReferendumInfo = ReferendumInfo_Ongoing | ReferendumInfo_Finished export interface ReferendumInfo_Ongoing { @@ -63,38 +57,6 @@ export interface RequestStatus_Requested { len: (number | undefined) } -export type Type_552 = Type_552_Ongoing | Type_552_Approved | Type_552_Rejected | Type_552_Cancelled | Type_552_TimedOut | Type_552_Killed - -export interface Type_552_Ongoing { - __kind: 'Ongoing' - value: Type_553 -} - -export interface Type_552_Approved { - __kind: 'Approved' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_552_Rejected { - __kind: 'Rejected' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_552_Cancelled { - __kind: 'Cancelled' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_552_TimedOut { - __kind: 'TimedOut' - value: [number, Deposit, (Deposit | undefined)] -} - -export interface Type_552_Killed { - __kind: 'Killed' - value: number -} - export type DispatchError = DispatchError_Other | DispatchError_CannotLookup | DispatchError_BadOrigin | DispatchError_Module | DispatchError_ConsumerRemaining | DispatchError_NoProviders | DispatchError_TooManyConsumers | DispatchError_Token | DispatchError_Arithmetic | DispatchError_Transactional | DispatchError_Exhausted | DispatchError_Corruption | DispatchError_Unavailable export interface DispatchError_Other { @@ -158,26 +120,7 @@ export interface ReferendumStatus { proposal: Bounded threshold: VoteThreshold delay: number - tally: Type_433 -} - -export interface Type_553 { - track: number - origin: OriginCaller - proposal: Bounded - enactment: DispatchTime - submitted: number - submissionDeposit: Deposit - decisionDeposit: (Deposit | undefined) - deciding: (DecidingStatus | undefined) tally: Tally - inQueue: boolean - alarm: ([number, [number, number]] | undefined) -} - -export interface Deposit { - who: Uint8Array - amount: bigint } export interface ModuleError { @@ -253,390 +196,8 @@ export interface VoteThreshold_SimpleMajority { __kind: 'SimpleMajority' } -export interface Type_433 { +export interface Tally { ayes: bigint nays: bigint turnout: bigint } - -export type OriginCaller = OriginCaller_system | OriginCaller_Ethereum | OriginCaller_CouncilCollective | OriginCaller_TechCommitteeCollective | OriginCaller_CumulusXcm | OriginCaller_PolkadotXcm | OriginCaller_EthereumXcm | OriginCaller_TreasuryCouncilCollective | OriginCaller_Origins | OriginCaller_Void - -export interface OriginCaller_system { - __kind: 'system' - value: RawOrigin -} - -export interface OriginCaller_Ethereum { - __kind: 'Ethereum' - value: Type_154 -} - -export interface OriginCaller_CouncilCollective { - __kind: 'CouncilCollective' - value: Type_155 -} - -export interface OriginCaller_TechCommitteeCollective { - __kind: 'TechCommitteeCollective' - value: Type_156 -} - -export interface OriginCaller_CumulusXcm { - __kind: 'CumulusXcm' - value: Origin -} - -export interface OriginCaller_PolkadotXcm { - __kind: 'PolkadotXcm' - value: Type_158 -} - -export interface OriginCaller_EthereumXcm { - __kind: 'EthereumXcm' - value: Type_159 -} - -export interface OriginCaller_TreasuryCouncilCollective { - __kind: 'TreasuryCouncilCollective' - value: Type_160 -} - -export interface OriginCaller_Origins { - __kind: 'Origins' - value: Type_161 -} - -export interface OriginCaller_Void { - __kind: 'Void' - value: Void -} - -export type DispatchTime = DispatchTime_At | DispatchTime_After - -export interface DispatchTime_At { - __kind: 'At' - value: number -} - -export interface DispatchTime_After { - __kind: 'After' - value: number -} - -export interface DecidingStatus { - since: number - confirming: (number | undefined) -} - -export type RawOrigin = RawOrigin_Root | RawOrigin_Signed | RawOrigin_None - -export interface RawOrigin_Root { - __kind: 'Root' -} - -export interface RawOrigin_Signed { - __kind: 'Signed' - value: Uint8Array -} - -export interface RawOrigin_None { - __kind: 'None' -} - -export type Type_154 = Type_154_EthereumTransaction - -export interface Type_154_EthereumTransaction { - __kind: 'EthereumTransaction' - value: Uint8Array -} - -export type Type_155 = Type_155_Members | Type_155_Member | Type_155__Phantom - -export interface Type_155_Members { - __kind: 'Members' - value: [number, number] -} - -export interface Type_155_Member { - __kind: 'Member' - value: Uint8Array -} - -export interface Type_155__Phantom { - __kind: '_Phantom' -} - -export type Type_156 = Type_156_Members | Type_156_Member | Type_156__Phantom - -export interface Type_156_Members { - __kind: 'Members' - value: [number, number] -} - -export interface Type_156_Member { - __kind: 'Member' - value: Uint8Array -} - -export interface Type_156__Phantom { - __kind: '_Phantom' -} - -export type Origin = Origin_Relay | Origin_SiblingParachain - -export interface Origin_Relay { - __kind: 'Relay' -} - -export interface Origin_SiblingParachain { - __kind: 'SiblingParachain' - value: number -} - -export type Type_158 = Type_158_Xcm | Type_158_Response - -export interface Type_158_Xcm { - __kind: 'Xcm' - value: V1MultiLocation -} - -export interface Type_158_Response { - __kind: 'Response' - value: V1MultiLocation -} - -export type Type_159 = Type_159_XcmEthereumTransaction - -export interface Type_159_XcmEthereumTransaction { - __kind: 'XcmEthereumTransaction' - value: Uint8Array -} - -export type Type_160 = Type_160_Members | Type_160_Member | Type_160__Phantom - -export interface Type_160_Members { - __kind: 'Members' - value: [number, number] -} - -export interface Type_160_Member { - __kind: 'Member' - value: Uint8Array -} - -export interface Type_160__Phantom { - __kind: '_Phantom' -} - -export type Type_161 = Type_161_Treasurer | Type_161_ReferendumCanceller | Type_161_ReferendumKiller | Type_161_SmallSpender | Type_161_MediumSpender | Type_161_BigSpender | Type_161_WhitelistedCaller - -export interface Type_161_Treasurer { - __kind: 'Treasurer' -} - -export interface Type_161_ReferendumCanceller { - __kind: 'ReferendumCanceller' -} - -export interface Type_161_ReferendumKiller { - __kind: 'ReferendumKiller' -} - -export interface Type_161_SmallSpender { - __kind: 'SmallSpender' -} - -export interface Type_161_MediumSpender { - __kind: 'MediumSpender' -} - -export interface Type_161_BigSpender { - __kind: 'BigSpender' -} - -export interface Type_161_WhitelistedCaller { - __kind: 'WhitelistedCaller' -} - -export type Void = never - -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_Parachain | V1Junction_AccountId32 | V1Junction_AccountIndex64 | V1Junction_AccountKey20 | V1Junction_PalletInstance | V1Junction_GeneralIndex | V1Junction_GeneralKey | V1Junction_OnlyChild | V1Junction_Plurality - -export interface V1Junction_Parachain { - __kind: 'Parachain' - value: number -} - -export interface V1Junction_AccountId32 { - __kind: 'AccountId32' - network: V0NetworkId - id: Uint8Array -} - -export interface V1Junction_AccountIndex64 { - __kind: 'AccountIndex64' - network: V0NetworkId - index: bigint -} - -export interface V1Junction_AccountKey20 { - __kind: 'AccountKey20' - network: V0NetworkId - key: Uint8Array -} - -export interface V1Junction_PalletInstance { - __kind: 'PalletInstance' - value: number -} - -export interface V1Junction_GeneralIndex { - __kind: 'GeneralIndex' - value: bigint -} - -export interface V1Junction_GeneralKey { - __kind: 'GeneralKey' - value: Uint8Array -} - -export interface V1Junction_OnlyChild { - __kind: 'OnlyChild' -} - -export interface V1Junction_Plurality { - __kind: 'Plurality' - id: V0BodyId - part: V0BodyPart -} - -export type V0NetworkId = V0NetworkId_Any | V0NetworkId_Named | V0NetworkId_Polkadot | V0NetworkId_Kusama - -export interface V0NetworkId_Any { - __kind: 'Any' -} - -export interface V0NetworkId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface V0NetworkId_Polkadot { - __kind: 'Polkadot' -} - -export interface V0NetworkId_Kusama { - __kind: 'Kusama' -} - -export type V0BodyId = V0BodyId_Unit | V0BodyId_Named | V0BodyId_Index | V0BodyId_Executive | V0BodyId_Technical | V0BodyId_Legislative | V0BodyId_Judicial - -export interface V0BodyId_Unit { - __kind: 'Unit' -} - -export interface V0BodyId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface V0BodyId_Index { - __kind: 'Index' - value: number -} - -export interface V0BodyId_Executive { - __kind: 'Executive' -} - -export interface V0BodyId_Technical { - __kind: 'Technical' -} - -export interface V0BodyId_Legislative { - __kind: 'Legislative' -} - -export interface V0BodyId_Judicial { - __kind: 'Judicial' -} - -export type V0BodyPart = V0BodyPart_Voice | V0BodyPart_Members | V0BodyPart_Fraction | V0BodyPart_AtLeastProportion | V0BodyPart_MoreThanProportion - -export interface V0BodyPart_Voice { - __kind: 'Voice' -} - -export interface V0BodyPart_Members { - __kind: 'Members' - count: number -} - -export interface V0BodyPart_Fraction { - __kind: 'Fraction' - nom: number - denom: number -} - -export interface V0BodyPart_AtLeastProportion { - __kind: 'AtLeastProportion' - nom: number - denom: number -} - -export interface V0BodyPart_MoreThanProportion { - __kind: 'MoreThanProportion' - nom: number - denom: number -} diff --git a/src/types/v2100.ts b/src/types/v2100.ts index 0ad5e190..072146ef 100644 --- a/src/types/v2100.ts +++ b/src/types/v2100.ts @@ -1,38 +1,132 @@ import type {Result, Option} from './support' -export type Type_556 = Type_556_Ongoing | Type_556_Approved | Type_556_Rejected | Type_556_Cancelled | Type_556_TimedOut | Type_556_Killed +export interface Tally { + ayes: bigint + nays: bigint + support: bigint +} + +export type Bounded = Bounded_Legacy | Bounded_Inline | Bounded_Lookup + +export interface Bounded_Legacy { + __kind: 'Legacy' + hash: Uint8Array +} + +export interface Bounded_Inline { + __kind: 'Inline' + value: Uint8Array +} + +export interface Bounded_Lookup { + __kind: 'Lookup' + hash: Uint8Array + len: number +} + +export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x + +export interface Conviction_None { + __kind: '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 type AccountVote = AccountVote_Standard | AccountVote_Split -export interface Type_556_Ongoing { +export interface AccountVote_Standard { + __kind: 'Standard' + vote: number + balance: bigint +} + +export interface AccountVote_Split { + __kind: 'Split' + aye: bigint + nay: bigint +} + +export type Type_468 = Type_468_Casting | Type_468_Delegating + +export interface Type_468_Casting { + __kind: 'Casting' + value: Casting +} + +export interface Type_468_Delegating { + __kind: 'Delegating' + value: Delegating +} + +export type Type_480 = Type_480_Ongoing | Type_480_Approved | Type_480_Rejected | Type_480_Cancelled | Type_480_TimedOut | Type_480_Killed + +export interface Type_480_Ongoing { __kind: 'Ongoing' - value: Type_557 + value: Type_481 } -export interface Type_556_Approved { +export interface Type_480_Approved { __kind: 'Approved' value: [number, Deposit, (Deposit | undefined)] } -export interface Type_556_Rejected { +export interface Type_480_Rejected { __kind: 'Rejected' value: [number, Deposit, (Deposit | undefined)] } -export interface Type_556_Cancelled { +export interface Type_480_Cancelled { __kind: 'Cancelled' value: [number, Deposit, (Deposit | undefined)] } -export interface Type_556_TimedOut { +export interface Type_480_TimedOut { __kind: 'TimedOut' value: [number, Deposit, (Deposit | undefined)] } -export interface Type_556_Killed { +export interface Type_480_Killed { __kind: 'Killed' value: number } -export interface Type_557 { +export interface Casting { + votes: [number, AccountVote][] + delegations: Type_473 + prior: [number, bigint] +} + +export interface Delegating { + balance: bigint + target: Uint8Array + conviction: Conviction + delegations: Type_473 + prior: [number, bigint] +} + +export interface Type_481 { track: number origin: OriginCaller proposal: Bounded @@ -51,7 +145,12 @@ export interface Deposit { amount: bigint } -export type OriginCaller = OriginCaller_system | OriginCaller_Ethereum | OriginCaller_CouncilCollective | OriginCaller_TechCommitteeCollective | OriginCaller_CumulusXcm | OriginCaller_PolkadotXcm | OriginCaller_EthereumXcm | OriginCaller_TreasuryCouncilCollective | OriginCaller_Origins | OriginCaller_OpenTechCommitteeCollective | OriginCaller_Void +export interface Type_473 { + votes: bigint + capital: bigint +} + +export type OriginCaller = OriginCaller_system | OriginCaller_Ethereum | OriginCaller_Origins | OriginCaller_CouncilCollective | OriginCaller_TechCommitteeCollective | OriginCaller_TreasuryCouncilCollective | OriginCaller_OpenTechCommitteeCollective | OriginCaller_CumulusXcm | OriginCaller_PolkadotXcm | OriginCaller_Void export interface OriginCaller_system { __kind: 'system' @@ -60,70 +159,47 @@ export interface OriginCaller_system { export interface OriginCaller_Ethereum { __kind: 'Ethereum' - value: Type_153 + value: Type_116 +} + +export interface OriginCaller_Origins { + __kind: 'Origins' + value: Origin } export interface OriginCaller_CouncilCollective { __kind: 'CouncilCollective' - value: Type_154 + value: Type_118 } export interface OriginCaller_TechCommitteeCollective { __kind: 'TechCommitteeCollective' - value: Type_155 -} - -export interface OriginCaller_CumulusXcm { - __kind: 'CumulusXcm' - value: Origin -} - -export interface OriginCaller_PolkadotXcm { - __kind: 'PolkadotXcm' - value: Type_157 -} - -export interface OriginCaller_EthereumXcm { - __kind: 'EthereumXcm' - value: Type_158 + value: Type_119 } export interface OriginCaller_TreasuryCouncilCollective { __kind: 'TreasuryCouncilCollective' - value: Type_159 -} - -export interface OriginCaller_Origins { - __kind: 'Origins' - value: Type_160 + value: Type_120 } export interface OriginCaller_OpenTechCommitteeCollective { __kind: 'OpenTechCommitteeCollective' - value: Type_161 -} - -export interface OriginCaller_Void { - __kind: 'Void' - value: Void + value: Type_121 } -export type Bounded = Bounded_Legacy | Bounded_Inline | Bounded_Lookup - -export interface Bounded_Legacy { - __kind: 'Legacy' - hash: Uint8Array +export interface OriginCaller_CumulusXcm { + __kind: 'CumulusXcm' + value: Type_122 } -export interface Bounded_Inline { - __kind: 'Inline' - value: Uint8Array +export interface OriginCaller_PolkadotXcm { + __kind: 'PolkadotXcm' + value: Type_123 } -export interface Bounded_Lookup { - __kind: 'Lookup' - hash: Uint8Array - len: number +export interface OriginCaller_Void { + __kind: 'Void' + value: Void } export type DispatchTime = DispatchTime_At | DispatchTime_After @@ -143,12 +219,6 @@ export interface DecidingStatus { confirming: (number | undefined) } -export interface Tally { - ayes: bigint - nays: bigint - support: bigint -} - export type RawOrigin = RawOrigin_Root | RawOrigin_Signed | RawOrigin_None export interface RawOrigin_Root { @@ -164,123 +234,116 @@ export interface RawOrigin_None { __kind: 'None' } -export type Type_153 = Type_153_EthereumTransaction +export type Type_116 = Type_116_EthereumTransaction -export interface Type_153_EthereumTransaction { +export interface Type_116_EthereumTransaction { __kind: 'EthereumTransaction' value: Uint8Array } -export type Type_154 = Type_154_Members | Type_154_Member | Type_154__Phantom +export type Origin = Origin_WhitelistedCaller | Origin_GeneralAdmin | Origin_ReferendumCanceller | Origin_ReferendumKiller -export interface Type_154_Members { - __kind: 'Members' - value: [number, number] +export interface Origin_WhitelistedCaller { + __kind: 'WhitelistedCaller' } -export interface Type_154_Member { - __kind: 'Member' - value: Uint8Array +export interface Origin_GeneralAdmin { + __kind: 'GeneralAdmin' } -export interface Type_154__Phantom { - __kind: '_Phantom' +export interface Origin_ReferendumCanceller { + __kind: 'ReferendumCanceller' +} + +export interface Origin_ReferendumKiller { + __kind: 'ReferendumKiller' } -export type Type_155 = Type_155_Members | Type_155_Member | Type_155__Phantom +export type Type_118 = Type_118_Members | Type_118_Member | Type_118__Phantom -export interface Type_155_Members { +export interface Type_118_Members { __kind: 'Members' value: [number, number] } -export interface Type_155_Member { +export interface Type_118_Member { __kind: 'Member' value: Uint8Array } -export interface Type_155__Phantom { +export interface Type_118__Phantom { __kind: '_Phantom' } -export type Origin = Origin_Relay | Origin_SiblingParachain - -export interface Origin_Relay { - __kind: 'Relay' -} - -export interface Origin_SiblingParachain { - __kind: 'SiblingParachain' - value: number -} - -export type Type_157 = Type_157_Xcm | Type_157_Response +export type Type_119 = Type_119_Members | Type_119_Member | Type_119__Phantom -export interface Type_157_Xcm { - __kind: 'Xcm' - value: V1MultiLocation +export interface Type_119_Members { + __kind: 'Members' + value: [number, number] } -export interface Type_157_Response { - __kind: 'Response' - value: V1MultiLocation +export interface Type_119_Member { + __kind: 'Member' + value: Uint8Array } -export type Type_158 = Type_158_XcmEthereumTransaction - -export interface Type_158_XcmEthereumTransaction { - __kind: 'XcmEthereumTransaction' - value: Uint8Array +export interface Type_119__Phantom { + __kind: '_Phantom' } -export type Type_159 = Type_159_Members | Type_159_Member | Type_159__Phantom +export type Type_120 = Type_120_Members | Type_120_Member | Type_120__Phantom -export interface Type_159_Members { +export interface Type_120_Members { __kind: 'Members' value: [number, number] } -export interface Type_159_Member { +export interface Type_120_Member { __kind: 'Member' value: Uint8Array } -export interface Type_159__Phantom { +export interface Type_120__Phantom { __kind: '_Phantom' } -export type Type_160 = Type_160_WhitelistedCaller | Type_160_GeneralAdmin | Type_160_ReferendumCanceller | Type_160_ReferendumKiller +export type Type_121 = Type_121_Members | Type_121_Member | Type_121__Phantom -export interface Type_160_WhitelistedCaller { - __kind: 'WhitelistedCaller' +export interface Type_121_Members { + __kind: 'Members' + value: [number, number] } -export interface Type_160_GeneralAdmin { - __kind: 'GeneralAdmin' +export interface Type_121_Member { + __kind: 'Member' + value: Uint8Array } -export interface Type_160_ReferendumCanceller { - __kind: 'ReferendumCanceller' +export interface Type_121__Phantom { + __kind: '_Phantom' } -export interface Type_160_ReferendumKiller { - __kind: 'ReferendumKiller' -} +export type Type_122 = Type_122_Relay | Type_122_SiblingParachain -export type Type_161 = Type_161_Members | Type_161_Member | Type_161__Phantom +export interface Type_122_Relay { + __kind: 'Relay' +} -export interface Type_161_Members { - __kind: 'Members' - value: [number, number] +export interface Type_122_SiblingParachain { + __kind: 'SiblingParachain' + value: number } -export interface Type_161_Member { - __kind: 'Member' - value: Uint8Array +export type Type_123 = Type_123_Xcm | Type_123_Response + +export interface Type_123_Xcm { + __kind: 'Xcm' + value: V1MultiLocation } -export interface Type_161__Phantom { - __kind: '_Phantom' +export interface Type_123_Response { + __kind: 'Response' + value: V1MultiLocation } export type Void = never diff --git a/src/types/v300.ts b/src/types/v300.ts deleted file mode 100644 index a77cf4f6..00000000 --- a/src/types/v300.ts +++ /dev/null @@ -1,2376 +0,0 @@ -import type {Result, Option} from './support' - -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy - -export interface Proposal_System { - __kind: 'System' - value: SystemCall -} - -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall -} - -export interface Proposal_Timestamp { - __kind: 'Timestamp' - value: TimestampCall -} - -export interface Proposal_Balances { - __kind: 'Balances' - value: BalancesCall -} - -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall -} - -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - -export interface Proposal_EVM { - __kind: 'EVM' - value: EVMCall -} - -export interface Proposal_Ethereum { - __kind: 'Ethereum' - value: EthereumCall -} - -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Proposal_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall -} - -export interface Proposal_Democracy { - __kind: 'Democracy' - value: DemocracyCall -} - -export interface Proposal_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall -} - -export interface Proposal_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall -} - -export interface Proposal_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} - -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - -export interface Proposal_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall -} - -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event - -/** - * A dispatch that will fill the block weight up to the given ratio. - */ -export interface SystemCall_fill_block { - __kind: 'fill_block' - ratio: number -} - -/** - * Make some on-chain remark. - * - * # - * - `O(1)` - * # - */ -export interface SystemCall_remark { - __kind: 'remark' - remark: Uint8Array -} - -/** - * 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 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: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * 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 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: [Uint8Array, Uint8Array][] -} - -/** - * 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: Uint8Array[] -} - -/** - * 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: Uint8Array - subkeys: number -} - -/** - * 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: Uint8Array -} - -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all - -/** - * 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_35[] -} - -/** - * 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_35 -} - -/** - * 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_35[] -} - -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 type BalancesCall = BalancesCall_transfer | BalancesCall_set_balance | BalancesCall_force_transfer | BalancesCall_transfer_keep_alive | BalancesCall_transfer_all - -/** - * 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: Uint8Array - 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: Uint8Array - newFree: bigint - newReserved: bigint -} - -/** - * 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: Uint8Array - dest: Uint8Array - 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: Uint8Array - 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: Uint8Array - keepAlive: boolean -} - -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as - -/** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # - */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 -} - -/** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # - */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint -} - -/** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # - */ -export interface SudoCall_set_key { - __kind: 'set_key' - new: Uint8Array -} - -/** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # - */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 -} - -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - -/** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. - */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number -} - -/** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. - */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances module. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number -} - -/** - * Join the set of collator candidates - */ -export interface ParachainStakingCall_join_candidates { - __kind: 'join_candidates' - bond: bigint - candidateCount: number -} - -/** - * Request to leave the set of candidates. If successful, the account is immediately - * removed from the candidate pool to prevent selection as a collator, but unbonding is - * executed with a delay of `T::LeaveCandidates` rounds. - */ -export interface ParachainStakingCall_leave_candidates { - __kind: 'leave_candidates' - candidateCount: number -} - -/** - * Temporarily leave the set of collator candidates without unbonding - */ -export interface ParachainStakingCall_go_offline { - __kind: 'go_offline' -} - -/** - * Rejoin the set of collator candidates if previously had called `go_offline` - */ -export interface ParachainStakingCall_go_online { - __kind: 'go_online' -} - -/** - * Bond more for collator candidates - */ -export interface ParachainStakingCall_candidate_bond_more { - __kind: 'candidate_bond_more' - more: bigint -} - -/** - * Bond less for collator candidates - */ -export interface ParachainStakingCall_candidate_bond_less { - __kind: 'candidate_bond_less' - less: bigint -} - -/** - * If caller is not a nominator, then join the set of nominators - * If caller is a nominator, then makes nomination to change their nomination state - */ -export interface ParachainStakingCall_nominate { - __kind: 'nominate' - collator: Uint8Array - amount: bigint - collatorNominatorCount: number - nominationCount: number -} - -/** - * Request to leave the set of nominators. If successful, the nominator is scheduled - * to exit - */ -export interface ParachainStakingCall_leave_nominators { - __kind: 'leave_nominators' - nominationCount: number -} - -/** - * Request to revoke an existing nomination. If successful, the nomination is scheduled - * to exit - */ -export interface ParachainStakingCall_revoke_nomination { - __kind: 'revoke_nomination' - collator: Uint8Array -} - -/** - * Bond more for nominators with respect to a specific collator candidate - */ -export interface ParachainStakingCall_nominator_bond_more { - __kind: 'nominator_bond_more' - candidate: Uint8Array - more: bigint -} - -/** - * Bond less for nominators with respect to a specific nominator candidate - */ -export interface ParachainStakingCall_nominator_bond_less { - __kind: 'nominator_bond_less' - candidate: Uint8Array - less: bigint -} - -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after - -/** - * 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: Type_35 -} - -/** - * 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 -} - -/** - * 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: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 -} - -/** - * 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: Uint8Array -} - -/** - * 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: Type_35 -} - -/** - * Schedule a named task after a delay. - * - * # - * Same as [`schedule_named`]. - * # - */ -export interface SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 -} - -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - -/** - * 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: Uint8Array - value: bigint -} - -/** - * 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 -} - -/** - * 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 -} - -/** - * 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. - * - * 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: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * 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: Uint8Array - votingPeriod: number - delay: number -} - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -/** - * 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: Uint8Array - conviction: Conviction - balance: bigint -} - -/** - * 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' -} - -/** - * 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' -} - -/** - * 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: Uint8Array -} - -/** - * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. - */ -export interface DemocracyCall_note_preimage_operational { - __kind: 'note_preimage_operational' - encodedProposal: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. - */ -export interface DemocracyCall_note_imminent_preimage_operational { - __kind: 'note_imminent_preimage_operational' - encodedProposal: Uint8Array -} - -/** - * 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: Uint8Array - proposalLenUpperBound: number -} - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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: Uint8Array - index: 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: Uint8Array - index: number -} - -/** - * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 CouncilCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal - -/** - * 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 TechComitteeCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 TechComitteeCollectiveCall_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 TechComitteeCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 TechComitteeCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end relay block is higher than the init relay block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We check that the number of contributors inserted is less than T::MaxInitContributors::get() - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array -} - -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - -/** - * 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: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 -} - -/** - * 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: Uint8Array - proxyType: ProxyType - delay: number -} - -/** - * 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: Uint8Array - proxyType: ProxyType - delay: number -} - -/** - * 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' -} - -/** - * 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: Uint8Array - proxyType: ProxyType - index: number - height: number - extIndex: 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: Uint8Array - callHash: Uint8Array -} - -/** - * 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: Uint8Array - callHash: Uint8Array -} - -/** - * 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: Uint8Array - callHash: Uint8Array -} - -/** - * 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: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 -} - -export interface ChangesTrieConfiguration { - digestInterval: number - digestLevels: number -} - -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy - -export interface Type_35_System { - __kind: 'System' - value: SystemCall -} - -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall -} - -export interface Type_35_Timestamp { - __kind: 'Timestamp' - value: TimestampCall -} - -export interface Type_35_Balances { - __kind: 'Balances' - value: BalancesCall -} - -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall -} - -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - -export interface Type_35_EVM { - __kind: 'EVM' - value: EVMCall -} - -export interface Type_35_Ethereum { - __kind: 'Ethereum' - value: EthereumCall -} - -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall -} - -export interface Type_35_Democracy { - __kind: 'Democracy' - value: DemocracyCall -} - -export interface Type_35_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall -} - -export interface Type_35_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall -} - -export interface Type_35_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} - -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall -} - -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] -} - -export interface EthTransaction { - nonce: bigint - gasPrice: bigint - gasLimit: bigint - action: EthTransactionAction - value: bigint - input: Uint8Array - signature: EthTransactionSignature -} - -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - -export type AccountVote = AccountVote_Standard | AccountVote_Split - -export interface AccountVote_Standard { - __kind: 'Standard' - value: AccountVoteStandard -} - -export interface AccountVote_Split { - __kind: 'Split' - value: AccountVoteSplit -} - -export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x - -export interface Conviction_None { - __kind: '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 type MultiSignature = MultiSignature_Ed25519 | MultiSignature_Sr25519 | MultiSignature_Ecdsa - -export interface MultiSignature_Ed25519 { - __kind: 'Ed25519' - value: Uint8Array -} - -export interface MultiSignature_Sr25519 { - __kind: 'Sr25519' - value: Uint8Array -} - -export interface MultiSignature_Ecdsa { - __kind: 'Ecdsa' - value: Uint8Array -} - -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - -export interface PersistedValidationData { - parentHead: Uint8Array - relayParentNumber: number - relayParentStorageRoot: Uint8Array - maxPovSize: number -} - -export interface StorageProof { - trieNodes: Uint8Array[] -} - -export interface InboundDownwardMessage { - pubSentAt: number - pubMsg: Uint8Array -} - -export interface InboundHrmpMessage { - sentAt: number - data: Uint8Array -} - -export type EthTransactionAction = EthTransactionAction_Call | EthTransactionAction_Create - -export interface EthTransactionAction_Call { - __kind: 'Call' - value: Uint8Array -} - -export interface EthTransactionAction_Create { - __kind: 'Create' -} - -export interface EthTransactionSignature { - v: bigint - r: Uint8Array - s: Uint8Array -} - -export interface AccountVoteStandard { - vote: number - balance: bigint -} - -export interface AccountVoteSplit { - aye: bigint - nay: bigint -} diff --git a/src/types/v40.ts b/src/types/v40.ts deleted file mode 100644 index 8a5cd002..00000000 --- a/src/types/v40.ts +++ /dev/null @@ -1,405 +0,0 @@ -import type {Result, Option} from './support' - -export type VoteThreshold = VoteThreshold_SuperMajorityApprove | VoteThreshold_SuperMajorityAgainst | VoteThreshold_SimpleMajority - -export interface VoteThreshold_SuperMajorityApprove { - __kind: 'SuperMajorityApprove' -} - -export interface VoteThreshold_SuperMajorityAgainst { - __kind: 'SuperMajorityAgainst' -} - -export interface VoteThreshold_SimpleMajority { - __kind: 'SimpleMajority' -} - -export type ExitReason = ExitReason_Succeed | ExitReason_Error | ExitReason_Revert | ExitReason_Fatal - -export interface ExitReason_Succeed { - __kind: 'Succeed' - value: ExitSucceed -} - -export interface ExitReason_Error { - __kind: 'Error' - value: ExitError -} - -export interface ExitReason_Revert { - __kind: 'Revert' - value: ExitRevert -} - -export interface ExitReason_Fatal { - __kind: 'Fatal' - value: ExitFatal -} - -export type DispatchResult = DispatchResult_Ok | DispatchResult_Err - -export interface DispatchResult_Ok { - __kind: 'Ok' -} - -export interface DispatchResult_Err { - __kind: 'Err' - value: DispatchError -} - -export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x - -export interface Conviction_None { - __kind: '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 type AccountVote = AccountVote_Standard | AccountVote_Split - -export interface AccountVote_Standard { - __kind: 'Standard' - value: AccountVoteStandard -} - -export interface AccountVote_Split { - __kind: 'Split' - value: AccountVoteSplit -} - -export interface EthTransaction { - nonce: bigint - gasPrice: bigint - gasLimit: bigint - action: EthTransactionAction - value: bigint - input: Uint8Array - signature: EthTransactionSignature -} - -export interface AccountData { - free: bigint - reserved: bigint - miscFrozen: bigint - feeFrozen: bigint -} - -export type PreimageStatus = PreimageStatus_Missing | PreimageStatus_Available - -export interface PreimageStatus_Missing { - __kind: 'Missing' - value: number -} - -export interface PreimageStatus_Available { - __kind: 'Available' - value: PreimageStatusAvailable -} - -export type ReferendumInfo = ReferendumInfo_Ongoing | ReferendumInfo_Finished - -export interface ReferendumInfo_Ongoing { - __kind: 'Ongoing' - value: ReferendumStatus -} - -export interface ReferendumInfo_Finished { - __kind: 'Finished' - value: ReferendumInfoFinished -} - -export interface EthTransactionStatus { - transactionHash: Uint8Array - transactionIndex: number - from: Uint8Array - to: (Uint8Array | undefined) - contractAddress: (Uint8Array | undefined) - logs: EthLog[] - logsBloom: Uint8Array -} - -export interface AccountInfo { - nonce: number - consumers: number - providers: number - sufficients: number - data: AccountData -} - -export type ExitSucceed = ExitSucceed_Stopped | ExitSucceed_Returned | ExitSucceed_Suicided - -export interface ExitSucceed_Stopped { - __kind: 'Stopped' -} - -export interface ExitSucceed_Returned { - __kind: 'Returned' -} - -export interface ExitSucceed_Suicided { - __kind: 'Suicided' -} - -export type ExitError = ExitError_StackUnderflow | ExitError_StackOverflow | ExitError_InvalidJump | ExitError_InvalidRange | ExitError_DesignatedInvalid | ExitError_CallTooDeep | ExitError_CreateCollision | ExitError_CreateContractLimit | ExitError_OutOfOffset | ExitError_OutOfGas | ExitError_OutOfFund | ExitError_PCUnderflow | ExitError_CreateEmpty | ExitError_Other - -export interface ExitError_StackUnderflow { - __kind: 'StackUnderflow' -} - -export interface ExitError_StackOverflow { - __kind: 'StackOverflow' -} - -export interface ExitError_InvalidJump { - __kind: 'InvalidJump' -} - -export interface ExitError_InvalidRange { - __kind: 'InvalidRange' -} - -export interface ExitError_DesignatedInvalid { - __kind: 'DesignatedInvalid' -} - -export interface ExitError_CallTooDeep { - __kind: 'CallTooDeep' -} - -export interface ExitError_CreateCollision { - __kind: 'CreateCollision' -} - -export interface ExitError_CreateContractLimit { - __kind: 'CreateContractLimit' -} - -export interface ExitError_OutOfOffset { - __kind: 'OutOfOffset' -} - -export interface ExitError_OutOfGas { - __kind: 'OutOfGas' -} - -export interface ExitError_OutOfFund { - __kind: 'OutOfFund' -} - -export interface ExitError_PCUnderflow { - __kind: 'PCUnderflow' -} - -export interface ExitError_CreateEmpty { - __kind: 'CreateEmpty' -} - -export interface ExitError_Other { - __kind: 'Other' - value: string -} - -export type ExitRevert = ExitRevert_Reverted - -export interface ExitRevert_Reverted { - __kind: 'Reverted' -} - -export type ExitFatal = ExitFatal_NotSupported | ExitFatal_UnhandledInterrupt | ExitFatal_CallErrorAsFatal | ExitFatal_Other - -export interface ExitFatal_NotSupported { - __kind: 'NotSupported' -} - -export interface ExitFatal_UnhandledInterrupt { - __kind: 'UnhandledInterrupt' -} - -export interface ExitFatal_CallErrorAsFatal { - __kind: 'CallErrorAsFatal' - value: ExitError -} - -export interface ExitFatal_Other { - __kind: 'Other' - value: string -} - -export type DispatchError = DispatchError_Other | DispatchError_CannotLookup | DispatchError_BadOrigin | DispatchError_Module | DispatchError_ConsumerRemaining | DispatchError_NoProviders | DispatchError_Token | DispatchError_Arithmetic - -export interface DispatchError_Other { - __kind: 'Other' -} - -export interface DispatchError_CannotLookup { - __kind: 'CannotLookup' -} - -export interface DispatchError_BadOrigin { - __kind: 'BadOrigin' -} - -export interface DispatchError_Module { - __kind: 'Module' - value: DispatchErrorModule -} - -export interface DispatchError_ConsumerRemaining { - __kind: 'ConsumerRemaining' -} - -export interface DispatchError_NoProviders { - __kind: 'NoProviders' -} - -export interface DispatchError_Token { - __kind: 'Token' - value: TokenError -} - -export interface DispatchError_Arithmetic { - __kind: 'Arithmetic' - value: ArithmeticError -} - -export interface AccountVoteStandard { - vote: number - balance: bigint -} - -export interface AccountVoteSplit { - aye: bigint - nay: bigint -} - -export type EthTransactionAction = EthTransactionAction_Call | EthTransactionAction_Create - -export interface EthTransactionAction_Call { - __kind: 'Call' - value: Uint8Array -} - -export interface EthTransactionAction_Create { - __kind: 'Create' -} - -export interface EthTransactionSignature { - v: bigint - r: Uint8Array - s: Uint8Array -} - -export interface PreimageStatusAvailable { - data: Uint8Array - provider: Uint8Array - deposit: bigint - since: number - expiry: (number | undefined) -} - -export interface ReferendumStatus { - end: number - proposalHash: Uint8Array - threshold: VoteThreshold - delay: number - tally: Tally -} - -export interface ReferendumInfoFinished { - approved: boolean - end: number -} - -export interface EthLog { - address: Uint8Array - topics: Uint8Array[] - data: Uint8Array - blockHash: (Uint8Array | undefined) - blockNumber: (bigint | undefined) - transactionHash: (Uint8Array | undefined) - transactionIndex: (bigint | undefined) - logIndex: (bigint | undefined) - transactionLogIndex: (bigint | undefined) - removed: boolean -} - -export interface DispatchErrorModule { - index: number - error: number -} - -export type TokenError = TokenError_NoFunds | TokenError_WouldDie | TokenError_BelowMinimum | TokenError_CannotCreate | TokenError_UnknownAsset | TokenError_Frozen | TokenError_Underflow | TokenError_Overflow - -export interface TokenError_NoFunds { - __kind: 'NoFunds' -} - -export interface TokenError_WouldDie { - __kind: 'WouldDie' -} - -export interface TokenError_BelowMinimum { - __kind: 'BelowMinimum' -} - -export interface TokenError_CannotCreate { - __kind: 'CannotCreate' -} - -export interface TokenError_UnknownAsset { - __kind: 'UnknownAsset' -} - -export interface TokenError_Frozen { - __kind: 'Frozen' -} - -export interface TokenError_Underflow { - __kind: 'Underflow' -} - -export interface TokenError_Overflow { - __kind: 'Overflow' -} - -export type ArithmeticError = ArithmeticError_Underflow | ArithmeticError_Overflow | ArithmeticError_DivisionByZero - -export interface ArithmeticError_Underflow { - __kind: 'Underflow' -} - -export interface ArithmeticError_Overflow { - __kind: 'Overflow' -} - -export interface ArithmeticError_DivisionByZero { - __kind: 'DivisionByZero' -} - -export interface Tally { - ayes: bigint - nays: bigint - turnout: bigint -} diff --git a/src/types/v400.ts b/src/types/v400.ts index ae09837f..ffd10c26 100644 --- a/src/types/v400.ts +++ b/src/types/v400.ts @@ -1,15 +1,15 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy | Proposal_MaintenanceMode +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_MaintenanceMode | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } export interface Proposal_Timestamp { @@ -22,14 +22,39 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall } export interface Proposal_EVM { @@ -42,11 +67,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -72,36 +92,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface Proposal_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -250,72 +245,50 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } export type TimestampCall = TimestampCall_set @@ -466,257 +439,76 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_set_key { - __kind: 'set_key' +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' new: Uint8Array } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the percent of inflation set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. + * Set the commission for all collators */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array +export interface ParachainStakingCall_set_collator_commission { + __kind: 'set_collator_commission' + new: number } -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array +/** + * Set blocks per round + * - if called with `new` less than length of current round, will transition immediately + * in the next block + * - also updates per-round inflation config + */ +export interface ParachainStakingCall_set_blocks_per_round { + __kind: 'set_blocks_per_round' + new: number } -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - /** - * Withdraw balance from EVM into currency/balances module. + * Join the set of collator candidates */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number -} - -/** - * Join the set of collator candidates - */ -export interface ParachainStakingCall_join_candidates { - __kind: 'join_candidates' - bond: bigint - candidateCount: number +export interface ParachainStakingCall_join_candidates { + __kind: 'join_candidates' + bond: bigint + candidateCount: number } /** @@ -807,303 +599,765 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } +export type AuthorFilterCall = AuthorFilterCall_set_eligible + /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_cancel { - __kind: 'cancel' - when: number - index: number +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Schedule a named task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Cancel a named scheduled task. + * Change your AuthorId. * - * # - * - 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 - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + /** - * Schedule a named task after a delay. + * 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`). * * # - * Same as [`schedule_named`]. + * - 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 SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_71[] } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - /** - * Propose a sensitive action to be taken. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * 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. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * 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. * - * Emits `Proposed`. + * NOTE: Prior to version *12, this was called `as_limited_sub`. * - * Weight: `O(p)` + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_71 } /** - * Signals agreement with a particular proposal. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * May be called from any origin. * - * - `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. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * 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 DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_71[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * 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. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be _Signed_. + * Removes any corresponding announcement(s). * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 } /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `CancellationOrigin`. + * The dispatch origin for this call must be _Signed_. * - * -`ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Unregister a proxy account for the sender. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to - * schedule an external referendum. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `ExternalDefaultOrigin`. + * Requires a `Signed` origin. * - * - `proposal_hash`: The preimage hash of the proposal. + * - `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. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number } /** - * 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. + * Removes a previously spawned anonymous proxy. * - * The dispatch of this call must be `FastTrackOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `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. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Started`. + * - `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. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number - delay: number +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Veto and blacklist the external proposal hash. - * - * The dispatch origin of this call must be `VetoOrigin`. + * Publish the hash of a proxy-call that will be made in the future. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * 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. * - * Emits `Vetoed`. + * No more than `MaxPending` announcements may be made at any one time. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` - */ -export interface DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array -} - -/** - * Remove a referendum. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * The dispatch origin of this call must be _Root_. + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. * - * - `ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number +export interface ProxyCall_announce { + __kind: 'announce' + real: Uint8Array + callHash: Uint8Array } /** - * Cancel a proposal queued for enactment. + * Remove a given announcement. * - * The dispatch origin of this call must be _Root_. + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * - `which`: The index of the referendum to cancel. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. - */ -export interface DemocracyCall_cancel_queued { - __kind: 'cancel_queued' + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 +} + +export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation + +/** + * Place the chain in maintenance mode + * + * Weight cost is: + * * One DB read to ensure we're not already in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event + */ +export interface MaintenanceModeCall_enter_maintenance_mode { + __kind: 'enter_maintenance_mode' +} + +/** + * Return the chain to normal operating mode + * + * Weight cost is: + * * One DB read to ensure we're in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event + */ +export interface MaintenanceModeCall_resume_normal_operation { + __kind: 'resume_normal_operation' +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances module. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_71 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_71 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array + votingPeriod: number + delay: number +} + +/** + * 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: Uint8Array +} + +/** + * 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 +} + +/** + * 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 } @@ -1326,210 +1580,38 @@ export interface DemocracyCall_enact_proposal { * * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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. + * then it will be cancelled. * - * 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. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * + `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. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * # - * ## 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 - * # + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1557,7 +1639,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1576,7 +1658,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1611,7 +1693,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1634,7 +1716,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1673,477 +1755,318 @@ export interface TechComitteeCollectiveCall_vote { * - up to 3 events * # */ -export interface TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - * Weight argument is 0 since it depends on how the storage trie is composed - * Once we have the number of contributors, we can probably add such a weight here - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - * Weight argument is 0 since it depends on how the storage trie is composed - * Once we have the number of contributors, we can probably add such a weight here - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end relay block is higher than the init relay block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We check that the number of contributors inserted is less than T::MaxInitContributors::get() - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. - * - * Removes any corresponding announcement(s). + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal + /** - * Register a proxy account for the sender that is able to make calls on its behalf. + * Set the collective's membership. * - * The dispatch origin for this call must be _Signed_. + * - `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. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Unregister a proxy account for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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.** + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * 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. + * Add an aye or nay vote for the sender to the given proposal. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array index: number + approve: boolean } /** - * Removes a previously spawned anonymous proxy. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * WARNING: **All access to this account will be lost.** Any funds held in it will be - * inaccessible. + * May be called by any signed account in order to finish voting and close the proposal. * - * Requires a `Signed` origin, and the sender account must have been created by a call to - * `anonymous` with corresponding parameters. + * 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. * - * - `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. + * 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. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number - height: number - extIndex: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array +} + +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + +/** + * 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: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution + * Weight argument is 0 since it depends on how the storage trie is composed + * Once we have the number of contributors, we can probably add such a weight here */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature } -export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation +/** + * Collect whatever portion of your reward are currently vested. + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} /** - * Place the chain in maintenance mode - * - * Weight cost is: - * * One DB read to ensure we're not already in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * Update reward address. To determine whether its something we want to keep + * Weight argument is 0 since it depends on how the storage trie is composed + * Once we have the number of contributors, we can probably add such a weight here */ -export interface MaintenanceModeCall_enter_maintenance_mode { - __kind: 'enter_maintenance_mode' +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array } /** - * Return the chain to normal operating mode - * - * Weight cost is: - * * One DB read to ensure we're in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * This extrinsic completes the initialization if some checks are fullfiled. These checks are: + * -The reward contribution money matches the crowdloan pot + * -The end relay block is higher than the init relay block + * -The initialization has not complete yet */ -export interface MaintenanceModeCall_resume_normal_operation { - __kind: 'resume_normal_operation' +export interface CrowdloanRewardsCall_complete_initialization { + __kind: 'complete_initialization' + leaseEndingBlock: number +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We check that the number of contributors inserted is less than T::MaxInitContributors::get() + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] } export interface ChangesTrieConfiguration { @@ -2151,113 +2074,144 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy | Type_35_MaintenanceMode +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_71 = Type_71_System | Type_71_ParachainSystem | Type_71_Timestamp | Type_71_Balances | Type_71_ParachainStaking | Type_71_AuthorInherent | Type_71_AuthorFilter | Type_71_AuthorMapping | Type_71_Utility | Type_71_Proxy | Type_71_MaintenanceMode | Type_71_EVM | Type_71_Ethereum | Type_71_Scheduler | Type_71_Democracy | Type_71_CouncilCollective | Type_71_TechComitteeCollective | Type_71_Treasury | Type_71_CrowdloanRewards -export interface Type_35_System { +export interface Type_71_System { __kind: 'System' value: SystemCall } -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_71_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export interface Type_35_Timestamp { +export interface Type_71_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_35_Balances { +export interface Type_71_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Type_71_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_71_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Type_71_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_71_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_71_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_71_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_71_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall } -export interface Type_35_EVM { +export interface Type_71_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_35_Ethereum { +export interface Type_71_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { +export interface Type_71_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_35_Democracy { +export interface Type_71_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_35_CouncilCollective { +export interface Type_71_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_35_TechComitteeCollective { +export interface Type_71_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_35_Treasury { +export interface Type_71_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_71_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface Type_35_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2270,12 +2224,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2335,36 +2283,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v47.ts b/src/types/v49.ts similarity index 88% rename from src/types/v47.ts rename to src/types/v49.ts index acf0dc73..5fa5ecca 100644 --- a/src/types/v47.ts +++ b/src/types/v49.ts @@ -1,15 +1,160 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_RandomnessCollectiveFlip | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy +export type VoteThreshold = VoteThreshold_SuperMajorityApprove | VoteThreshold_SuperMajorityAgainst | VoteThreshold_SimpleMajority + +export interface VoteThreshold_SuperMajorityApprove { + __kind: 'SuperMajorityApprove' +} + +export interface VoteThreshold_SuperMajorityAgainst { + __kind: 'SuperMajorityAgainst' +} + +export interface VoteThreshold_SimpleMajority { + __kind: 'SimpleMajority' +} + +export type ExitReason = ExitReason_Succeed | ExitReason_Error | ExitReason_Revert | ExitReason_Fatal + +export interface ExitReason_Succeed { + __kind: 'Succeed' + value: ExitSucceed +} + +export interface ExitReason_Error { + __kind: 'Error' + value: ExitError +} + +export interface ExitReason_Revert { + __kind: 'Revert' + value: ExitRevert +} + +export interface ExitReason_Fatal { + __kind: 'Fatal' + value: ExitFatal +} + +export type DispatchResult = DispatchResult_Ok | DispatchResult_Err + +export interface DispatchResult_Ok { + __kind: 'Ok' +} + +export interface DispatchResult_Err { + __kind: 'Err' + value: DispatchError +} + +export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x + +export interface Conviction_None { + __kind: '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 type AccountVote = AccountVote_Standard | AccountVote_Split + +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard +} + +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit +} + +export interface EthTransaction { + nonce: bigint + gasPrice: bigint + gasLimit: bigint + action: EthTransactionAction + value: bigint + input: Uint8Array + signature: EthTransactionSignature +} + +export interface AccountData { + free: bigint + reserved: bigint + miscFrozen: bigint + feeFrozen: bigint +} + +export type PreimageStatus = PreimageStatus_Missing | PreimageStatus_Available + +export interface PreimageStatus_Missing { + __kind: 'Missing' + value: number +} + +export interface PreimageStatus_Available { + __kind: 'Available' + value: PreimageStatusAvailable +} + +export type ReferendumInfo = ReferendumInfo_Ongoing | ReferendumInfo_Finished + +export interface ReferendumInfo_Ongoing { + __kind: 'Ongoing' + value: ReferendumStatus +} + +export interface ReferendumInfo_Finished { + __kind: 'Finished' + value: ReferendumInfoFinished +} + +export interface EthTransactionStatus { + transactionHash: Uint8Array + transactionIndex: number + from: Uint8Array + to: (Uint8Array | undefined) + contractAddress: (Uint8Array | undefined) + logs: EthLog[] + logsBloom: Uint8Array +} + +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_RandomnessCollectiveFlip | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_Sudo | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall +} + +export interface Proposal_RandomnessCollectiveFlip { + __kind: 'RandomnessCollectiveFlip' + value: RandomnessCollectiveFlipCall } export interface Proposal_Timestamp { @@ -22,19 +167,39 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Proposal_RandomnessCollectiveFlip { - __kind: 'RandomnessCollectiveFlip' - value: RandomnessCollectiveFlipCall +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Sudo { + __kind: 'Sudo' + value: SudoCall } export interface Proposal_EVM { @@ -47,11 +212,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -77,29 +237,17 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface AccountInfo { + nonce: number + consumers: number + providers: number + sufficients: number + data: AccountData } export interface TreasuryProposal { @@ -109,117 +257,314 @@ export interface TreasuryProposal { bond: bigint } -export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event +export type ExitSucceed = ExitSucceed_Stopped | ExitSucceed_Returned | ExitSucceed_Suicided -/** - * A dispatch that will fill the block weight up to the given ratio. - */ -export interface SystemCall_fill_block { - __kind: 'fill_block' - ratio: number +export interface ExitSucceed_Stopped { + __kind: 'Stopped' } -/** - * Make some on-chain remark. - * - * # - * - `O(1)` - * # - */ -export interface SystemCall_remark { - __kind: 'remark' - remark: Uint8Array +export interface ExitSucceed_Returned { + __kind: 'Returned' } -/** - * 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 +export interface ExitSucceed_Suicided { + __kind: 'Suicided' } -/** - * 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: Uint8Array +export type ExitError = ExitError_StackUnderflow | ExitError_StackOverflow | ExitError_InvalidJump | ExitError_InvalidRange | ExitError_DesignatedInvalid | ExitError_CallTooDeep | ExitError_CreateCollision | ExitError_CreateContractLimit | ExitError_OutOfOffset | ExitError_OutOfGas | ExitError_OutOfFund | ExitError_PCUnderflow | ExitError_CreateEmpty | ExitError_Other + +export interface ExitError_StackUnderflow { + __kind: 'StackUnderflow' } -/** - * 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: Uint8Array +export interface ExitError_StackOverflow { + __kind: 'StackOverflow' } -/** - * 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) +export interface ExitError_InvalidJump { + __kind: 'InvalidJump' } -/** - * 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: [Uint8Array, Uint8Array][] +export interface ExitError_InvalidRange { + __kind: 'InvalidRange' } -/** - * 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 ExitError_DesignatedInvalid { + __kind: 'DesignatedInvalid' +} + +export interface ExitError_CallTooDeep { + __kind: 'CallTooDeep' +} + +export interface ExitError_CreateCollision { + __kind: 'CreateCollision' +} + +export interface ExitError_CreateContractLimit { + __kind: 'CreateContractLimit' +} + +export interface ExitError_OutOfOffset { + __kind: 'OutOfOffset' +} + +export interface ExitError_OutOfGas { + __kind: 'OutOfGas' +} + +export interface ExitError_OutOfFund { + __kind: 'OutOfFund' +} + +export interface ExitError_PCUnderflow { + __kind: 'PCUnderflow' +} + +export interface ExitError_CreateEmpty { + __kind: 'CreateEmpty' +} + +export interface ExitError_Other { + __kind: 'Other' + value: string +} + +export type ExitRevert = ExitRevert_Reverted + +export interface ExitRevert_Reverted { + __kind: 'Reverted' +} + +export type ExitFatal = ExitFatal_NotSupported | ExitFatal_UnhandledInterrupt | ExitFatal_CallErrorAsFatal | ExitFatal_Other + +export interface ExitFatal_NotSupported { + __kind: 'NotSupported' +} + +export interface ExitFatal_UnhandledInterrupt { + __kind: 'UnhandledInterrupt' +} + +export interface ExitFatal_CallErrorAsFatal { + __kind: 'CallErrorAsFatal' + value: ExitError +} + +export interface ExitFatal_Other { + __kind: 'Other' + value: string +} + +export type DispatchError = DispatchError_Other | DispatchError_CannotLookup | DispatchError_BadOrigin | DispatchError_Module | DispatchError_ConsumerRemaining | DispatchError_NoProviders | DispatchError_Token | DispatchError_Arithmetic + +export interface DispatchError_Other { + __kind: 'Other' +} + +export interface DispatchError_CannotLookup { + __kind: 'CannotLookup' +} + +export interface DispatchError_BadOrigin { + __kind: 'BadOrigin' +} + +export interface DispatchError_Module { + __kind: 'Module' + value: DispatchErrorModule +} + +export interface DispatchError_ConsumerRemaining { + __kind: 'ConsumerRemaining' +} + +export interface DispatchError_NoProviders { + __kind: 'NoProviders' +} + +export interface DispatchError_Token { + __kind: 'Token' + value: TokenError +} + +export interface DispatchError_Arithmetic { + __kind: 'Arithmetic' + value: ArithmeticError +} + +export interface AccountVoteStandard { + vote: number + balance: bigint +} + +export interface AccountVoteSplit { + aye: bigint + nay: bigint +} + +export type EthTransactionAction = EthTransactionAction_Call | EthTransactionAction_Create + +export interface EthTransactionAction_Call { + __kind: 'Call' + value: Uint8Array +} + +export interface EthTransactionAction_Create { + __kind: 'Create' +} + +export interface EthTransactionSignature { + v: bigint + r: Uint8Array + s: Uint8Array +} + +export interface PreimageStatusAvailable { + data: Uint8Array + provider: Uint8Array + deposit: bigint + since: number + expiry: (number | undefined) +} + +export interface ReferendumStatus { + end: number + proposalHash: Uint8Array + threshold: VoteThreshold + delay: number + tally: Tally +} + +export interface ReferendumInfoFinished { + approved: boolean + end: number +} + +export interface EthLog { + address: Uint8Array + topics: Uint8Array[] + data: Uint8Array + blockHash: (Uint8Array | undefined) + blockNumber: (bigint | undefined) + transactionHash: (Uint8Array | undefined) + transactionIndex: (bigint | undefined) + logIndex: (bigint | undefined) + transactionLogIndex: (bigint | undefined) + removed: boolean +} + +export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event + +/** + * A dispatch that will fill the block weight up to the given ratio. + */ +export interface SystemCall_fill_block { + __kind: 'fill_block' + ratio: number +} + +/** + * Make some on-chain remark. + * + * # + * - `O(1)` + * # + */ +export interface SystemCall_remark { + __kind: 'remark' + remark: Uint8Array +} + +/** + * 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 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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 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: [Uint8Array, Uint8Array][] +} + +/** + * 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: Uint8Array[] @@ -245,206 +590,714 @@ export interface SystemCall_kill_prefix { } /** - * Make some on-chain remark and emit event. + * 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: Uint8Array +} + +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade + +/** + * Force an already scheduled validation function upgrade to happen on a particular block. + * + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. + */ +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number +} + +/** + * Set the current validation data. + * + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. + * + * The dispatch origin for this call must be `Inherent` + * + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. + */ +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData +} + +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array +} + +export type RandomnessCollectiveFlipCall = never + +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 type BalancesCall = BalancesCall_transfer | BalancesCall_set_balance | BalancesCall_force_transfer | BalancesCall_transfer_keep_alive + +/** + * 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: Uint8Array + 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: Uint8Array + newFree: bigint + newReserved: bigint +} + +/** + * 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: Uint8Array + dest: Uint8Array + 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: Uint8Array + value: bigint +} + +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less + +/** + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` + */ +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range +} + +/** + * Set the annual inflation rate to derive per-round inflation + */ +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range +} + +/** + * Set the account that will hold funds set aside for parachain bond + */ +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' + new: Uint8Array +} + +/** + * Set the percent of inflation set aside for parachain bond + */ +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number +} + +/** + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round + */ +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number +} + +/** + * Set the commission for all collators + */ +export interface ParachainStakingCall_set_collator_commission { + __kind: 'set_collator_commission' + pct: number +} + +/** + * Set blocks per round + * - if called with `new` less than length of current round, will transition immediately + * in the next block + * - also updates per-round inflation config + */ +export interface ParachainStakingCall_set_blocks_per_round { + __kind: 'set_blocks_per_round' + new: number +} + +/** + * Join the set of collator candidates + */ +export interface ParachainStakingCall_join_candidates { + __kind: 'join_candidates' + bond: bigint +} + +/** + * Request to leave the set of candidates. If successful, the account is immediately + * removed from the candidate pool to prevent selection as a collator, but unbonding is + * executed with a delay of `BondDuration` rounds. + */ +export interface ParachainStakingCall_leave_candidates { + __kind: 'leave_candidates' +} + +/** + * Temporarily leave the set of collator candidates without unbonding + */ +export interface ParachainStakingCall_go_offline { + __kind: 'go_offline' +} + +/** + * Rejoin the set of collator candidates if previously had called `go_offline` + */ +export interface ParachainStakingCall_go_online { + __kind: 'go_online' +} + +/** + * Bond more for collator candidates + */ +export interface ParachainStakingCall_candidate_bond_more { + __kind: 'candidate_bond_more' + more: bigint +} + +/** + * Bond less for collator candidates + */ +export interface ParachainStakingCall_candidate_bond_less { + __kind: 'candidate_bond_less' + less: bigint +} + +/** + * If caller is not a nominator, then join the set of nominators + * If caller is a nominator, then makes nomination to change their nomination state + */ +export interface ParachainStakingCall_nominate { + __kind: 'nominate' + collator: Uint8Array + amount: bigint +} + +/** + * Leave the set of nominators and, by implication, revoke all ongoing nominations + */ +export interface ParachainStakingCall_leave_nominators { + __kind: 'leave_nominators' +} + +/** + * Revoke an existing nomination + */ +export interface ParachainStakingCall_revoke_nomination { + __kind: 'revoke_nomination' + collator: Uint8Array +} + +/** + * Bond more for nominators with respect to a specific collator candidate + */ +export interface ParachainStakingCall_nominator_bond_more { + __kind: 'nominator_bond_more' + candidate: Uint8Array + more: bigint +} + +/** + * Bond less for nominators with respect to a specific nominator candidate + */ +export interface ParachainStakingCall_nominator_bond_less { + __kind: 'nominator_bond_less' + candidate: Uint8Array + less: bigint +} + +export type AuthorInherentCall = AuthorInherentCall_set_author + +/** + * Inherent to set the author of a block + */ +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array +} + +export type AuthorFilterCall = AuthorFilterCall_set_eligible + +/** + * Update the eligible ratio. Intended to be called by governance. + */ +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number +} + +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + +/** + * Register your AuthorId onchain so blocks you author are associated with your account. + * + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. + */ +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array +} + +/** + * Change your AuthorId. + * + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. + */ +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array +} + +/** + * Clear your AuthorId. + * + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. + */ +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array +} + +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + +/** + * 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_72[] +} + +/** + * 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_72 +} + +/** + * 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_72[] +} + +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + +/** + * 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: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_72 +} + +/** + * 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. * * # - * - `O(b)` where b is the length of the remark. - * - 1 event. + * Weight is a function of the number of proxies the user has (P). * # */ -export interface SystemCall_remark_with_event { - __kind: 'remark_with_event' - remark: Uint8Array +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all - /** - * Send a batch of dispatch calls. - * - * May be called from any origin. + * Unregister a proxy account for the sender. * - * - `calls`: The calls to be dispatched from the same origin. + * The dispatch origin for this call must be _Signed_. * - * If origin is root then call are dispatch without checking origin filter. (This includes - * bypassing `frame_system::Config::BaseCallFilter`). + * 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. * * # - * - Complexity: O(C) where C is the number of calls to be batched. + * Weight is a function of the number of proxies the user has (P). * # - * - * 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_34[] +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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. + * Unregister all proxy accounts for the sender. * - * 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. + * The dispatch origin for this call must be _Signed_. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * 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.** * - * The dispatch origin for this call must be _Signed_. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_34 +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * Send a batch of dispatch calls and atomically execute them. - * The whole transaction will rollback and fail if any of the calls failed. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * May be called from any origin. + * Requires a `Signed` origin. * - * - `calls`: The calls to be dispatched from the same 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. * - * If origin is root then call are dispatch without checking origin filter. (This includes - * bypassing `frame_system::Config::BaseCallFilter`). + * 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. * * # - * - Complexity: O(C) where C is the number of calls to be batched. + * Weight is a function of the number of proxies the user has (P). * # + * TODO: Might be over counting 1 read */ -export interface UtilityCall_batch_all { - __kind: 'batch_all' - calls: Type_34[] +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number } -export type TimestampCall = TimestampCall_set - /** - * Set the current time. + * Removes a previously spawned anonymous proxy. * - * 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. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * The timestamp should be greater than the previous one by the amount specified by - * `MinimumPeriod`. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * The dispatch origin for this call must be `Inherent`. + * - `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. * * # - * - `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)`. + * Weight is a function of the number of proxies the user has (P). * # */ -export interface TimestampCall_set { - __kind: 'set' - now: bigint +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } -export type BalancesCall = BalancesCall_transfer | BalancesCall_set_balance | BalancesCall_force_transfer | BalancesCall_transfer_keep_alive - /** - * Transfer some liquid free balance to another account. + * Publish the hash of a proxy-call that will be made in the future. * - * `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. + * 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. * - * The dispatch origin for this call must be `Signed` by the transactor. + * No more than `MaxPending` announcements may be made at any one time. * - * # - * - 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. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * Related functions: + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. * - * - `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. + * 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 BalancesCall_transfer { - __kind: 'transfer' - dest: Uint8Array - value: bigint +export interface ProxyCall_announce { + __kind: 'announce' + real: Uint8Array + callHash: Uint8Array } /** - * Set the balances of a given account. + * Remove a given announcement. * - * 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`). + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * The dispatch origin for this call is `root`. + * 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. * * # - * - 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` + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. * # */ -export interface BalancesCall_set_balance { - __kind: 'set_balance' - who: Uint8Array - newFree: bigint - newReserved: bigint +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: Uint8Array + callHash: Uint8Array } /** - * Exactly as `transfer`, except the origin must be root and the source account may be - * specified. + * 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. + * * # - * - Same as transfer, but additional read and write because the source account is - * not assumed to be in the overlay. + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. * # */ -export interface BalancesCall_force_transfer { - __kind: 'force_transfer' - source: Uint8Array - dest: Uint8Array - value: bigint +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: Uint8Array + callHash: Uint8Array } /** - * Same as the [`transfer`] call, but with a check that the transfer will not kill the - * origin account. + * 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_. * - * 99% of the time you want [`transfer`] instead. + * 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. * - * [`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) - * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface BalancesCall_transfer_keep_alive { - __kind: 'transfer_keep_alive' - dest: Uint8Array - value: bigint +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_72 } export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as @@ -463,7 +1316,7 @@ export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall */ export interface SudoCall_sudo { __kind: 'sudo' - call: Type_34 + call: Type_72 } /** @@ -480,7 +1333,7 @@ export interface SudoCall_sudo { */ export interface SudoCall_sudo_unchecked_weight { __kind: 'sudo_unchecked_weight' - call: Type_34 + call: Type_72 weight: bigint } @@ -497,290 +1350,89 @@ export interface SudoCall_sudo_unchecked_weight { */ export interface SudoCall_set_key { __kind: 'set_key' - new: Uint8Array -} - -/** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # - */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_34 -} - -export type RandomnessCollectiveFlipCall = never - -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - -/** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. - */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number -} - -/** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. - */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - pct: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number -} - -/** - * Join the set of collator candidates - */ -export interface ParachainStakingCall_join_candidates { - __kind: 'join_candidates' - bond: bigint -} - -/** - * Request to leave the set of candidates. If successful, the account is immediately - * removed from the candidate pool to prevent selection as a collator, but unbonding is - * executed with a delay of `BondDuration` rounds. - */ -export interface ParachainStakingCall_leave_candidates { - __kind: 'leave_candidates' -} - -/** - * Temporarily leave the set of collator candidates without unbonding - */ -export interface ParachainStakingCall_go_offline { - __kind: 'go_offline' -} - -/** - * Rejoin the set of collator candidates if previously had called `go_offline` - */ -export interface ParachainStakingCall_go_online { - __kind: 'go_online' -} - -/** - * Bond more for collator candidates - */ -export interface ParachainStakingCall_candidate_bond_more { - __kind: 'candidate_bond_more' - more: bigint + new: Uint8Array } /** - * Bond less for collator candidates + * Authenticates the sudo key and dispatches a function call with `Signed` origin from + * a given account. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # */ -export interface ParachainStakingCall_candidate_bond_less { - __kind: 'candidate_bond_less' - less: bigint +export interface SudoCall_sudo_as { + __kind: 'sudo_as' + who: Uint8Array + call: Type_72 } +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + /** - * If caller is not a nominator, then join the set of nominators - * If caller is a nominator, then makes nomination to change their nomination state + * Withdraw balance from EVM into currency/balances pallet. */ -export interface ParachainStakingCall_nominate { - __kind: 'nominate' - collator: Uint8Array - amount: bigint +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint } /** - * Leave the set of nominators and, by implication, revoke all ongoing nominations + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. */ -export interface ParachainStakingCall_leave_nominators { - __kind: 'leave_nominators' +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) } /** - * Revoke an existing nomination + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. */ -export interface ParachainStakingCall_revoke_nomination { - __kind: 'revoke_nomination' - collator: Uint8Array +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) } /** - * Bond more for nominators with respect to a specific collator candidate + * Issue an EVM create2 operation. */ -export interface ParachainStakingCall_nominator_bond_more { - __kind: 'nominator_bond_more' - candidate: Uint8Array - more: bigint +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) } +export type EthereumCall = EthereumCall_transact + /** - * Bond less for nominators with respect to a specific nominator candidate + * Transact an Ethereum transaction. */ -export interface ParachainStakingCall_nominator_bond_less { - __kind: 'nominator_bond_less' - candidate: Uint8Array - less: bigint +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction } export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after @@ -802,7 +1454,7 @@ export interface SchedulerCall_schedule { when: number maybePeriodic: ([number, number] | undefined) priority: number - call: Type_34 + call: Type_72 } /** @@ -841,7 +1493,7 @@ export interface SchedulerCall_schedule_named { when: number maybePeriodic: ([number, number] | undefined) priority: number - call: Type_34 + call: Type_72 } /** @@ -873,7 +1525,7 @@ export interface SchedulerCall_schedule_after { after: number maybePeriodic: ([number, number] | undefined) priority: number - call: Type_34 + call: Type_72 } /** @@ -889,7 +1541,7 @@ export interface SchedulerCall_schedule_named_after { after: number maybePeriodic: ([number, number] | undefined) priority: number - call: Type_34 + call: Type_72 } export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal @@ -1305,207 +1957,35 @@ export interface DemocracyCall_enact_proposal { * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 - * # + * + * - `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 CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1533,7 +2013,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1552,7 +2032,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1587,7 +2067,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1610,7 +2090,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1649,7 +2129,7 @@ export interface TechComitteeCollectiveCall_vote { * - up to 3 events * # */ -export interface TechComitteeCollectiveCall_close { +export interface CouncilCollectiveCall_close { __kind: 'close' proposalHash: Uint8Array index: number @@ -1672,527 +2152,349 @@ export interface TechComitteeCollectiveCall_close { * * Writes: Voting, Proposals, ProposalOf * # */ -export interface TechComitteeCollectiveCall_disapprove_proposal { +export interface CouncilCollectiveCall_disapprove_proposal { __kind: 'disapprove_proposal' proposalHash: Uint8Array } -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. The first time each - * contributor calls this function pays no fees - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We only set this to "initialized" once we receive index==limit - * This is expected to be executed with batch_all, that atomically initializes contributions - * TODO Should we perform sanity checks here? (i.e., min contribution) - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] - index: number - limit: number -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array -} - -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - -/** - * 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: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_34 -} - -/** - * 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: Uint8Array - proxyType: ProxyType - delay: number -} - +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal + /** - * Unregister a proxy account for the sender. + * Set the collective's membership. * - * The dispatch origin for this call must be _Signed_. + * - `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. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Unregister all proxy accounts for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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.** + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * 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. + * Add a new proposal to either be voted on or executed directly. * - * Fails with `Duplicate` if this has already been called in this transaction, from the - * same sender, with the same parameters. + * Requires the sender to be member. * - * Fails if there are insufficient funds to pay for deposit. + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number - index: number +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: 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. + * Add an aye or nay vote for the sender to the given proposal. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array index: number - height: number - extIndex: number + approve: boolean } /** - * Publish the hash of a proxy-call that will be made in the future. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * 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. + * May be called by any signed account in order to finish voting and close the proposal. * - * No more than `MaxPending` announcements may be made at any one time. + * 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. * - * This will take a deposit of `AnnouncementDepositFactor` as well as - * `AnnouncementDepositBase` if there are no other pending announcements. + * 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. * - * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * 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. * - * 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. + * + `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 is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * ## 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 ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } /** - * Remove a given announcement. - * - * May be called by a proxy account to remove a call they previously announced and return - * the deposit. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + /** - * 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. + * 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. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: Uint8Array } /** - * Dispatch the given `call` from an account that the sender is authorized for through - * `add_proxy`. + * Reject a proposed spend. The original deposit will be slashed. * - * Removes any corresponding announcement(s). + * May only be called from `T::RejectOrigin`. * - * The dispatch origin for this call must be _Signed_. + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # + */ +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number +} + +/** + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * 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. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_34 -} - -export interface ChangesTrieConfiguration { - digestInterval: number - digestLevels: number +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } -export type Type_34 = Type_34_System | Type_34_Utility | Type_34_Timestamp | Type_34_Balances | Type_34_Sudo | Type_34_RandomnessCollectiveFlip | Type_34_ParachainSystem | Type_34_EVM | Type_34_Ethereum | Type_34_ParachainStaking | Type_34_Scheduler | Type_34_Democracy | Type_34_CouncilCollective | Type_34_TechComitteeCollective | Type_34_Treasury | Type_34_AuthorInherent | Type_34_AuthorFilter | Type_34_CrowdloanRewards | Type_34_AuthorMapping | Type_34_Proxy +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_initialize_reward_vec -export interface Type_34_System { - __kind: 'System' - value: SystemCall +/** + * Associate a native rewards_destination identity with a crowdloan contribution. + * + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs + * + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution + */ +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature } -export interface Type_34_Utility { - __kind: 'Utility' - value: UtilityCall +/** + * Collect whatever portion of your reward are currently vested. The first time each + * contributor calls this function pays no fees + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' } -export interface Type_34_Timestamp { - __kind: 'Timestamp' - value: TimestampCall +/** + * Update reward address. To determine whether its something we want to keep + */ +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array } -export interface Type_34_Balances { - __kind: 'Balances' - value: BalancesCall +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We only set this to "initialized" once we receive index==limit + * This is expected to be executed with batch_all, that atomically initializes contributions + * TODO Should we perform sanity checks here? (i.e., min contribution) + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] + index: number + limit: number } -export interface Type_34_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface DispatchErrorModule { + index: number + error: number } -export interface Type_34_RandomnessCollectiveFlip { - __kind: 'RandomnessCollectiveFlip' - value: RandomnessCollectiveFlipCall -} +export type TokenError = TokenError_NoFunds | TokenError_WouldDie | TokenError_BelowMinimum | TokenError_CannotCreate | TokenError_UnknownAsset | TokenError_Frozen | TokenError_Underflow | TokenError_Overflow -export interface Type_34_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface TokenError_NoFunds { + __kind: 'NoFunds' } -export interface Type_34_EVM { - __kind: 'EVM' - value: EVMCall +export interface TokenError_WouldDie { + __kind: 'WouldDie' } -export interface Type_34_Ethereum { - __kind: 'Ethereum' - value: EthereumCall +export interface TokenError_BelowMinimum { + __kind: 'BelowMinimum' } -export interface Type_34_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall +export interface TokenError_CannotCreate { + __kind: 'CannotCreate' } -export interface Type_34_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall +export interface TokenError_UnknownAsset { + __kind: 'UnknownAsset' } -export interface Type_34_Democracy { - __kind: 'Democracy' - value: DemocracyCall +export interface TokenError_Frozen { + __kind: 'Frozen' } -export interface Type_34_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall +export interface TokenError_Underflow { + __kind: 'Underflow' } -export interface Type_34_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall +export interface TokenError_Overflow { + __kind: 'Overflow' } -export interface Type_34_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} +export type ArithmeticError = ArithmeticError_Underflow | ArithmeticError_Overflow | ArithmeticError_DivisionByZero -export interface Type_34_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface ArithmeticError_Underflow { + __kind: 'Underflow' } -export interface Type_34_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export interface ArithmeticError_Overflow { + __kind: 'Overflow' } -export interface Type_34_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ArithmeticError_DivisionByZero { + __kind: 'DivisionByZero' } -export interface Type_34_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface Tally { + ayes: bigint + nays: bigint + turnout: bigint } -export interface Type_34_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number } export interface ParachainInherentData { @@ -2202,79 +2504,112 @@ export interface ParachainInherentData { horizontalMessages: [number, InboundHrmpMessage[]][] } -export interface EthTransaction { - nonce: bigint - gasPrice: bigint - gasLimit: bigint - action: EthTransactionAction - value: bigint - input: Uint8Array - signature: EthTransactionSignature -} - export interface Range { min: bigint ideal: bigint max: bigint } -export type AccountVote = AccountVote_Standard | AccountVote_Split +export type Type_72 = Type_72_System | Type_72_ParachainSystem | Type_72_RandomnessCollectiveFlip | Type_72_Timestamp | Type_72_Balances | Type_72_ParachainStaking | Type_72_AuthorInherent | Type_72_AuthorFilter | Type_72_AuthorMapping | Type_72_Utility | Type_72_Proxy | Type_72_Sudo | Type_72_EVM | Type_72_Ethereum | Type_72_Scheduler | Type_72_Democracy | Type_72_CouncilCollective | Type_72_TechComitteeCollective | Type_72_Treasury | Type_72_CrowdloanRewards -export interface AccountVote_Standard { - __kind: 'Standard' - value: AccountVoteStandard +export interface Type_72_System { + __kind: 'System' + value: SystemCall } -export interface AccountVote_Split { - __kind: 'Split' - value: AccountVoteSplit +export interface Type_72_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x +export interface Type_72_RandomnessCollectiveFlip { + __kind: 'RandomnessCollectiveFlip' + value: RandomnessCollectiveFlipCall +} -export interface Conviction_None { - __kind: 'None' +export interface Type_72_Timestamp { + __kind: 'Timestamp' + value: TimestampCall } -export interface Conviction_Locked1x { - __kind: 'Locked1x' +export interface Type_72_Balances { + __kind: 'Balances' + value: BalancesCall } -export interface Conviction_Locked2x { - __kind: 'Locked2x' +export interface Type_72_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Conviction_Locked3x { - __kind: 'Locked3x' +export interface Type_72_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Conviction_Locked4x { - __kind: 'Locked4x' +export interface Type_72_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall } -export interface Conviction_Locked5x { - __kind: 'Locked5x' +export interface Type_72_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall } -export interface Conviction_Locked6x { - __kind: 'Locked6x' +export interface Type_72_Utility { + __kind: 'Utility' + value: UtilityCall } -export type MultiSignature = MultiSignature_Ed25519 | MultiSignature_Sr25519 | MultiSignature_Ecdsa +export interface Type_72_Proxy { + __kind: 'Proxy' + value: ProxyCall +} -export interface MultiSignature_Ed25519 { - __kind: 'Ed25519' - value: Uint8Array +export interface Type_72_Sudo { + __kind: 'Sudo' + value: SudoCall } -export interface MultiSignature_Sr25519 { - __kind: 'Sr25519' - value: Uint8Array +export interface Type_72_EVM { + __kind: 'EVM' + value: EVMCall } -export interface MultiSignature_Ecdsa { - __kind: 'Ecdsa' - value: Uint8Array +export interface Type_72_Ethereum { + __kind: 'Ethereum' + value: EthereumCall +} + +export interface Type_72_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_72_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_72_CouncilCollective { + __kind: 'CouncilCollective' + value: CouncilCollectiveCall +} + +export interface Type_72_TechComitteeCollective { + __kind: 'TechComitteeCollective' + value: TechComitteeCollectiveCall +} + +export interface Type_72_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_72_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping @@ -2307,6 +2642,23 @@ export interface ProxyType_AuthorMapping { __kind: 'AuthorMapping' } +export type MultiSignature = MultiSignature_Ed25519 | MultiSignature_Sr25519 | MultiSignature_Ecdsa + +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Uint8Array +} + +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Uint8Array +} + +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Uint8Array +} + export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number @@ -2327,30 +2679,3 @@ export interface InboundHrmpMessage { sentAt: number data: Uint8Array } - -export type EthTransactionAction = EthTransactionAction_Call | EthTransactionAction_Create - -export interface EthTransactionAction_Call { - __kind: 'Call' - value: Uint8Array -} - -export interface EthTransactionAction_Create { - __kind: 'Create' -} - -export interface EthTransactionSignature { - v: bigint - r: Uint8Array - s: Uint8Array -} - -export interface AccountVoteStandard { - vote: number - balance: bigint -} - -export interface AccountVoteSplit { - aye: bigint - nay: bigint -} diff --git a/src/types/v501.ts b/src/types/v501.ts index e3d36978..ecab3c0e 100644 --- a/src/types/v501.ts +++ b/src/types/v501.ts @@ -1,15 +1,15 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy | Proposal_MaintenanceMode +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_MaintenanceMode | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } export interface Proposal_Timestamp { @@ -22,14 +22,39 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall } export interface Proposal_EVM { @@ -42,11 +67,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -72,36 +92,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface Proposal_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -250,72 +245,50 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } export type TimestampCall = TimestampCall_set @@ -466,253 +439,72 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_hotfix_unreserve_nomination | ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Temporary root function to return nominations + * - charges uniform 0.2% of block weight as fee per call */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 +export interface ParachainStakingCall_hotfix_unreserve_nomination { + __kind: 'hotfix_unreserve_nomination' + stakers: [Uint8Array, bigint][] } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_set_key { - __kind: 'set_key' - new: Uint8Array +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' + new: Uint8Array } -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the percent of inflation set aside for parachain bond */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number } -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - /** - * Withdraw balance from EVM into currency/balances module. + * Set the commission for all collators */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint +export interface ParachainStakingCall_set_collator_commission { + __kind: 'set_collator_commission' + new: number } /** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_hotfix_unreserve_nomination | ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Temporary root function to return nominations - * - charges uniform 0.2% of block weight as fee per call - */ -export interface ParachainStakingCall_hotfix_unreserve_nomination { - __kind: 'hotfix_unreserve_nomination' - stakers: [Uint8Array, bigint][] -} - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config + * Set blocks per round + * - if called with `new` less than length of current round, will transition immediately + * in the next block + * - also updates per-round inflation config */ export interface ParachainStakingCall_set_blocks_per_round { __kind: 'set_blocks_per_round' @@ -816,296 +608,758 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } +export type AuthorFilterCall = AuthorFilterCall_set_eligible + /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_cancel { - __kind: 'cancel' - when: number - index: number +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Schedule a named task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Cancel a named scheduled task. + * Change your AuthorId. * - * # - * - 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 - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + /** - * Schedule a named task after a delay. + * 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`). * * # - * Same as [`schedule_named`]. + * - 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 SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_73[] } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - /** - * Propose a sensitive action to be taken. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * 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. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * 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. * - * Emits `Proposed`. + * NOTE: Prior to version *12, this was called `as_limited_sub`. * - * Weight: `O(p)` + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_73 } /** - * Signals agreement with a particular proposal. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * May be called from any origin. * - * - `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. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * 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 DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_73[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * 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. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be _Signed_. + * Removes any corresponding announcement(s). * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_73 } /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `CancellationOrigin`. + * The dispatch origin for this call must be _Signed_. * - * -`ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Unregister a proxy account for the sender. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to - * schedule an external referendum. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `ExternalDefaultOrigin`. + * Requires a `Signed` origin. * - * - `proposal_hash`: The preimage hash of the proposal. + * - `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. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number } /** - * 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. + * Removes a previously spawned anonymous proxy. * - * The dispatch of this call must be `FastTrackOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `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. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Started`. + * - `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. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number - delay: number +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Veto and blacklist the external proposal hash. + * Publish the hash of a proxy-call that will be made in the future. * - * The dispatch origin of this call must be `VetoOrigin`. + * 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. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * No more than `MaxPending` announcements may be made at any one time. * - * Emits `Vetoed`. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` + * 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 DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array +export interface ProxyCall_announce { + __kind: 'announce' + real: Uint8Array + callHash: Uint8Array } /** - * Remove a referendum. + * Remove a given announcement. * - * The dispatch origin of this call must be _Root_. + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * - `ref_index`: The index of the referendum to cancel. + * The dispatch origin for this call must be _Signed_. * - * # Weight: `O(1)`. + * 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 DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: Uint8Array + callHash: Uint8Array } /** - * Cancel a proposal queued for enactment. + * Remove the given announcement of a delegate. * - * The dispatch origin of this call must be _Root_. + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_73 +} + +export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation + +/** + * Place the chain in maintenance mode + * + * Weight cost is: + * * One DB read to ensure we're not already in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event + */ +export interface MaintenanceModeCall_enter_maintenance_mode { + __kind: 'enter_maintenance_mode' +} + +/** + * Return the chain to normal operating mode + * + * Weight cost is: + * * One DB read to ensure we're in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event + */ +export interface MaintenanceModeCall_resume_normal_operation { + __kind: 'resume_normal_operation' +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances module. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_73 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_73 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_73 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_73 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array + votingPeriod: number + delay: number +} + +/** + * 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: Uint8Array +} + +/** + * 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 +} + +/** + * Cancel a proposal queued for enactment. + * + * The dispatch origin of this call must be _Root_. * * - `which`: The index of the referendum to cancel. * @@ -1335,210 +1589,38 @@ export interface DemocracyCall_enact_proposal { * * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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. + * then it will be cancelled. * - * 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. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * + `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. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * # - * ## 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 - * # + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1566,7 +1648,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1585,7 +1667,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1620,7 +1702,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1643,7 +1725,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1682,477 +1764,318 @@ export interface TechComitteeCollectiveCall_vote { * - up to 3 events * # */ -export interface TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - * Weight argument is 0 since it depends on how the storage trie is composed - * Once we have the number of contributors, we can probably add such a weight here - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - * Weight argument is 0 since it depends on how the storage trie is composed - * Once we have the number of contributors, we can probably add such a weight here - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end relay block is higher than the init relay block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We check that the number of contributors inserted is less than T::MaxInitContributors::get() - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. - * - * Removes any corresponding announcement(s). + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal + /** - * Register a proxy account for the sender that is able to make calls on its behalf. + * Set the collective's membership. * - * The dispatch origin for this call must be _Signed_. + * - `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. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Unregister a proxy account for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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.** + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * 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. + * Add an aye or nay vote for the sender to the given proposal. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array index: number + approve: boolean } /** - * Removes a previously spawned anonymous proxy. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * WARNING: **All access to this account will be lost.** Any funds held in it will be - * inaccessible. + * May be called by any signed account in order to finish voting and close the proposal. * - * Requires a `Signed` origin, and the sender account must have been created by a call to - * `anonymous` with corresponding parameters. + * 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. * - * - `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. + * 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. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number - height: number - extIndex: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array +} + +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + +/** + * 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: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution + * Weight argument is 0 since it depends on how the storage trie is composed + * Once we have the number of contributors, we can probably add such a weight here */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature } -export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation +/** + * Collect whatever portion of your reward are currently vested. + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} /** - * Place the chain in maintenance mode - * - * Weight cost is: - * * One DB read to ensure we're not already in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * Update reward address. To determine whether its something we want to keep + * Weight argument is 0 since it depends on how the storage trie is composed + * Once we have the number of contributors, we can probably add such a weight here */ -export interface MaintenanceModeCall_enter_maintenance_mode { - __kind: 'enter_maintenance_mode' +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array } /** - * Return the chain to normal operating mode - * - * Weight cost is: - * * One DB read to ensure we're in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * This extrinsic completes the initialization if some checks are fullfiled. These checks are: + * -The reward contribution money matches the crowdloan pot + * -The end relay block is higher than the init relay block + * -The initialization has not complete yet */ -export interface MaintenanceModeCall_resume_normal_operation { - __kind: 'resume_normal_operation' +export interface CrowdloanRewardsCall_complete_initialization { + __kind: 'complete_initialization' + leaseEndingBlock: number +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We check that the number of contributors inserted is less than T::MaxInitContributors::get() + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] } export interface ChangesTrieConfiguration { @@ -2160,113 +2083,144 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy | Type_35_MaintenanceMode +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_73 = Type_73_System | Type_73_ParachainSystem | Type_73_Timestamp | Type_73_Balances | Type_73_ParachainStaking | Type_73_AuthorInherent | Type_73_AuthorFilter | Type_73_AuthorMapping | Type_73_Utility | Type_73_Proxy | Type_73_MaintenanceMode | Type_73_EVM | Type_73_Ethereum | Type_73_Scheduler | Type_73_Democracy | Type_73_CouncilCollective | Type_73_TechComitteeCollective | Type_73_Treasury | Type_73_CrowdloanRewards -export interface Type_35_System { +export interface Type_73_System { __kind: 'System' value: SystemCall } -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_73_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export interface Type_35_Timestamp { +export interface Type_73_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_35_Balances { +export interface Type_73_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Type_73_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_73_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Type_73_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_73_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_73_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_73_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_73_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall } -export interface Type_35_EVM { +export interface Type_73_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_35_Ethereum { +export interface Type_73_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { +export interface Type_73_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_35_Democracy { +export interface Type_73_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_35_CouncilCollective { +export interface Type_73_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_35_TechComitteeCollective { +export interface Type_73_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_35_Treasury { +export interface Type_73_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_73_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface Type_35_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2279,12 +2233,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2344,36 +2292,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v52.ts b/src/types/v53.ts similarity index 97% rename from src/types/v52.ts rename to src/types/v53.ts index 594fb8a0..55dbcea2 100644 --- a/src/types/v52.ts +++ b/src/types/v53.ts @@ -1,15 +1,20 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_RandomnessCollectiveFlip | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_RandomnessCollectiveFlip | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_Sudo | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall +} + +export interface Proposal_RandomnessCollectiveFlip { + __kind: 'RandomnessCollectiveFlip' + value: RandomnessCollectiveFlipCall } export interface Proposal_Timestamp { @@ -22,19 +27,39 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Proposal_RandomnessCollectiveFlip { - __kind: 'RandomnessCollectiveFlip' - value: RandomnessCollectiveFlipCall +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_Sudo { + __kind: 'Sudo' + value: SudoCall } export interface Proposal_EVM { @@ -47,11 +72,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -77,31 +97,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -250,74 +250,54 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_34[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_34 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_34[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } +export type RandomnessCollectiveFlipCall = never + export type TimestampCall = TimestampCall_set /** @@ -440,235 +420,52 @@ export interface BalancesCall_transfer_keep_alive { value: bigint } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_34 +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_34 - weight: bigint +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_set_key { - __kind: 'set_key' +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' new: Uint8Array } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the percent of inflation set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_34 +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } -export type RandomnessCollectiveFlipCall = never - -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. - */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators + * Set the commission for all collators */ export interface ParachainStakingCall_set_collator_commission { __kind: 'set_collator_commission' @@ -781,298 +578,808 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_34 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } +export type AuthorFilterCall = AuthorFilterCall_set_eligible + /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_cancel { - __kind: 'cancel' - when: number - index: number +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Schedule a named task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_34 +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Cancel a named scheduled task. + * Change your AuthorId. * - * # - * - 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 - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_34 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + /** - * Schedule a named task after a delay. + * 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`). * * # - * Same as [`schedule_named`]. + * - 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 SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_34 +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_72[] } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - /** - * Propose a sensitive action to be taken. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * 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. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * 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. * - * Emits `Proposed`. + * NOTE: Prior to version *12, this was called `as_limited_sub`. * - * Weight: `O(p)` + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_72 } /** - * Signals agreement with a particular proposal. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * May be called from any origin. * - * - `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. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * 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 DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_72[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * 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. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be _Signed_. + * Removes any corresponding announcement(s). * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_72 } /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `CancellationOrigin`. + * The dispatch origin for this call must be _Signed_. * - * -`ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Unregister a proxy account for the sender. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to - * schedule an external referendum. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `ExternalDefaultOrigin`. + * Requires a `Signed` origin. * - * - `proposal_hash`: The preimage hash of the proposal. + * - `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. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number } /** - * 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. + * Removes a previously spawned anonymous proxy. * - * The dispatch of this call must be `FastTrackOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `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. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Started`. + * - `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. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number - delay: number +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Veto and blacklist the external proposal hash. - * - * The dispatch origin of this call must be `VetoOrigin`. + * Publish the hash of a proxy-call that will be made in the future. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * 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. * - * Emits `Vetoed`. + * No more than `MaxPending` announcements may be made at any one time. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` - */ -export interface DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array -} - -/** - * Remove a referendum. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * The dispatch origin of this call must be _Root_. + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. * - * - `ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number +export interface ProxyCall_announce { + __kind: 'announce' + real: Uint8Array + callHash: Uint8Array } /** - * Cancel a proposal queued for enactment. + * Remove a given announcement. * - * The dispatch origin of this call must be _Root_. + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * - `which`: The index of the referendum to cancel. + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_72 +} + +export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as + +/** + * Authenticates the sudo key and dispatches a function call with `Root` origin. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # + */ +export interface SudoCall_sudo { + __kind: 'sudo' + call: Type_72 +} + +/** + * Authenticates the sudo key and dispatches a function call with `Root` origin. + * This function does not check the weight of the call, and instead allows the + * Sudo user to specify the weight of the call. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - The weight of this call is defined by the caller. + * # + */ +export interface SudoCall_sudo_unchecked_weight { + __kind: 'sudo_unchecked_weight' + call: Type_72 + weight: bigint +} + +/** + * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB change. + * # + */ +export interface SudoCall_set_key { + __kind: 'set_key' + new: Uint8Array +} + +/** + * Authenticates the sudo key and dispatches a function call with `Signed` origin from + * a given account. + * + * The dispatch origin for this call must be _Signed_. + * + * # + * - O(1). + * - Limited storage reads. + * - One DB write (event). + * - Weight of derivative `call` execution + 10,000. + * # + */ +export interface SudoCall_sudo_as { + __kind: 'sudo_as' + who: Uint8Array + call: Type_72 +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances pallet. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_72 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_72 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_72 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_72 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array + votingPeriod: number + delay: number +} + +/** + * 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: Uint8Array +} + +/** + * 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 +} + +/** + * 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`. */ @@ -1286,224 +1593,52 @@ export interface DemocracyCall_remove_other_vote { } /** - * 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: Uint8Array - index: number -} - -/** - * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 - * # + * Enact a proposal from a referendum. For now we just make the weight be the maximum. */ -export interface CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array +export interface DemocracyCall_enact_proposal { + __kind: 'enact_proposal' + proposalHash: Uint8Array index: number - approve: boolean } /** - * 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. + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. * - * 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 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. * - * 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. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * + `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. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * # - * ## 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 - * # + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1531,7 +1666,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1550,7 +1685,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1585,7 +1720,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1608,7 +1743,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1644,446 +1779,311 @@ export interface TechComitteeCollectiveCall_vote { * - 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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. The first time each - * contributor calls this function pays no fees - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We only set this to "initialized" once we receive index==limit - * This is expected to be executed with batch_all, that atomically initializes contributions - * TODO Should we perform sanity checks here? (i.e., min contribution) - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] - index: number - limit: number -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. + * - up to 3 events + * # */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } /** - * Clear your AuthorId. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. + * 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 AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. + * Set the collective's membership. * - * Removes any corresponding announcement(s). + * - `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. * - * The dispatch origin for this call must be _Signed_. + * Requires root origin. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_34 +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * 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_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister a proxy account for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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. + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Add an aye or nay vote for the sender to the given proposal. * - * 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.** + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array + index: number + approve: boolean } /** - * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and - * initialize it with a proxy of `proxy_type` for `origin` sender. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * Requires a `Signed` origin. + * May be called by any signed account in order to finish voting and close the proposal. * - * - `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. + * 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. * - * Fails with `Duplicate` if this has already been called in this transaction, from the - * same sender, with the same parameters. + * 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. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * - `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. + * Must be called by the Root origin. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType - index: number - height: number - extIndex: number +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + /** - * 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. + * 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. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` * # */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_34 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature +} + +/** + * Collect whatever portion of your reward are currently vested. The first time each + * contributor calls this function pays no fees + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} + +/** + * Update reward address. To determine whether its something we want to keep + */ +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We only set this to "initialized" once we receive index==limit + * This is expected to be executed with batch_all, that atomically initializes contributions + * TODO Should we perform sanity checks here? (i.e., min contribution) + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] + index: number + limit: number } export interface ChangesTrieConfiguration { @@ -2091,113 +2091,149 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_34 = Type_34_System | Type_34_Utility | Type_34_Timestamp | Type_34_Balances | Type_34_Sudo | Type_34_RandomnessCollectiveFlip | Type_34_ParachainSystem | Type_34_EVM | Type_34_Ethereum | Type_34_ParachainStaking | Type_34_Scheduler | Type_34_Democracy | Type_34_CouncilCollective | Type_34_TechComitteeCollective | Type_34_Treasury | Type_34_AuthorInherent | Type_34_AuthorFilter | Type_34_CrowdloanRewards | Type_34_AuthorMapping | Type_34_Proxy +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_72 = Type_72_System | Type_72_ParachainSystem | Type_72_RandomnessCollectiveFlip | Type_72_Timestamp | Type_72_Balances | Type_72_ParachainStaking | Type_72_AuthorInherent | Type_72_AuthorFilter | Type_72_AuthorMapping | Type_72_Utility | Type_72_Proxy | Type_72_Sudo | Type_72_EVM | Type_72_Ethereum | Type_72_Scheduler | Type_72_Democracy | Type_72_CouncilCollective | Type_72_TechComitteeCollective | Type_72_Treasury | Type_72_CrowdloanRewards -export interface Type_34_System { +export interface Type_72_System { __kind: 'System' value: SystemCall } -export interface Type_34_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_72_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall +} + +export interface Type_72_RandomnessCollectiveFlip { + __kind: 'RandomnessCollectiveFlip' + value: RandomnessCollectiveFlipCall } -export interface Type_34_Timestamp { +export interface Type_72_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_34_Balances { +export interface Type_72_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_34_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Type_72_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Type_34_RandomnessCollectiveFlip { - __kind: 'RandomnessCollectiveFlip' - value: RandomnessCollectiveFlipCall +export interface Type_72_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Type_34_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_72_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_72_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_72_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_72_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_72_Sudo { + __kind: 'Sudo' + value: SudoCall } -export interface Type_34_EVM { +export interface Type_72_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_34_Ethereum { +export interface Type_72_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_34_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_34_Scheduler { +export interface Type_72_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_34_Democracy { +export interface Type_72_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_34_CouncilCollective { +export interface Type_72_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_34_TechComitteeCollective { +export interface Type_72_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_34_Treasury { +export interface Type_72_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_34_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_72_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_34_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_34_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_34_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_34_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' +} + +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2210,12 +2246,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2275,36 +2305,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v600.ts b/src/types/v600.ts index ae09837f..ffd10c26 100644 --- a/src/types/v600.ts +++ b/src/types/v600.ts @@ -1,15 +1,15 @@ import type {Result, Option} from './support' -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy | Proposal_MaintenanceMode +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_MaintenanceMode | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } export interface Proposal_Timestamp { @@ -22,14 +22,39 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Proposal_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Proposal_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Proposal_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Proposal_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Proposal_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Proposal_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall } export interface Proposal_EVM { @@ -42,11 +67,6 @@ export interface Proposal_Ethereum { value: EthereumCall } -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - export interface Proposal_Scheduler { __kind: 'Scheduler' value: SchedulerCall @@ -72,36 +92,11 @@ export interface Proposal_Treasury { value: TreasuryCall } -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - export interface Proposal_CrowdloanRewards { __kind: 'CrowdloanRewards' value: CrowdloanRewardsCall } -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface Proposal_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall -} - export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event /** @@ -250,72 +245,50 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } export type TimestampCall = TimestampCall_set @@ -466,257 +439,76 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_set_key { - __kind: 'set_key' +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' new: Uint8Array } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the percent of inflation set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. + * Set the commission for all collators */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array +export interface ParachainStakingCall_set_collator_commission { + __kind: 'set_collator_commission' + new: number } -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array +/** + * Set blocks per round + * - if called with `new` less than length of current round, will transition immediately + * in the next block + * - also updates per-round inflation config + */ +export interface ParachainStakingCall_set_blocks_per_round { + __kind: 'set_blocks_per_round' + new: number } -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - /** - * Withdraw balance from EVM into currency/balances module. + * Join the set of collator candidates */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number -} - -/** - * Join the set of collator candidates - */ -export interface ParachainStakingCall_join_candidates { - __kind: 'join_candidates' - bond: bigint - candidateCount: number +export interface ParachainStakingCall_join_candidates { + __kind: 'join_candidates' + bond: bigint + candidateCount: number } /** @@ -807,303 +599,765 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } +export type AuthorFilterCall = AuthorFilterCall_set_eligible + /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_cancel { - __kind: 'cancel' - when: number - index: number +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Schedule a named task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Cancel a named scheduled task. + * Change your AuthorId. * - * # - * - 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 - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all + /** - * Schedule a named task after a delay. + * 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`). * * # - * Same as [`schedule_named`]. + * - 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 SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_71[] } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - /** - * Propose a sensitive action to be taken. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * 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. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * 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. * - * Emits `Proposed`. + * NOTE: Prior to version *12, this was called `as_limited_sub`. * - * Weight: `O(p)` + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_71 } /** - * Signals agreement with a particular proposal. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * May be called from any origin. * - * - `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. + * - `calls`: The calls to be dispatched from the same origin. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * 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 DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_71[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * 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. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be _Signed_. + * Removes any corresponding announcement(s). * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 } /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `CancellationOrigin`. + * The dispatch origin for this call must be _Signed_. * - * -`ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Unregister a proxy account for the sender. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to - * schedule an external referendum. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `ExternalDefaultOrigin`. + * Requires a `Signed` origin. * - * - `proposal_hash`: The preimage hash of the proposal. + * - `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. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType + delay: number + index: number } /** - * 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. + * Removes a previously spawned anonymous proxy. * - * The dispatch of this call must be `FastTrackOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `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. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Started`. + * - `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. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number - delay: number +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Veto and blacklist the external proposal hash. - * - * The dispatch origin of this call must be `VetoOrigin`. + * Publish the hash of a proxy-call that will be made in the future. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * 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. * - * Emits `Vetoed`. + * No more than `MaxPending` announcements may be made at any one time. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` - */ -export interface DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array -} - -/** - * Remove a referendum. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * The dispatch origin of this call must be _Root_. + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. * - * - `ref_index`: The index of the referendum to cancel. + * 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: `O(1)`. + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number +export interface ProxyCall_announce { + __kind: 'announce' + real: Uint8Array + callHash: Uint8Array } /** - * Cancel a proposal queued for enactment. + * Remove a given announcement. * - * The dispatch origin of this call must be _Root_. + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * - `which`: The index of the referendum to cancel. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. - */ -export interface DemocracyCall_cancel_queued { - __kind: 'cancel_queued' + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + callHash: Uint8Array +} + +/** + * 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: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 +} + +export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation + +/** + * Place the chain in maintenance mode + * + * Weight cost is: + * * One DB read to ensure we're not already in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event + */ +export interface MaintenanceModeCall_enter_maintenance_mode { + __kind: 'enter_maintenance_mode' +} + +/** + * Return the chain to normal operating mode + * + * Weight cost is: + * * One DB read to ensure we're in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event + */ +export interface MaintenanceModeCall_resume_normal_operation { + __kind: 'resume_normal_operation' +} + +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 + +/** + * Withdraw balance from EVM into currency/balances module. + */ +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint +} + +/** + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + */ +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. + */ +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +/** + * Issue an EVM create2 operation. + */ +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) +} + +export type EthereumCall = EthereumCall_transact + +/** + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * 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: Type_71 +} + +/** + * 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 +} + +/** + * 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: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +/** + * 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: Uint8Array +} + +/** + * 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: Type_71 +} + +/** + * Schedule a named task after a delay. + * + * # + * Same as [`schedule_named`]. + * # + */ +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 +} + +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + +/** + * 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: Uint8Array + value: bigint +} + +/** + * 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 +} + +/** + * 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 +} + +/** + * 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. + * + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array +} + +/** + * 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: Uint8Array + votingPeriod: number + delay: number +} + +/** + * 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: Uint8Array +} + +/** + * 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 +} + +/** + * 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 } @@ -1326,210 +1580,38 @@ export interface DemocracyCall_enact_proposal { * * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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. + * then it will be cancelled. * - * 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. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * + `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. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * # - * ## 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 - * # + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface CouncilCollectiveCall_close { - __kind: 'close' +export interface DemocracyCall_blacklist { + __kind: 'blacklist' proposalHash: Uint8Array - index: number - proposalWeightBound: bigint - lengthBound: number + maybeRefIndex: (number | undefined) } /** - * Disapprove a proposal, close, and remove it from the system, regardless of its current state. + * Remove a proposal. * - * Must be called by the Root origin. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Parameters: - * * `proposal_hash`: The hash of the proposal that should be disapproved. + * - `prop_index`: The index of the proposal to cancel. * - * # - * Complexity: O(P) where P is the number of max proposals - * DB Weight: - * * Reads: Proposals - * * Writes: Voting, Proposals, ProposalOf - * # + * Weight: `O(p)` where `p = PublicProps::::decode_len()` */ -export interface CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal /** * Set the collective's membership. @@ -1557,7 +1639,7 @@ export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members * - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one * # */ -export interface TechComitteeCollectiveCall_set_members { +export interface CouncilCollectiveCall_set_members { __kind: 'set_members' newMembers: Uint8Array[] prime: (Uint8Array | undefined) @@ -1576,7 +1658,7 @@ export interface TechComitteeCollectiveCall_set_members { * - 1 event * # */ -export interface TechComitteeCollectiveCall_execute { +export interface CouncilCollectiveCall_execute { __kind: 'execute' proposal: Proposal lengthBound: number @@ -1611,7 +1693,7 @@ export interface TechComitteeCollectiveCall_execute { * - 1 event * # */ -export interface TechComitteeCollectiveCall_propose { +export interface CouncilCollectiveCall_propose { __kind: 'propose' threshold: number proposal: Proposal @@ -1634,7 +1716,7 @@ export interface TechComitteeCollectiveCall_propose { * - 1 event * # */ -export interface TechComitteeCollectiveCall_vote { +export interface CouncilCollectiveCall_vote { __kind: 'vote' proposal: Uint8Array index: number @@ -1673,477 +1755,318 @@ export interface TechComitteeCollectiveCall_vote { * - up to 3 events * # */ -export interface TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * This is an unsigned call because the caller may not have any funds to pay fees with. - * This is inspired by Polkadot's claims pallet: - * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs - * - * The contributor needs to issue an additional addmemo transaction if it wants to receive - * the reward in a parachain native account. For the moment I will leave this function here - * just in case the contributor forgot to add such a memo field. Whenever we can read the - * state of the relay chain, we should first check whether that memo field exists in the - * contribution - * Weight argument is 0 since it depends on how the storage trie is composed - * Once we have the number of contributors, we can probably add such a weight here - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address. To determine whether its something we want to keep - * Weight argument is 0 since it depends on how the storage trie is composed - * Once we have the number of contributors, we can probably add such a weight here - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end relay block is higher than the init relay block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * We can change this behavior to check this beforehand if we prefer - * We check that the number of contributors inserted is less than T::MaxInitContributors::get() - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - /** - * Dispatch the given `call` from an account that the sender is authorised for through - * `add_proxy`. - * - * Removes any corresponding announcement(s). + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of the number of proxies the user has (P). + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_proxy { - __kind: 'proxy' - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal + /** - * Register a proxy account for the sender that is able to make calls on its behalf. + * Set the collective's membership. * - * The dispatch origin for this call must be _Signed_. + * - `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. * - * 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. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Unregister a proxy account for the sender. - * - * The dispatch origin for this call must be _Signed_. + * Dispatch a proposal from a member using the `Member` origin. * - * 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. + * Origin must be a member of the collective. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Unregister all proxy accounts for the sender. + * Add a new proposal to either be voted on or executed directly. * - * The dispatch origin for this call must be _Signed_. + * Requires the sender to be member. * - * 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.** + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * * # - * Weight is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_remove_proxies { - __kind: 'remove_proxies' +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * 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. + * Add an aye or nay vote for the sender to the given proposal. * - * Fails if there are insufficient funds to pay for deposit. + * 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 is a function of the number of proxies the user has (P). + * ## 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 * # - * TODO: Might be over counting 1 read */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array index: number + approve: boolean } /** - * Removes a previously spawned anonymous proxy. + * Close a vote that is either approved, disapproved or whose voting period has ended. * - * WARNING: **All access to this account will be lost.** Any funds held in it will be - * inaccessible. + * May be called by any signed account in order to finish voting and close the proposal. * - * Requires a `Signed` origin, and the sender account must have been created by a call to - * `anonymous` with corresponding parameters. + * 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. * - * - `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. + * 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. * - * Fails with `NoPermission` in case the caller is not a previously created anonymous - * account whose `anonymous` call has corresponding parameters. + * 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 is a function of the number of proxies the user has (P). + * ## 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 ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array index: number - height: number - extIndex: number + proposalWeightBound: bigint + lengthBound: 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. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * Must be called by the Root origin. * * 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. + * * `proposal_hash`: The hash of the proposal that should be disapproved. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf * # */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array +} + +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + +/** + * 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: Uint8Array } /** - * 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_. + * Reject a proposed spend. The original deposit will be slashed. * - * 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. + * May only be called from `T::RejectOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` * # */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * 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_. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Parameters: - * - `delegate`: The account that previously announced the call. - * - `call_hash`: The hash of the call to be made. + * May only be called from `T::ApproveOrigin`. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` * # */ -export interface ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec + /** - * 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_. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * 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. + * This is an unsigned call because the caller may not have any funds to pay fees with. + * This is inspired by Polkadot's claims pallet: + * https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs * - * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. - * # + * The contributor needs to issue an additional addmemo transaction if it wants to receive + * the reward in a parachain native account. For the moment I will leave this function here + * just in case the contributor forgot to add such a memo field. Whenever we can read the + * state of the relay chain, we should first check whether that memo field exists in the + * contribution + * Weight argument is 0 since it depends on how the storage trie is composed + * Once we have the number of contributors, we can probably add such a weight here */ -export interface ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature } -export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation +/** + * Collect whatever portion of your reward are currently vested. + */ +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' +} /** - * Place the chain in maintenance mode - * - * Weight cost is: - * * One DB read to ensure we're not already in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * Update reward address. To determine whether its something we want to keep + * Weight argument is 0 since it depends on how the storage trie is composed + * Once we have the number of contributors, we can probably add such a weight here */ -export interface MaintenanceModeCall_enter_maintenance_mode { - __kind: 'enter_maintenance_mode' +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array } /** - * Return the chain to normal operating mode - * - * Weight cost is: - * * One DB read to ensure we're in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * This extrinsic completes the initialization if some checks are fullfiled. These checks are: + * -The reward contribution money matches the crowdloan pot + * -The end relay block is higher than the init relay block + * -The initialization has not complete yet */ -export interface MaintenanceModeCall_resume_normal_operation { - __kind: 'resume_normal_operation' +export interface CrowdloanRewardsCall_complete_initialization { + __kind: 'complete_initialization' + leaseEndingBlock: number +} + +/** + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * We can change this behavior to check this beforehand if we prefer + * We check that the number of contributors inserted is less than T::MaxInitContributors::get() + */ +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] } export interface ChangesTrieConfiguration { @@ -2151,113 +2074,144 @@ export interface ChangesTrieConfiguration { digestLevels: number } -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy | Type_35_MaintenanceMode +export interface ParachainInherentData { + validationData: PersistedValidationData + relayChainState: StorageProof + downwardMessages: InboundDownwardMessage[] + horizontalMessages: [number, InboundHrmpMessage[]][] +} + +export interface Range { + min: bigint + ideal: bigint + max: bigint +} + +export type Type_71 = Type_71_System | Type_71_ParachainSystem | Type_71_Timestamp | Type_71_Balances | Type_71_ParachainStaking | Type_71_AuthorInherent | Type_71_AuthorFilter | Type_71_AuthorMapping | Type_71_Utility | Type_71_Proxy | Type_71_MaintenanceMode | Type_71_EVM | Type_71_Ethereum | Type_71_Scheduler | Type_71_Democracy | Type_71_CouncilCollective | Type_71_TechComitteeCollective | Type_71_Treasury | Type_71_CrowdloanRewards -export interface Type_35_System { +export interface Type_71_System { __kind: 'System' value: SystemCall } -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Type_71_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export interface Type_35_Timestamp { +export interface Type_71_Timestamp { __kind: 'Timestamp' value: TimestampCall } -export interface Type_35_Balances { +export interface Type_71_Balances { __kind: 'Balances' value: BalancesCall } -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall +export interface Type_71_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall +export interface Type_71_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall +} + +export interface Type_71_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall +} + +export interface Type_71_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall +} + +export interface Type_71_Utility { + __kind: 'Utility' + value: UtilityCall +} + +export interface Type_71_Proxy { + __kind: 'Proxy' + value: ProxyCall +} + +export interface Type_71_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall } -export interface Type_35_EVM { +export interface Type_71_EVM { __kind: 'EVM' value: EVMCall } -export interface Type_35_Ethereum { +export interface Type_71_Ethereum { __kind: 'Ethereum' value: EthereumCall } -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { +export interface Type_71_Scheduler { __kind: 'Scheduler' value: SchedulerCall } -export interface Type_35_Democracy { +export interface Type_71_Democracy { __kind: 'Democracy' value: DemocracyCall } -export interface Type_35_CouncilCollective { +export interface Type_71_CouncilCollective { __kind: 'CouncilCollective' value: CouncilCollectiveCall } -export interface Type_35_TechComitteeCollective { +export interface Type_71_TechComitteeCollective { __kind: 'TechComitteeCollective' value: TechComitteeCollectiveCall } -export interface Type_35_Treasury { +export interface Type_71_Treasury { __kind: 'Treasury' value: TreasuryCall } -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall +export interface Type_71_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall +export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping + +export interface ProxyType_Any { + __kind: 'Any' } -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall +export interface ProxyType_NonTransfer { + __kind: 'NonTransfer' } -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall +export interface ProxyType_Governance { + __kind: 'Governance' } -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall +export interface ProxyType_Staking { + __kind: 'Staking' } -export interface Type_35_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall +export interface ProxyType_CancelProxy { + __kind: 'CancelProxy' } -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] +export interface ProxyType_Balances { + __kind: 'Balances' +} + +export interface ProxyType_AuthorMapping { + __kind: 'AuthorMapping' } export interface EthTransaction { @@ -2270,12 +2224,6 @@ export interface EthTransaction { signature: EthTransactionSignature } -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - export type AccountVote = AccountVote_Standard | AccountVote_Split export interface AccountVote_Standard { @@ -2335,36 +2283,6 @@ export interface MultiSignature_Ecdsa { value: Uint8Array } -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - export interface PersistedValidationData { parentHead: Uint8Array relayParentNumber: number diff --git a/src/types/v701.ts b/src/types/v701.ts index 619fe003..73359bf1 100644 --- a/src/types/v701.ts +++ b/src/types/v701.ts @@ -11,16 +11,16 @@ export interface DispatchResult_Err { value: DispatchError } -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy | Proposal_MaintenanceMode | Proposal_Identity | Proposal_XcmpQueue | Proposal_DmpQueue | Proposal_Assets | Proposal_XTokens | Proposal_AssetManager +export type Proposal = Proposal_System | Proposal_ParachainSystem | Proposal_Timestamp | Proposal_Balances | Proposal_ParachainStaking | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_AuthorMapping | Proposal_Utility | Proposal_Proxy | Proposal_MaintenanceMode | Proposal_Identity | Proposal_EVM | Proposal_Ethereum | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_CrowdloanRewards export interface Proposal_System { __kind: 'System' value: SystemCall } -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall +export interface Proposal_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } export interface Proposal_Timestamp { @@ -33,56 +33,11 @@ export interface Proposal_Balances { value: BalancesCall } -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall -} - -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - -export interface Proposal_EVM { - __kind: 'EVM' - value: EVMCall -} - -export interface Proposal_Ethereum { - __kind: 'Ethereum' - value: EthereumCall -} - export interface Proposal_ParachainStaking { __kind: 'ParachainStaking' value: ParachainStakingCall } -export interface Proposal_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall -} - -export interface Proposal_Democracy { - __kind: 'Democracy' - value: DemocracyCall -} - -export interface Proposal_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall -} - -export interface Proposal_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall -} - -export interface Proposal_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} - export interface Proposal_AuthorInherent { __kind: 'AuthorInherent' value: AuthorInherentCall @@ -93,16 +48,16 @@ export interface Proposal_AuthorFilter { value: AuthorFilterCall } -export interface Proposal_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall -} - export interface Proposal_AuthorMapping { __kind: 'AuthorMapping' value: AuthorMappingCall } +export interface Proposal_Utility { + __kind: 'Utility' + value: UtilityCall +} + export interface Proposal_Proxy { __kind: 'Proxy' value: ProxyCall @@ -118,29 +73,44 @@ export interface Proposal_Identity { value: IdentityCall } -export interface Proposal_XcmpQueue { - __kind: 'XcmpQueue' - value: XcmpQueueCall +export interface Proposal_EVM { + __kind: 'EVM' + value: EVMCall +} + +export interface Proposal_Ethereum { + __kind: 'Ethereum' + value: EthereumCall +} + +export interface Proposal_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Proposal_Democracy { + __kind: 'Democracy' + value: DemocracyCall } -export interface Proposal_DmpQueue { - __kind: 'DmpQueue' - value: DmpQueueCall +export interface Proposal_CouncilCollective { + __kind: 'CouncilCollective' + value: CouncilCollectiveCall } -export interface Proposal_Assets { - __kind: 'Assets' - value: AssetsCall +export interface Proposal_TechComitteeCollective { + __kind: 'TechComitteeCollective' + value: TechComitteeCollectiveCall } -export interface Proposal_XTokens { - __kind: 'XTokens' - value: XTokensCall +export interface Proposal_Treasury { + __kind: 'Treasury' + value: TreasuryCall } -export interface Proposal_AssetManager { - __kind: 'AssetManager' - value: AssetManagerCall +export interface Proposal_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } export type DispatchError = DispatchError_Other | DispatchError_CannotLookup | DispatchError_BadOrigin | DispatchError_Module | DispatchError_ConsumerRemaining | DispatchError_NoProviders | DispatchError_Token | DispatchError_Arithmetic @@ -328,74 +298,50 @@ export interface SystemCall_remark_with_event { remark: Uint8Array } -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all +export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade /** - * 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. - * # + * Force an already scheduled validation function upgrade to happen on a particular block. * - * 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. + * Note that coordinating this block for the upgrade has to happen independently on the + * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, + * and this bypasses all checks and and normal protocols. Very easy to brick your chain + * if done wrong. */ -export interface UtilityCall_batch { - __kind: 'batch' - calls: Type_35[] +export interface ParachainSystemCall_set_upgrade_block { + __kind: 'set_upgrade_block' + relayChainBlock: number } /** - * 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. + * Set the current validation data. * - * 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. + * This should be invoked exactly once per block. It will panic at the finalization + * phase if the call was not invoked. * - * NOTE: Prior to version *12, this was called `as_limited_sub`. + * The dispatch origin for this call must be `Inherent` * - * The dispatch origin for this call must be _Signed_. + * As a side effect, this function upgrades the current validation function + * if the appropriate time has come. */ -export interface UtilityCall_as_derivative { - __kind: 'as_derivative' - index: number - call: Type_35 +export interface ParachainSystemCall_set_validation_data { + __kind: 'set_validation_data' + data: ParachainInherentData } -/** - * 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_35[] +export interface ParachainSystemCall_sudo_send_upward_message { + __kind: 'sudo_send_upward_message' + message: Uint8Array +} + +export interface ParachainSystemCall_authorize_upgrade { + __kind: 'authorize_upgrade' + codeHash: Uint8Array +} + +export interface ParachainSystemCall_enact_authorized_upgrade { + __kind: 'enact_authorized_upgrade' + code: Uint8Array } export type TimestampCall = TimestampCall_set @@ -546,248 +492,67 @@ export interface BalancesCall_transfer_all { keepAlive: boolean } -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as +export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the expectations for total staked. These expectations determine the issuance for + * the round according to logic in `fn compute_issuance` */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 +export interface ParachainStakingCall_set_staking_expectations { + __kind: 'set_staking_expectations' + expectations: Range } /** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # + * Set the annual inflation rate to derive per-round inflation */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint +export interface ParachainStakingCall_set_inflation { + __kind: 'set_inflation' + schedule: Range } /** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # + * Set the account that will hold funds set aside for parachain bond */ -export interface SudoCall_set_key { - __kind: 'set_key' +export interface ParachainStakingCall_set_parachain_bond_account { + __kind: 'set_parachain_bond_account' new: Uint8Array } /** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # + * Set the percent of inflation set aside for parachain bond */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 +export interface ParachainStakingCall_set_parachain_bond_reserve_percent { + __kind: 'set_parachain_bond_reserve_percent' + new: number } -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - /** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. + * Set the total number of collator candidates selected per round + * - changes are not applied until the start of the next round */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number +export interface ParachainStakingCall_set_total_selected { + __kind: 'set_total_selected' + new: number } /** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. + * Set the commission for all collators */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData +export interface ParachainStakingCall_set_collator_commission { + __kind: 'set_collator_commission' + new: number } -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number +/** + * Set blocks per round + * - if called with `new` less than length of current round, will transition immediately + * in the next block + * - also updates per-round inflation config + */ +export interface ParachainStakingCall_set_blocks_per_round { + __kind: 'set_blocks_per_round' + new: number } /** @@ -887,2309 +652,1808 @@ export interface ParachainStakingCall_nominator_bond_less { less: bigint } -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after +export type AuthorInherentCall = AuthorInherentCall_set_author /** - * 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 - * # + * Inherent to set the author of a block */ -export interface SchedulerCall_schedule { - __kind: 'schedule' - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorInherentCall_set_author { + __kind: 'set_author' + author: Uint8Array } -/** - * 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 -} +export type AuthorFilterCall = AuthorFilterCall_set_eligible /** - * 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 - * # + * Update the eligible ratio. Intended to be called by governance. */ -export interface SchedulerCall_schedule_named { - __kind: 'schedule_named' - id: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorFilterCall_set_eligible { + __kind: 'set_eligible' + new: number } +export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association + /** - * Cancel a named scheduled task. + * Register your AuthorId onchain so blocks you author are associated with your account. * - * # - * - 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 - * # + * Users who have been (or will soon be) elected active collators in staking, + * should submit this extrinsic to have their blocks accepted and earn rewards. */ -export interface SchedulerCall_cancel_named { - __kind: 'cancel_named' - id: Uint8Array +export interface AuthorMappingCall_add_association { + __kind: 'add_association' + authorId: Uint8Array } /** - * Anonymously schedule a task after a delay. + * Change your AuthorId. * - * # - * Same as [`schedule`]. - * # + * This is useful for normal key rotation or for when switching from one physical collator + * machine to another. No new security deposit is required. */ -export interface SchedulerCall_schedule_after { - __kind: 'schedule_after' - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_update_association { + __kind: 'update_association' + oldAuthorId: Uint8Array + newAuthorId: Uint8Array } /** - * Schedule a named task after a delay. + * Clear your AuthorId. * - * # - * Same as [`schedule_named`](Self::schedule_named). - * # + * This is useful when you are no longer an author and would like to re-claim your security + * deposit. */ -export interface SchedulerCall_schedule_named_after { - __kind: 'schedule_named_after' - id: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 +export interface AuthorMappingCall_clear_association { + __kind: 'clear_association' + authorId: Uint8Array } -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal +export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all /** - * Propose a sensitive action to be taken. + * Send a batch of dispatch calls. * - * The dispatch origin of this call must be _Signed_ and the sender must - * have funds to cover the deposit. + * May be called from any origin. * - * - `proposal_hash`: The hash of the proposal preimage. - * - `value`: The amount of deposit (must be at least `MinimumDeposit`). + * - `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). * - * Emits `Proposed`. + * If origin is root then call are dispatch without checking origin filter. (This includes + * bypassing `frame_system::Config::BaseCallFilter`). * - * Weight: `O(p)` + * # + * - 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 DemocracyCall_propose { - __kind: 'propose' - proposalHash: Uint8Array - value: bigint +export interface UtilityCall_batch { + __kind: 'batch' + calls: Type_71[] } /** - * Signals agreement with a particular proposal. + * Send a call through an indexed pseudonym of the sender. * - * The dispatch origin of this call must be _Signed_ and the sender - * must have funds to cover the deposit, equal to the original deposit. + * 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. * - * - `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. + * 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. * - * Weight: `O(S)` where S is the number of seconds a proposal already has. + * NOTE: Prior to version *12, this was called `as_limited_sub`. + * + * The dispatch origin for this call must be _Signed_. */ -export interface DemocracyCall_second { - __kind: 'second' - proposal: number - secondsUpperBound: number +export interface UtilityCall_as_derivative { + __kind: 'as_derivative' + index: number + call: Type_71 } /** - * 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. + * Send a batch of dispatch calls and atomically execute them. + * The whole transaction will rollback and fail if any of the calls failed. * - * The dispatch origin of this call must be _Signed_. + * May be called from any origin. * - * - `ref_index`: The index of the referendum to vote for. - * - `vote`: The vote configuration. + * - `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). * - * Weight: `O(R)` where R is the number of referendums the voter has voted on. + * 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 DemocracyCall_vote { - __kind: 'vote' - refIndex: number - vote: AccountVote +export interface UtilityCall_batch_all { + __kind: 'batch_all' + calls: Type_71[] } +export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced + /** - * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same - * referendum. + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. * - * The dispatch origin of this call must be `CancellationOrigin`. + * Removes any corresponding announcement(s). * - * -`ref_index`: The index of the referendum to cancel. + * The dispatch origin for this call must be _Signed_. * - * Weight: `O(1)`. + * 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 DemocracyCall_emergency_cancel { - __kind: 'emergency_cancel' - refIndex: number +export interface ProxyCall_proxy { + __kind: 'proxy' + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 } /** - * Schedule a referendum to be tabled once it is legal to schedule an external - * referendum. + * Register a proxy account for the sender that is able to make calls on its behalf. * - * The dispatch origin of this call must be `ExternalOrigin`. + * The dispatch origin for this call must be _Signed_. * - * - `proposal_hash`: The preimage hash of the proposal. + * 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: `O(V)` with V number of vetoers in the blacklist of proposal. - * Decoding vec of length V. Charged as maximum + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose { - __kind: 'external_propose' - proposalHash: Uint8Array +export interface ProxyCall_add_proxy { + __kind: 'add_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister a proxy account for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_majority { - __kind: 'external_propose_majority' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxy { + __kind: 'remove_proxy' + delegate: Uint8Array + proxyType: ProxyType + delay: number } /** - * 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`. + * Unregister all proxy accounts for the sender. * - * - `proposal_hash`: The preimage hash of the proposal. + * The dispatch origin for this call must be _Signed_. * - * Unlike `external_propose`, blacklisting has no effect on this and it may replace a - * pre-scheduled `external_propose` call. + * 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: `O(1)` + * # + * Weight is a function of the number of proxies the user has (P). + * # */ -export interface DemocracyCall_external_propose_default { - __kind: 'external_propose_default' - proposalHash: Uint8Array +export interface ProxyCall_remove_proxies { + __kind: 'remove_proxies' } /** - * 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. + * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and + * initialize it with a proxy of `proxy_type` for `origin` sender. * - * The dispatch of this call must be `FastTrackOrigin`. + * Requires a `Signed` origin. * - * - `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. + * - `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. * - * Emits `Started`. + * Fails with `Duplicate` if this has already been called in this transaction, from the + * same sender, with the same parameters. * - * Weight: `O(1)` + * 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 DemocracyCall_fast_track { - __kind: 'fast_track' - proposalHash: Uint8Array - votingPeriod: number +export interface ProxyCall_anonymous { + __kind: 'anonymous' + proxyType: ProxyType delay: number + index: number } /** - * Veto and blacklist the external proposal hash. + * Removes a previously spawned anonymous proxy. * - * The dispatch origin of this call must be `VetoOrigin`. + * WARNING: **All access to this account will be lost.** Any funds held in it will be + * inaccessible. * - * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + * Requires a `Signed` origin, and the sender account must have been created by a call to + * `anonymous` with corresponding parameters. * - * Emits `Vetoed`. + * - `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. * - * Weight: `O(V + log(V))` where V is number of `existing vetoers` + * 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 DemocracyCall_veto_external { - __kind: 'veto_external' - proposalHash: Uint8Array +export interface ProxyCall_kill_anonymous { + __kind: 'kill_anonymous' + spawner: Uint8Array + proxyType: ProxyType + index: number + height: number + extIndex: number } /** - * Remove a referendum. + * Publish the hash of a proxy-call that will be made in the future. * - * The dispatch origin of this call must be _Root_. + * 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. * - * - `ref_index`: The index of the referendum to cancel. + * No more than `MaxPending` announcements may be made at any one time. * - * # Weight: `O(1)`. - */ -export interface DemocracyCall_cancel_referendum { - __kind: 'cancel_referendum' - refIndex: number -} - -/** - * Cancel a proposal queued for enactment. + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. * - * The dispatch origin of this call must be _Root_. + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. * - * - `which`: The index of the referendum to cancel. + * 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: `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 + * # + * 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: Uint8Array + callHash: Uint8Array } /** - * 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. + * Remove a given announcement. * - * 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`). + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. * - * - `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. + * The dispatch origin for this call must be _Signed_. * - * Emits `Delegated`. + * 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: `O(R)` where R is the number of referendums the voter delegating to has - * voted on. Weight is charged as if maximum votes. + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface DemocracyCall_delegate { - __kind: 'delegate' - to: Uint8Array - conviction: Conviction - balance: bigint +export interface ProxyCall_remove_announcement { + __kind: 'remove_announcement' + real: Uint8Array + callHash: Uint8Array } /** - * Undelegate the voting power of the sending account. + * Remove the given announcement of a delegate. * - * Tokens may be unlocked following once an amount of time consistent with the lock period - * of the conviction with which the delegation was issued. + * 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 of this call must be _Signed_ and the signing account must be - * currently delegating. + * The dispatch origin for this call must be _Signed_. * - * Emits `Undelegated`. + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. * - * Weight: `O(R)` where R is the number of referendums the voter delegating to has - * voted on. Weight is charged as if maximum votes. + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # */ -export interface DemocracyCall_undelegate { - __kind: 'undelegate' +export interface ProxyCall_reject_announcement { + __kind: 'reject_announcement' + delegate: Uint8Array + callHash: Uint8Array } /** - * Clears all public proposals. + * Dispatch the given `call` from an account that the sender is authorized for through + * `add_proxy`. * - * The dispatch origin of this call must be _Root_. + * Removes any corresponding announcement(s). * - * Weight: `O(1)`. + * 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 DemocracyCall_clear_public_proposals { - __kind: 'clear_public_proposals' +export interface ProxyCall_proxy_announced { + __kind: 'proxy_announced' + delegate: Uint8Array + real: Uint8Array + forceProxyType: (ProxyType | undefined) + call: Type_71 } +export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation + /** - * 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`. + * Place the chain in maintenance mode * - * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * Weight cost is: + * * One DB read to ensure we're not already in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event */ -export interface DemocracyCall_note_preimage { - __kind: 'note_preimage' - encodedProposal: Uint8Array +export interface MaintenanceModeCall_enter_maintenance_mode { + __kind: 'enter_maintenance_mode' } /** - * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + * Return the chain to normal operating mode + * + * Weight cost is: + * * One DB read to ensure we're in maintenance mode + * * Two DB writes - 1 for the mode and 1 for the event */ -export interface DemocracyCall_note_preimage_operational { - __kind: 'note_preimage_operational' - encodedProposal: Uint8Array +export interface MaintenanceModeCall_resume_normal_operation { + __kind: 'resume_normal_operation' } +export type IdentityCall = IdentityCall_add_registrar | IdentityCall_set_identity | IdentityCall_set_subs | IdentityCall_clear_identity | IdentityCall_request_judgement | IdentityCall_cancel_request | IdentityCall_set_fee | IdentityCall_set_account_id | IdentityCall_set_fields | IdentityCall_provide_judgement | IdentityCall_kill_identity | IdentityCall_add_sub | IdentityCall_rename_sub | IdentityCall_remove_sub | IdentityCall_quit_sub + /** - * 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. + * Add a registrar to the system. * - * The dispatch origin of this call must be _Signed_. + * The dispatch origin for this call must be `T::RegistrarOrigin`. * - * - `encoded_proposal`: The preimage of a proposal. + * - `account`: the account of the registrar. * - * Emits `PreimageNoted`. + * Emits `RegistrarAdded` if successful. * - * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * # + * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). + * - One storage mutation (codec `O(R)`). + * - One event. + * # */ -export interface DemocracyCall_note_imminent_preimage { - __kind: 'note_imminent_preimage' - encodedProposal: Uint8Array +export interface IdentityCall_add_registrar { + __kind: 'add_registrar' + account: Uint8Array } /** - * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + * 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 DemocracyCall_note_imminent_preimage_operational { - __kind: 'note_imminent_preimage_operational' - encodedProposal: Uint8Array +export interface IdentityCall_set_identity { + __kind: 'set_identity' + info: IdentityInfo } /** - * Remove an expired proposal preimage and collect the deposit. - * - * The dispatch origin of this call must be _Signed_. + * Set the sub-accounts of the sender. * - * - `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. + * 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`. * - * 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. + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. * - * Emits `PreimageReaped`. + * - `subs`: The identity's (new) sub-accounts. * - * Weight: `O(D)` where D is length of proposal. + * # + * - `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 DemocracyCall_reap_preimage { - __kind: 'reap_preimage' - proposalHash: Uint8Array - proposalLenUpperBound: number +export interface IdentityCall_set_subs { + __kind: 'set_subs' + subs: [Uint8Array, Data][] } /** - * Unlock tokens that have an expired lock. + * Clear an account's identity info and all sub-accounts and return all deposits. * - * The dispatch origin of this call must be _Signed_. + * Payment: All reserved balances on the account are returned. * - * - `target`: The account to remove the lock on. + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * identity. * - * Weight: `O(R)` with R number of vote of target. + * 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 DemocracyCall_unlock { - __kind: 'unlock' - target: Uint8Array +export interface IdentityCall_clear_identity { + __kind: 'clear_identity' } /** - * Remove a vote for a referendum. + * Request a judgement from a registrar. * - * 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. + * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement + * given. * - * 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 for this call must be _Signed_ and the sender must have a + * registered identity. * - * The dispatch origin of this call must be _Signed_, and the signer must have a vote - * registered for referendum `index`. + * - `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: * - * - `index`: The index of referendum of the vote to be removed. + * ```nocompile + * Self::registrars().get(reg_index).unwrap().fee + * ``` * - * 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. + * 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 DemocracyCall_remove_vote { - __kind: 'remove_vote' - index: number +export interface IdentityCall_request_judgement { + __kind: 'request_judgement' + regIndex: number + maxFee: bigint } /** - * Remove a vote for a referendum. + * Cancel a previous request. * - * 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. + * Payment: A previously reserved deposit is returned on success. * - * The dispatch origin of this call must be _Signed_. + * The dispatch origin for this call must be _Signed_ and the sender must have a + * registered identity. * - * - `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. + * - `reg_index`: The index of the registrar whose judgement is no longer requested. * - * 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. + * Emits `JudgementUnrequested` if successful. + * + * # + * - `O(R + X)`. + * - One balance-reserve operation. + * - One storage mutation `O(R + X)`. + * - One event + * # */ -export interface DemocracyCall_remove_other_vote { - __kind: 'remove_other_vote' - target: Uint8Array - index: number +export interface IdentityCall_cancel_request { + __kind: 'cancel_request' + regIndex: number } /** - * Enact a proposal from a referendum. For now we just make the weight be the maximum. + * 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 DemocracyCall_enact_proposal { - __kind: 'enact_proposal' - proposalHash: Uint8Array +export interface IdentityCall_set_fee { + __kind: 'set_fee' index: number + fee: bigint } /** - * 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. + * Change the account associated with a registrar. * - * The dispatch origin of this call must be `BlacklistOrigin`. + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. * - * - `proposal_hash`: The proposal hash to blacklist permanently. - * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be - * cancelled. + * - `index`: the index of the registrar whose fee is to be set. + * - `new`: the new account ID. * - * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a - * reasonable value). + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) + * # */ -export interface DemocracyCall_blacklist { - __kind: 'blacklist' - proposalHash: Uint8Array - maybeRefIndex: (number | undefined) +export interface IdentityCall_set_account_id { + __kind: 'set_account_id' + index: number + new: Uint8Array } /** - * Remove a proposal. + * Set the field information for a registrar. * - * The dispatch origin of this call must be `CancelProposalOrigin`. + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `index`. * - * - `prop_index`: The index of the proposal to cancel. + * - `index`: the index of the registrar whose fee is to be set. + * - `fields`: the fields that the registrar concerns themselves with. * - * Weight: `O(p)` where `p = PublicProps::::decode_len()` + * # + * - `O(R)`. + * - One storage mutation `O(R)`. + * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) + * # */ -export interface DemocracyCall_cancel_proposal { - __kind: 'cancel_proposal' - propIndex: number +export interface IdentityCall_set_fields { + __kind: 'set_fields' + index: number + fields: bigint } -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - /** - * Set the collective's membership. + * Provide a judgement for an account's identity. * - * - `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. + * The dispatch origin for this call must be _Signed_ and the sender must be the account + * of the registrar whose index is `reg_index`. * - * Requires root origin. + * - `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`. * - * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but - * the weight estimations rely on it to estimate dispatchable weight. + * Emits `JudgementGiven` if successful. * * # - * ## 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 + * - `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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number +export interface IdentityCall_provide_judgement { + __kind: 'provide_judgement' + regIndex: number + target: Uint8Array + judgement: IdentityJudgement } /** - * Dispatch a proposal from a member using the `Member` origin. + * Remove an account's identity and sub-account information and slash the deposits. * - * Origin must be a member of the collective. + * 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. * * # - * ## 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 + * - `O(R + S + X)`. + * - One balance-reserve operation. + * - `S + 2` storage mutations. + * - One event. * # */ -export interface CouncilCollectiveCall_execute { - __kind: 'execute' - proposal: Proposal - lengthBound: number +export interface IdentityCall_kill_identity { + __kind: 'kill_identity' + target: Uint8Array } /** - * Add a new proposal to either be voted on or executed directly. + * Add the given account to the sender's subs. * - * Requires the sender to be member. + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. * - * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) - * or put up for voting. + * 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: Uint8Array + data: Data +} + +/** + * Alter the associated name of the given sub-account. * - * # - * ## 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 - * # + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. */ -export interface CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: number +export interface IdentityCall_rename_sub { + __kind: 'rename_sub' + sub: Uint8Array + data: Data } /** - * Add an aye or nay vote for the sender to the given proposal. + * Remove the given account from the sender's subs. * - * 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 CouncilCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal - -/** - * 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 TechComitteeCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 TechComitteeCollectiveCall_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 TechComitteeCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 TechComitteeCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_change_association_with_relay_keys | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * The caller needs to provide the unassociated relay account and a proof to succeed - * with the association - * The proof is nothing but a signature over the reward_address using the relay keys - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Change reward account by submitting proofs from relay accounts - * - * The number of valid proofs needs to be bigger than 'RewardAddressRelayVoteThreshold' - * The account to be changed needs to be submitted as 'previous_account' - */ -export interface CrowdloanRewardsCall_change_association_with_relay_keys { - __kind: 'change_association_with_relay_keys' - rewardAccount: Uint8Array - previousAccount: Uint8Array - proofs: [Uint8Array, MultiSignature][] -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address, proving that the caller owns the current native key - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end vesting block is higher than the init vesting block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * This does not enforce any checks other than making sure we dont go over funds - * complete_initialization should perform any additional - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array -} - -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - -/** - * 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: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 -} - -/** - * 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. + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender. * - * # - * Weight is a function of the number of proxies the user has (P). - * # + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * sub identity of `sub`. */ -export interface ProxyCall_add_proxy { - __kind: 'add_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface IdentityCall_remove_sub { + __kind: 'remove_sub' + sub: Uint8Array } /** - * Unregister a proxy account for the sender. + * Remove the sender as a sub-account. * - * The dispatch origin for this call must be _Signed_. + * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated + * to the sender (*not* the original depositor). * - * 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. + * The dispatch origin for this call must be _Signed_ and the sender must have a registered + * super-identity. * - * # - * Weight is a function of the number of proxies the user has (P). - * # + * 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 ProxyCall_remove_proxy { - __kind: 'remove_proxy' - delegate: Uint8Array - proxyType: ProxyType - delay: number +export interface IdentityCall_quit_sub { + __kind: 'quit_sub' } -/** - * 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' -} +export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 /** - * 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 + * Withdraw balance from EVM into currency/balances pallet. */ -export interface ProxyCall_anonymous { - __kind: 'anonymous' - proxyType: ProxyType - delay: number - index: number +export interface EVMCall_withdraw { + __kind: 'withdraw' + address: Uint8Array + value: bigint } /** - * 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). - * # + * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. */ -export interface ProxyCall_kill_anonymous { - __kind: 'kill_anonymous' - spawner: Uint8Array - proxyType: ProxyType - index: number - height: number - extIndex: number +export interface EVMCall_call { + __kind: 'call' + source: Uint8Array + target: Uint8Array + input: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) } /** - * 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. - * # + * Issue an EVM create operation. This is similar to a contract creation transaction in + * Ethereum. */ -export interface ProxyCall_announce { - __kind: 'announce' - real: Uint8Array - callHash: Uint8Array +export interface EVMCall_create { + __kind: 'create' + source: Uint8Array + init: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) } /** - * 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. - * # + * Issue an EVM create2 operation. */ -export interface ProxyCall_remove_announcement { - __kind: 'remove_announcement' - real: Uint8Array - callHash: Uint8Array +export interface EVMCall_create2 { + __kind: 'create2' + source: Uint8Array + init: Uint8Array + salt: Uint8Array + value: bigint + gasLimit: bigint + gasPrice: bigint + nonce: (bigint | undefined) } +export type EthereumCall = EthereumCall_transact + /** - * 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. + * Transact an Ethereum transaction. + */ +export interface EthereumCall_transact { + __kind: 'transact' + transaction: EthTransaction +} + +export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after + +/** + * Anonymously schedule a task. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - 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 ProxyCall_reject_announcement { - __kind: 'reject_announcement' - delegate: Uint8Array - callHash: Uint8Array +export interface SchedulerCall_schedule { + __kind: 'schedule' + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 } /** - * 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. + * Cancel an anonymously scheduled task. * * # - * Weight is a function of: - * - A: the number of announcements made. - * - P: the number of proxies the user has. + * - 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 ProxyCall_proxy_announced { - __kind: 'proxy_announced' - delegate: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 +export interface SchedulerCall_cancel { + __kind: 'cancel' + when: number + index: number } -export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation - /** - * Place the chain in maintenance mode + * Schedule a named task. * - * Weight cost is: - * * One DB read to ensure we're not already in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * # + * - 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 MaintenanceModeCall_enter_maintenance_mode { - __kind: 'enter_maintenance_mode' +export interface SchedulerCall_schedule_named { + __kind: 'schedule_named' + id: Uint8Array + when: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 } /** - * Return the chain to normal operating mode + * Cancel a named scheduled task. * - * Weight cost is: - * * One DB read to ensure we're in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event + * # + * - 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 MaintenanceModeCall_resume_normal_operation { - __kind: 'resume_normal_operation' +export interface SchedulerCall_cancel_named { + __kind: 'cancel_named' + id: Uint8Array } -export type IdentityCall = IdentityCall_add_registrar | IdentityCall_set_identity | IdentityCall_set_subs | IdentityCall_clear_identity | IdentityCall_request_judgement | IdentityCall_cancel_request | IdentityCall_set_fee | IdentityCall_set_account_id | IdentityCall_set_fields | IdentityCall_provide_judgement | IdentityCall_kill_identity | IdentityCall_add_sub | IdentityCall_rename_sub | IdentityCall_remove_sub | IdentityCall_quit_sub - /** - * 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. + * Anonymously schedule a task after a delay. * * # - * - `O(R)` where `R` registrar-count (governance-bounded and code-bounded). - * - One storage mutation (codec `O(R)`). - * - One event. + * Same as [`schedule`]. * # */ -export interface IdentityCall_add_registrar { - __kind: 'add_registrar' - account: Uint8Array +export interface SchedulerCall_schedule_after { + __kind: 'schedule_after' + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 } /** - * 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. + * Schedule a named task after a delay. * * # - * - `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. + * Same as [`schedule_named`](Self::schedule_named). * # */ -export interface IdentityCall_set_identity { - __kind: 'set_identity' - info: IdentityInfo +export interface SchedulerCall_schedule_named_after { + __kind: 'schedule_named_after' + id: Uint8Array + after: number + maybePeriodic: ([number, number] | undefined) + priority: number + call: Type_71 } +export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal + /** - * Set the sub-accounts of the sender. + * Propose a sensitive action to be taken. * - * 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 of this call must be _Signed_ and the sender must + * have funds to cover the deposit. * - * The dispatch origin for this call must be _Signed_ and the sender must have a registered - * identity. + * - `proposal_hash`: The hash of the proposal preimage. + * - `value`: The amount of deposit (must be at least `MinimumDeposit`). * - * - `subs`: The identity's (new) sub-accounts. + * Emits `Proposed`. * - * # - * - `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`). - * # + * Weight: `O(p)` */ -export interface IdentityCall_set_subs { - __kind: 'set_subs' - subs: [Uint8Array, Data][] +export interface DemocracyCall_propose { + __kind: 'propose' + proposalHash: Uint8Array + value: bigint } /** - * Clear an account's identity info and all sub-accounts and return all deposits. - * - * Payment: All reserved balances on the account are returned. + * Signals agreement with a particular proposal. * - * The dispatch origin for this call must be _Signed_ and the sender must have a registered - * identity. + * The dispatch origin of this call must be _Signed_ and the sender + * must have funds to cover the deposit, equal to the original deposit. * - * Emits `IdentityCleared` if successful. + * - `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. * - * # - * - `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. - * # + * Weight: `O(S)` where S is the number of seconds a proposal already has. */ -export interface IdentityCall_clear_identity { - __kind: 'clear_identity' +export interface DemocracyCall_second { + __kind: 'second' + proposal: number + secondsUpperBound: number } /** - * Request a judgement from a registrar. + * 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. * - * Payment: At most `max_fee` will be reserved for payment to the registrar if judgement - * given. + * The dispatch origin of this call must be _Signed_. * - * The dispatch origin for this call must be _Signed_ and the sender must have a - * registered identity. + * - `ref_index`: The index of the referendum to vote for. + * - `vote`: The vote configuration. * - * - `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: + * 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 +} + +/** + * Schedule an emergency cancellation of a referendum. Cannot happen twice to the same + * referendum. * - * ```nocompile - * Self::registrars().get(reg_index).unwrap().fee - * ``` + * The dispatch origin of this call must be `CancellationOrigin`. * - * Emits `JudgementRequested` if successful. + * -`ref_index`: The index of the referendum to cancel. * - * # - * - `O(R + X)`. - * - One balance-reserve operation. - * - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`. - * - One event. - * # + * Weight: `O(1)`. */ -export interface IdentityCall_request_judgement { - __kind: 'request_judgement' - regIndex: number - maxFee: bigint +export interface DemocracyCall_emergency_cancel { + __kind: 'emergency_cancel' + refIndex: number } /** - * 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. + * Schedule a referendum to be tabled once it is legal to schedule an external + * referendum. * - * - `reg_index`: The index of the registrar whose judgement is no longer requested. + * The dispatch origin of this call must be `ExternalOrigin`. * - * Emits `JudgementUnrequested` if successful. + * - `proposal_hash`: The preimage hash of the proposal. * - * # - * - `O(R + X)`. - * - One balance-reserve operation. - * - One storage mutation `O(R + X)`. - * - One event - * # + * Weight: `O(V)` with V number of vetoers in the blacklist of proposal. + * Decoding vec of length V. Charged as maximum */ -export interface IdentityCall_cancel_request { - __kind: 'cancel_request' - regIndex: number +export interface DemocracyCall_external_propose { + __kind: 'external_propose' + proposalHash: Uint8Array } /** - * Set the fee required for a judgement to be requested from a registrar. + * Schedule a majority-carries referendum to be tabled next once it is legal to schedule + * an external referendum. * - * The dispatch origin for this call must be _Signed_ and the sender must be the account - * of the registrar whose index is `index`. + * The dispatch of this call must be `ExternalMajorityOrigin`. * - * - `index`: the index of the registrar whose fee is to be set. - * - `fee`: the new fee. + * - `proposal_hash`: The preimage hash of the proposal. * - * # - * - `O(R)`. - * - One storage mutation `O(R)`. - * - Benchmark: 7.315 + R * 0.329 µs (min squares analysis) - * # + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` */ -export interface IdentityCall_set_fee { - __kind: 'set_fee' - index: number - fee: bigint +export interface DemocracyCall_external_propose_majority { + __kind: 'external_propose_majority' + proposalHash: Uint8Array } /** - * Change the account associated with a registrar. + * Schedule a negative-turnout-bias referendum to be tabled next once it is legal to + * schedule an external referendum. * - * The dispatch origin for this call must be _Signed_ and the sender must be the account - * of the registrar whose index is `index`. + * The dispatch of this call must be `ExternalDefaultOrigin`. * - * - `index`: the index of the registrar whose fee is to be set. - * - `new`: the new account ID. + * - `proposal_hash`: The preimage hash of the proposal. * - * # - * - `O(R)`. - * - One storage mutation `O(R)`. - * - Benchmark: 8.823 + R * 0.32 µs (min squares analysis) - * # + * Unlike `external_propose`, blacklisting has no effect on this and it may replace a + * pre-scheduled `external_propose` call. + * + * Weight: `O(1)` */ -export interface IdentityCall_set_account_id { - __kind: 'set_account_id' - index: number - new: Uint8Array +export interface DemocracyCall_external_propose_default { + __kind: 'external_propose_default' + proposalHash: Uint8Array } /** - * Set the field information for a registrar. + * 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 origin for this call must be _Signed_ and the sender must be the account - * of the registrar whose index is `index`. + * The dispatch of this call must be `FastTrackOrigin`. * - * - `index`: the index of the registrar whose fee is to be set. - * - `fields`: the fields that the registrar concerns themselves with. + * - `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. * - * # - * - `O(R)`. - * - One storage mutation `O(R)`. - * - Benchmark: 7.464 + R * 0.325 µs (min squares analysis) - * # + * Emits `Started`. + * + * Weight: `O(1)` */ -export interface IdentityCall_set_fields { - __kind: 'set_fields' - index: number - fields: bigint +export interface DemocracyCall_fast_track { + __kind: 'fast_track' + proposalHash: Uint8Array + votingPeriod: number + delay: number } /** - * Provide a judgement for an account's identity. + * Veto and blacklist the external proposal hash. * - * The dispatch origin for this call must be _Signed_ and the sender must be the account - * of the registrar whose index is `reg_index`. + * The dispatch origin of this call must be `VetoOrigin`. * - * - `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`. + * - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. * - * Emits `JudgementGiven` if successful. + * Emits `Vetoed`. * - * # - * - `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. - * # + * Weight: `O(V + log(V))` where V is number of `existing vetoers` */ -export interface IdentityCall_provide_judgement { - __kind: 'provide_judgement' - regIndex: number - target: Uint8Array - judgement: IdentityJudgement +export interface DemocracyCall_veto_external { + __kind: 'veto_external' + proposalHash: Uint8Array } /** - * Remove an account's identity and sub-account information and slash the deposits. + * Remove a referendum. * - * 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 of this call must be _Root_. * - * The dispatch origin for this call must match `T::ForceOrigin`. + * - `ref_index`: The index of the referendum to cancel. * - * - `target`: the account whose identity the judgement is upon. This must be an account - * with a registered identity. + * # Weight: `O(1)`. + */ +export interface DemocracyCall_cancel_referendum { + __kind: 'cancel_referendum' + refIndex: number +} + +/** + * Cancel a proposal queued for enactment. * - * Emits `IdentityKilled` if successful. + * The dispatch origin of this call must be _Root_. * - * # - * - `O(R + S + X)`. - * - One balance-reserve operation. - * - `S + 2` storage mutations. - * - One event. - * # + * - `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 IdentityCall_kill_identity { - __kind: 'kill_identity' - target: Uint8Array +export interface DemocracyCall_cancel_queued { + __kind: 'cancel_queued' + which: number } /** - * Add the given account to the sender's subs. + * Delegate the voting power (with some given conviction) of the sending account. * - * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated - * to the sender. + * 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 for this call must be _Signed_ and the sender must have a registered - * sub identity of `sub`. + * 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 IdentityCall_add_sub { - __kind: 'add_sub' - sub: Uint8Array - data: Data +export interface DemocracyCall_delegate { + __kind: 'delegate' + to: Uint8Array + conviction: Conviction + balance: bigint } /** - * Alter the associated name of the given sub-account. + * Undelegate the voting power of the sending account. * - * The dispatch origin for this call must be _Signed_ and the sender must have a registered - * sub identity of `sub`. + * 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 IdentityCall_rename_sub { - __kind: 'rename_sub' - sub: Uint8Array - data: Data +export interface DemocracyCall_undelegate { + __kind: 'undelegate' } /** - * Remove the given account from the sender's subs. + * Clears all public proposals. * - * Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated - * to the sender. + * The dispatch origin of this call must be _Root_. * - * The dispatch origin for this call must be _Signed_ and the sender must have a registered - * sub identity of `sub`. + * Weight: `O(1)`. */ -export interface IdentityCall_remove_sub { - __kind: 'remove_sub' - sub: Uint8Array +export interface DemocracyCall_clear_public_proposals { + __kind: 'clear_public_proposals' } /** - * Remove the sender as a sub-account. + * 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. * - * 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 of this call must be _Signed_. * - * The dispatch origin for this call must be _Signed_ and the sender must have a registered - * super-identity. + * - `encoded_proposal`: The preimage of a proposal. * - * 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. + * Emits `PreimageNoted`. + * + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). */ -export interface IdentityCall_quit_sub { - __kind: 'quit_sub' +export interface DemocracyCall_note_preimage { + __kind: 'note_preimage' + encodedProposal: Uint8Array } -export type XcmpQueueCall = never - -export type DmpQueueCall = DmpQueueCall_service_overweight +/** + * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_preimage_operational { + __kind: 'note_preimage_operational' + encodedProposal: Uint8Array +} /** - * Service a single overweight message. + * 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. * - * - `origin`: Must pass `ExecuteOverweightOrigin`. - * - `index`: The index of the overweight message to service. - * - `weight_limit`: The amount of weight that message execution may take. + * The dispatch origin of this call must be _Signed_. + * + * - `encoded_proposal`: The preimage of a proposal. * - * Errors: - * - `Unknown`: Message of `index` is unknown. - * - `OverLimit`: Message execution may use greater than `weight_limit`. + * Emits `PreimageNoted`. * - * Events: - * - `OverweightServiced`: On success. + * Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). */ -export interface DmpQueueCall_service_overweight { - __kind: 'service_overweight' - index: bigint - weightLimit: bigint +export interface DemocracyCall_note_imminent_preimage { + __kind: 'note_imminent_preimage' + encodedProposal: Uint8Array } -export type AssetsCall = AssetsCall_create | AssetsCall_force_create | AssetsCall_destroy | AssetsCall_mint | AssetsCall_burn | AssetsCall_transfer | AssetsCall_transfer_keep_alive | AssetsCall_force_transfer | AssetsCall_freeze | AssetsCall_thaw | AssetsCall_freeze_asset | AssetsCall_thaw_asset | AssetsCall_transfer_ownership | AssetsCall_set_team | AssetsCall_set_metadata | AssetsCall_clear_metadata | AssetsCall_force_set_metadata | AssetsCall_force_clear_metadata | AssetsCall_force_asset_status | AssetsCall_approve_transfer | AssetsCall_cancel_approval | AssetsCall_force_cancel_approval | AssetsCall_transfer_approved +/** + * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. + */ +export interface DemocracyCall_note_imminent_preimage_operational { + __kind: 'note_imminent_preimage_operational' + encodedProposal: Uint8Array +} /** - * Issue a new class of fungible assets from a public origin. - * - * This new asset class has no assets initially and its owner is the origin. + * Remove an expired proposal preimage and collect the deposit. * - * The origin must be Signed and the sender must have sufficient funds free. + * The dispatch origin of this call must be _Signed_. * - * Funds of sender are reserved by `AssetDeposit`. + * - `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. * - * Parameters: - * - `id`: The identifier of the new asset. This must not be currently in use to identify - * an existing asset. - * - `admin`: The admin of this class of assets. The admin is the initial address of each - * member of the asset class's admin team. - * - `min_balance`: The minimum balance of this new asset that any single account must - * have. If an account's balance is reduced below this, then it collapses to zero. + * 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 `Created` event when successful. + * Emits `PreimageReaped`. * - * Weight: `O(1)` + * Weight: `O(D)` where D is length of proposal. */ -export interface AssetsCall_create { - __kind: 'create' - id: bigint - admin: Uint8Array - minBalance: bigint +export interface DemocracyCall_reap_preimage { + __kind: 'reap_preimage' + proposalHash: Uint8Array + proposalLenUpperBound: number } /** - * Issue a new class of fungible assets from a privileged origin. - * - * This new asset class has no assets initially. - * - * The origin must conform to `ForceOrigin`. - * - * Unlike `create`, no funds are reserved. + * Unlock tokens that have an expired lock. * - * - `id`: The identifier of the new asset. This must not be currently in use to identify - * an existing asset. - * - `owner`: The owner of this class of assets. The owner has full superuser permissions - * over this asset, but may later change and configure the permissions using `transfer_ownership` - * and `set_team`. - * - `min_balance`: The minimum balance of this new asset that any single account must - * have. If an account's balance is reduced below this, then it collapses to zero. + * The dispatch origin of this call must be _Signed_. * - * Emits `ForceCreated` event when successful. + * - `target`: The account to remove the lock on. * - * Weight: `O(1)` + * Weight: `O(R)` with R number of vote of target. */ -export interface AssetsCall_force_create { - __kind: 'force_create' - id: bigint - owner: Uint8Array - isSufficient: boolean - minBalance: bigint +export interface DemocracyCall_unlock { + __kind: 'unlock' + target: Uint8Array } /** - * Destroy a class of fungible assets. + * Remove a vote for a referendum. * - * The origin must conform to `ForceOrigin` or must be Signed and the sender must be the - * owner of the asset `id`. + * 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. * - * - `id`: The identifier of the asset to be destroyed. This must identify an existing - * asset. + * 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). * - * Emits `Destroyed` event when successful. + * The dispatch origin of this call must be _Signed_, and the signer must have a vote + * registered for referendum `index`. * - * NOTE: It can be helpful to first freeze an asset before destroying it so that you - * can provide accurate witness information and prevent users from manipulating state - * in a way that can make it harder to destroy. + * - `index`: The index of referendum of the vote to be removed. * - * Weight: `O(c + p + a)` where: - * - `c = (witness.accounts - witness.sufficients)` - * - `s = witness.sufficients` - * - `a = witness.approvals` + * 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 AssetsCall_destroy { - __kind: 'destroy' - id: bigint - witness: AssetDestroyWitness +export interface DemocracyCall_remove_vote { + __kind: 'remove_vote' + index: number } /** - * Mint assets of a particular class. + * Remove a vote for a referendum. * - * The origin must be Signed and the sender must be the Issuer of the asset `id`. + * 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. * - * - `id`: The identifier of the asset to have some amount minted. - * - `beneficiary`: The account to be credited with the minted assets. - * - `amount`: The amount of the asset to be minted. + * The dispatch origin of this call must be _Signed_. * - * Emits `Issued` event when successful. + * - `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(1)` - * Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + * 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 AssetsCall_mint { - __kind: 'mint' - id: bigint - beneficiary: Uint8Array - amount: bigint +export interface DemocracyCall_remove_other_vote { + __kind: 'remove_other_vote' + target: Uint8Array + index: number } /** - * Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. - * - * Origin must be Signed and the sender should be the Manager of the asset `id`. + * 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: Uint8Array + index: number +} + +/** + * Permanently place a proposal into the blacklist. This prevents it from ever being + * proposed again. * - * Bails with `BalanceZero` if the `who` is already dead. + * 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. * - * - `id`: The identifier of the asset to have some amount burned. - * - `who`: The account to be debited from. - * - `amount`: The maximum amount by which `who`'s balance should be reduced. + * The dispatch origin of this call must be `BlacklistOrigin`. * - * Emits `Burned` with the actual amount burned. If this takes the balance to below the - * minimum for the asset, then the amount burned is increased to take it to zero. + * - `proposal_hash`: The proposal hash to blacklist permanently. + * - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be + * cancelled. * - * Weight: `O(1)` - * Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + * Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a + * reasonable value). */ -export interface AssetsCall_burn { - __kind: 'burn' - id: bigint - who: Uint8Array - amount: bigint +export interface DemocracyCall_blacklist { + __kind: 'blacklist' + proposalHash: Uint8Array + maybeRefIndex: (number | undefined) } /** - * Move some assets from the sender account to another. - * - * Origin must be Signed. + * Remove a proposal. * - * - `id`: The identifier of the asset to have some amount transferred. - * - `target`: The account to be credited. - * - `amount`: The amount by which the sender's balance of assets should be reduced and - * `target`'s balance increased. The amount actually transferred may be slightly greater in - * the case that the transfer would otherwise take the sender balance above zero but below - * the minimum balance. Must be greater than zero. + * The dispatch origin of this call must be `CancelProposalOrigin`. * - * Emits `Transferred` with the actual amount transferred. If this takes the source balance - * to below the minimum for the asset, then the amount transferred is increased to take it - * to zero. + * - `prop_index`: The index of the proposal to cancel. * - * Weight: `O(1)` - * Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of - * `target`. - */ -export interface AssetsCall_transfer { - __kind: 'transfer' - id: bigint - target: Uint8Array - amount: bigint + * Weight: `O(p)` where `p = PublicProps::::decode_len()` + */ +export interface DemocracyCall_cancel_proposal { + __kind: 'cancel_proposal' + propIndex: number } +export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal + /** - * Move some assets from the sender account to another, keeping the sender account alive. + * Set the collective's membership. * - * Origin must be Signed. + * - `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. * - * - `id`: The identifier of the asset to have some amount transferred. - * - `target`: The account to be credited. - * - `amount`: The amount by which the sender's balance of assets should be reduced and - * `target`'s balance increased. The amount actually transferred may be slightly greater in - * the case that the transfer would otherwise take the sender balance above zero but below - * the minimum balance. Must be greater than zero. + * Requires root origin. * - * Emits `Transferred` with the actual amount transferred. If this takes the source balance - * to below the minimum for the asset, then the amount transferred is increased to take it - * to zero. + * 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(1)` - * Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of - * `target`. + * # + * ## 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 AssetsCall_transfer_keep_alive { - __kind: 'transfer_keep_alive' - id: bigint - target: Uint8Array - amount: bigint +export interface CouncilCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Move some assets from one account to another. - * - * Origin must be Signed and the sender should be the Admin of the asset `id`. - * - * - `id`: The identifier of the asset to have some amount transferred. - * - `source`: The account to be debited. - * - `dest`: The account to be credited. - * - `amount`: The amount by which the `source`'s balance of assets should be reduced and - * `dest`'s balance increased. The amount actually transferred may be slightly greater in - * the case that the transfer would otherwise take the `source` balance above zero but - * below the minimum balance. Must be greater than zero. + * Dispatch a proposal from a member using the `Member` origin. * - * Emits `Transferred` with the actual amount transferred. If this takes the source balance - * to below the minimum for the asset, then the amount transferred is increased to take it - * to zero. + * Origin must be a member of the collective. * - * Weight: `O(1)` - * Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of - * `dest`. + * # + * ## 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 AssetsCall_force_transfer { - __kind: 'force_transfer' - id: bigint - source: Uint8Array - dest: Uint8Array - amount: bigint +export interface CouncilCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Disallow further unprivileged transfers from an account. - * - * Origin must be Signed and the sender should be the Freezer of the asset `id`. + * Add a new proposal to either be voted on or executed directly. * - * - `id`: The identifier of the asset to be frozen. - * - `who`: The account to be frozen. + * Requires the sender to be member. * - * Emits `Frozen`. + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * - * Weight: `O(1)` + * # + * ## 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 AssetsCall_freeze { - __kind: 'freeze' - id: bigint - who: Uint8Array +export interface CouncilCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * Allow unprivileged transfers from an account again. - * - * Origin must be Signed and the sender should be the Admin of the asset `id`. - * - * - `id`: The identifier of the asset to be frozen. - * - `who`: The account to be unfrozen. + * Add an aye or nay vote for the sender to the given proposal. * - * Emits `Thawed`. + * Requires the sender to be a member. * - * Weight: `O(1)` + * 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 AssetsCall_thaw { - __kind: 'thaw' - id: bigint - who: Uint8Array +export interface CouncilCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array + index: number + approve: boolean } /** - * Disallow further unprivileged transfers for the asset class. + * 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. * - * Origin must be Signed and the sender should be the Freezer of the asset `id`. + * 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. * - * - `id`: The identifier of the asset to be frozen. + * 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. * - * Emits `Frozen`. + * + `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(1)` + * # + * ## 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 AssetsCall_freeze_asset { - __kind: 'freeze_asset' - id: bigint +export interface CouncilCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } /** - * Allow unprivileged transfers for the asset again. - * - * Origin must be Signed and the sender should be the Admin of the asset `id`. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * - `id`: The identifier of the asset to be thawed. + * Must be called by the Root origin. * - * Emits `Thawed`. + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. * - * Weight: `O(1)` + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # */ -export interface AssetsCall_thaw_asset { - __kind: 'thaw_asset' - id: bigint +export interface CouncilCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal + /** - * Change the Owner of an asset. + * Set the collective's membership. * - * Origin must be Signed and the sender should be the Owner of the asset `id`. + * - `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. * - * - `id`: The identifier of the asset. - * - `owner`: The new Owner of this asset. + * Requires root origin. * - * Emits `OwnerChanged`. + * 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(1)` + * # + * ## 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 AssetsCall_transfer_ownership { - __kind: 'transfer_ownership' - id: bigint - owner: Uint8Array +export interface TechComitteeCollectiveCall_set_members { + __kind: 'set_members' + newMembers: Uint8Array[] + prime: (Uint8Array | undefined) + oldCount: number } /** - * Change the Issuer, Admin and Freezer of an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * - `id`: The identifier of the asset to be frozen. - * - `issuer`: The new Issuer of this asset. - * - `admin`: The new Admin of this asset. - * - `freezer`: The new Freezer of this asset. + * Dispatch a proposal from a member using the `Member` origin. * - * Emits `TeamChanged`. + * Origin must be a member of the collective. * - * Weight: `O(1)` + * # + * ## 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 AssetsCall_set_team { - __kind: 'set_team' - id: bigint - issuer: Uint8Array - admin: Uint8Array - freezer: Uint8Array +export interface TechComitteeCollectiveCall_execute { + __kind: 'execute' + proposal: Proposal + lengthBound: number } /** - * Set the metadata for an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * Funds of sender are reserved according to the formula: - * `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into - * account any already reserved funds. + * Add a new proposal to either be voted on or executed directly. * - * - `id`: The identifier of the asset to update. - * - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - * - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - * - `decimals`: The number of decimals this asset uses to represent one unit. + * Requires the sender to be member. * - * Emits `MetadataSet`. + * `threshold` determines whether `proposal` is executed directly (`threshold < 2`) + * or put up for voting. * - * Weight: `O(1)` + * # + * ## 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 AssetsCall_set_metadata { - __kind: 'set_metadata' - id: bigint - name: Uint8Array - symbol: Uint8Array - decimals: number +export interface TechComitteeCollectiveCall_propose { + __kind: 'propose' + threshold: number + proposal: Proposal + lengthBound: number } /** - * Clear the metadata for an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * Any deposit is freed for the asset owner. - * - * - `id`: The identifier of the asset to clear. + * Add an aye or nay vote for the sender to the given proposal. * - * Emits `MetadataCleared`. + * Requires the sender to be a member. * - * Weight: `O(1)` + * 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 AssetsCall_clear_metadata { - __kind: 'clear_metadata' - id: bigint +export interface TechComitteeCollectiveCall_vote { + __kind: 'vote' + proposal: Uint8Array + index: number + approve: boolean } /** - * Force the metadata for an asset to some value. + * 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. * - * Origin must be ForceOrigin. + * 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. * - * Any deposit is left alone. + * 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. * - * - `id`: The identifier of the asset to update. - * - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - * - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - * - `decimals`: The number of decimals this asset uses to represent one unit. + * 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. * - * Emits `MetadataSet`. + * + `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(N + S)` where N and S are the length of the name and symbol respectively. + * # + * ## 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 AssetsCall_force_set_metadata { - __kind: 'force_set_metadata' - id: bigint - name: Uint8Array - symbol: Uint8Array - decimals: number - isFrozen: boolean +export interface TechComitteeCollectiveCall_close { + __kind: 'close' + proposalHash: Uint8Array + index: number + proposalWeightBound: bigint + lengthBound: number } /** - * Clear the metadata for an asset. - * - * Origin must be ForceOrigin. - * - * Any deposit is returned. + * Disapprove a proposal, close, and remove it from the system, regardless of its current state. * - * - `id`: The identifier of the asset to clear. + * Must be called by the Root origin. * - * Emits `MetadataCleared`. + * Parameters: + * * `proposal_hash`: The hash of the proposal that should be disapproved. * - * Weight: `O(1)` + * # + * Complexity: O(P) where P is the number of max proposals + * DB Weight: + * * Reads: Proposals + * * Writes: Voting, Proposals, ProposalOf + * # */ -export interface AssetsCall_force_clear_metadata { - __kind: 'force_clear_metadata' - id: bigint +export interface TechComitteeCollectiveCall_disapprove_proposal { + __kind: 'disapprove_proposal' + proposalHash: Uint8Array } +export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal + /** - * Alter the attributes of a given asset. - * - * Origin must be `ForceOrigin`. - * - * - `id`: The identifier of the asset. - * - `owner`: The new Owner of this asset. - * - `issuer`: The new Issuer of this asset. - * - `admin`: The new Admin of this asset. - * - `freezer`: The new Freezer of this asset. - * - `min_balance`: The minimum balance of this new asset that any single account must - * have. If an account's balance is reduced below this, then it collapses to zero. - * - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient - * value to account for the state bloat associated with its balance storage. If set to - * `true`, then non-zero balances may be stored without a `consumer` reference (and thus - * an ED in the Balances pallet or whatever else is used to control user-account state - * growth). - * - `is_frozen`: Whether this asset class is frozen except for permissioned/admin - * instructions. - * - * Emits `AssetStatusChanged` with the identity of the asset. + * 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. * - * Weight: `O(1)` + * # + * - Complexity: O(1) + * - DbReads: `ProposalCount`, `origin account` + * - DbWrites: `ProposalCount`, `Proposals`, `origin account` + * # */ -export interface AssetsCall_force_asset_status { - __kind: 'force_asset_status' - id: bigint - owner: Uint8Array - issuer: Uint8Array - admin: Uint8Array - freezer: Uint8Array - minBalance: bigint - isSufficient: boolean - isFrozen: boolean +export interface TreasuryCall_propose_spend { + __kind: 'propose_spend' + value: bigint + beneficiary: Uint8Array } /** - * Approve an amount of asset for transfer by a delegated third-party account. - * - * Origin must be Signed. - * - * Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account - * for the purpose of holding the approval. If some non-zero amount of assets is already - * approved from signing account to `delegate`, then it is topped up or unreserved to - * meet the right value. - * - * NOTE: The signing account does not need to own `amount` of assets at the point of - * making this call. - * - * - `id`: The identifier of the asset. - * - `delegate`: The account to delegate permission to transfer asset. - * - `amount`: The amount of asset that may be transferred by `delegate`. If there is - * already an approval in place, then this acts additively. + * Reject a proposed spend. The original deposit will be slashed. * - * Emits `ApprovedTransfer` on success. + * May only be called from `T::RejectOrigin`. * - * Weight: `O(1)` + * # + * - Complexity: O(1) + * - DbReads: `Proposals`, `rejected proposer account` + * - DbWrites: `Proposals`, `rejected proposer account` + * # */ -export interface AssetsCall_approve_transfer { - __kind: 'approve_transfer' - id: bigint - delegate: Uint8Array - amount: bigint +export interface TreasuryCall_reject_proposal { + __kind: 'reject_proposal' + proposalId: number } /** - * Cancel all of some asset approved for delegated transfer by a third-party account. - * - * Origin must be Signed and there must be an approval in place between signer and - * `delegate`. - * - * Unreserves any deposit previously reserved by `approve_transfer` for the approval. - * - * - `id`: The identifier of the asset. - * - `delegate`: The account delegated permission to transfer asset. + * Approve a proposal. At a later time, the proposal will be allocated to the beneficiary + * and the original deposit will be returned. * - * Emits `ApprovalCancelled` on success. + * May only be called from `T::ApproveOrigin`. * - * Weight: `O(1)` + * # + * - Complexity: O(1). + * - DbReads: `Proposals`, `Approvals` + * - DbWrite: `Approvals` + * # */ -export interface AssetsCall_cancel_approval { - __kind: 'cancel_approval' - id: bigint - delegate: Uint8Array +export interface TreasuryCall_approve_proposal { + __kind: 'approve_proposal' + proposalId: number } +export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_change_association_with_relay_keys | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec + /** - * Cancel all of some asset approved for delegated transfer by a third-party account. - * - * Origin must be either ForceOrigin or Signed origin with the signer being the Admin - * account of the asset `id`. - * - * Unreserves any deposit previously reserved by `approve_transfer` for the approval. - * - * - `id`: The identifier of the asset. - * - `delegate`: The account delegated permission to transfer asset. - * - * Emits `ApprovalCancelled` on success. + * Associate a native rewards_destination identity with a crowdloan contribution. * - * Weight: `O(1)` + * The caller needs to provide the unassociated relay account and a proof to succeed + * with the association + * The proof is nothing but a signature over the reward_address using the relay keys */ -export interface AssetsCall_force_cancel_approval { - __kind: 'force_cancel_approval' - id: bigint - owner: Uint8Array - delegate: Uint8Array +export interface CrowdloanRewardsCall_associate_native_identity { + __kind: 'associate_native_identity' + rewardAccount: Uint8Array + relayAccount: Uint8Array + proof: MultiSignature } /** - * Transfer some asset balance from a previously delegated account to some third-party - * account. - * - * Origin must be Signed and there must be an approval in place by the `owner` to the - * signer. - * - * If the entire amount approved for transfer is transferred, then any deposit previously - * reserved by `approve_transfer` is unreserved. - * - * - `id`: The identifier of the asset. - * - `owner`: The account which previously approved for a transfer of at least `amount` and - * from which the asset balance will be withdrawn. - * - `destination`: The account to which the asset balance of `amount` will be transferred. - * - `amount`: The amount of assets to transfer. - * - * Emits `TransferredApproved` on success. + * Change reward account by submitting proofs from relay accounts * - * Weight: `O(1)` + * The number of valid proofs needs to be bigger than 'RewardAddressRelayVoteThreshold' + * The account to be changed needs to be submitted as 'previous_account' */ -export interface AssetsCall_transfer_approved { - __kind: 'transfer_approved' - id: bigint - owner: Uint8Array - destination: Uint8Array - amount: bigint +export interface CrowdloanRewardsCall_change_association_with_relay_keys { + __kind: 'change_association_with_relay_keys' + rewardAccount: Uint8Array + previousAccount: Uint8Array + proofs: [Uint8Array, MultiSignature][] } -export type XTokensCall = XTokensCall_transfer | XTokensCall_transfer_multiasset - /** - * Transfer native currencies. - * - * `dest_weight` is the weight for XCM execution on the dest chain, and - * it would be charged from the transferred assets. If set below - * requirements, the execution may fail and assets wouldn't be - * received. - * - * It's a no-op if any error on local XCM execution or message sending. - * Note sending assets out per se doesn't guarantee they would be - * received. Receiving depends on if the XCM message could be delivered - * by the network, and if the receiving chain would handle - * messages correctly. + * Collect whatever portion of your reward are currently vested. */ -export interface XTokensCall_transfer { - __kind: 'transfer' - currencyId: CurrencyId - amount: bigint - dest: MultiLocation - destWeight: bigint +export interface CrowdloanRewardsCall_claim { + __kind: 'claim' } /** - * Transfer `MultiAsset`. - * - * `dest_weight` is the weight for XCM execution on the dest chain, and - * it would be charged from the transferred assets. If set below - * requirements, the execution may fail and assets wouldn't be - * received. - * - * It's a no-op if any error on local XCM execution or message sending. - * Note sending assets out per se doesn't guarantee they would be - * received. Receiving depends on if the XCM message could be delivered - * by the network, and if the receiving chain would handle - * messages correctly. + * Update reward address, proving that the caller owns the current native key */ -export interface XTokensCall_transfer_multiasset { - __kind: 'transfer_multiasset' - asset: MultiAsset - dest: MultiLocation - destWeight: bigint +export interface CrowdloanRewardsCall_update_reward_address { + __kind: 'update_reward_address' + newRewardAccount: Uint8Array } -export type AssetManagerCall = AssetManagerCall_register_asset | AssetManagerCall_set_asset_units_per_second - /** - * Register new asset with the asset manager + * This extrinsic completes the initialization if some checks are fullfiled. These checks are: + * -The reward contribution money matches the crowdloan pot + * -The end vesting block is higher than the init vesting block + * -The initialization has not complete yet */ -export interface AssetManagerCall_register_asset { - __kind: 'register_asset' - asset: AssetType - metadata: AssetRegistrarMetadata - minAmount: bigint +export interface CrowdloanRewardsCall_complete_initialization { + __kind: 'complete_initialization' + leaseEndingBlock: number } /** - * Change the amount of units we are charging per execution second for a given AssetId + * Initialize the reward distribution storage. It shortcuts whenever an error is found + * This does not enforce any checks other than making sure we dont go over funds + * complete_initialization should perform any additional */ -export interface AssetManagerCall_set_asset_units_per_second { - __kind: 'set_asset_units_per_second' - assetId: bigint - unitsPerSecond: bigint +export interface CrowdloanRewardsCall_initialize_reward_vec { + __kind: 'initialize_reward_vec' + rewards: [Uint8Array, (Uint8Array | undefined), bigint][] } export interface DispatchErrorModule { @@ -3228,158 +2492,26 @@ export interface TokenError_Underflow { } export interface TokenError_Overflow { - __kind: 'Overflow' -} - -export type ArithmeticError = ArithmeticError_Underflow | ArithmeticError_Overflow | ArithmeticError_DivisionByZero - -export interface ArithmeticError_Underflow { - __kind: 'Underflow' -} - -export interface ArithmeticError_Overflow { - __kind: 'Overflow' -} - -export interface ArithmeticError_DivisionByZero { - __kind: 'DivisionByZero' -} - -export interface ChangesTrieConfiguration { - digestInterval: number - digestLevels: number -} - -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy | Type_35_MaintenanceMode | Type_35_Identity | Type_35_XcmpQueue | Type_35_DmpQueue | Type_35_Assets | Type_35_XTokens | Type_35_AssetManager - -export interface Type_35_System { - __kind: 'System' - value: SystemCall -} - -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall -} - -export interface Type_35_Timestamp { - __kind: 'Timestamp' - value: TimestampCall -} - -export interface Type_35_Balances { - __kind: 'Balances' - value: BalancesCall -} - -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall -} - -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - -export interface Type_35_EVM { - __kind: 'EVM' - value: EVMCall -} - -export interface Type_35_Ethereum { - __kind: 'Ethereum' - value: EthereumCall -} - -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall -} - -export interface Type_35_Democracy { - __kind: 'Democracy' - value: DemocracyCall -} - -export interface Type_35_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall -} - -export interface Type_35_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall -} - -export interface Type_35_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} - -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall -} - -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface Type_35_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall -} - -export interface Type_35_Identity { - __kind: 'Identity' - value: IdentityCall + __kind: 'Overflow' } -export interface Type_35_XcmpQueue { - __kind: 'XcmpQueue' - value: XcmpQueueCall -} +export type ArithmeticError = ArithmeticError_Underflow | ArithmeticError_Overflow | ArithmeticError_DivisionByZero -export interface Type_35_DmpQueue { - __kind: 'DmpQueue' - value: DmpQueueCall +export interface ArithmeticError_Underflow { + __kind: 'Underflow' } -export interface Type_35_Assets { - __kind: 'Assets' - value: AssetsCall +export interface ArithmeticError_Overflow { + __kind: 'Overflow' } -export interface Type_35_XTokens { - __kind: 'XTokens' - value: XTokensCall +export interface ArithmeticError_DivisionByZero { + __kind: 'DivisionByZero' } -export interface Type_35_AssetManager { - __kind: 'AssetManager' - value: AssetManagerCall +export interface ChangesTrieConfiguration { + digestInterval: number + digestLevels: number } export interface ParachainInherentData { @@ -3389,79 +2521,112 @@ export interface ParachainInherentData { horizontalMessages: [number, InboundHrmpMessage[]][] } -export interface EthTransaction { - nonce: bigint - gasPrice: bigint - gasLimit: bigint - action: EthTransactionAction - value: bigint - input: Uint8Array - signature: EthTransactionSignature -} - export interface Range { min: bigint ideal: bigint max: bigint } -export type AccountVote = AccountVote_Standard | AccountVote_Split +export type Type_71 = Type_71_System | Type_71_ParachainSystem | Type_71_Timestamp | Type_71_Balances | Type_71_ParachainStaking | Type_71_AuthorInherent | Type_71_AuthorFilter | Type_71_AuthorMapping | Type_71_Utility | Type_71_Proxy | Type_71_MaintenanceMode | Type_71_Identity | Type_71_EVM | Type_71_Ethereum | Type_71_Scheduler | Type_71_Democracy | Type_71_CouncilCollective | Type_71_TechComitteeCollective | Type_71_Treasury | Type_71_CrowdloanRewards -export interface AccountVote_Standard { - __kind: 'Standard' - value: AccountVoteStandard +export interface Type_71_System { + __kind: 'System' + value: SystemCall } -export interface AccountVote_Split { - __kind: 'Split' - value: AccountVoteSplit +export interface Type_71_ParachainSystem { + __kind: 'ParachainSystem' + value: ParachainSystemCall } -export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x +export interface Type_71_Timestamp { + __kind: 'Timestamp' + value: TimestampCall +} -export interface Conviction_None { - __kind: 'None' +export interface Type_71_Balances { + __kind: 'Balances' + value: BalancesCall } -export interface Conviction_Locked1x { - __kind: 'Locked1x' +export interface Type_71_ParachainStaking { + __kind: 'ParachainStaking' + value: ParachainStakingCall } -export interface Conviction_Locked2x { - __kind: 'Locked2x' +export interface Type_71_AuthorInherent { + __kind: 'AuthorInherent' + value: AuthorInherentCall } -export interface Conviction_Locked3x { - __kind: 'Locked3x' +export interface Type_71_AuthorFilter { + __kind: 'AuthorFilter' + value: AuthorFilterCall } -export interface Conviction_Locked4x { - __kind: 'Locked4x' +export interface Type_71_AuthorMapping { + __kind: 'AuthorMapping' + value: AuthorMappingCall } -export interface Conviction_Locked5x { - __kind: 'Locked5x' +export interface Type_71_Utility { + __kind: 'Utility' + value: UtilityCall } -export interface Conviction_Locked6x { - __kind: 'Locked6x' +export interface Type_71_Proxy { + __kind: 'Proxy' + value: ProxyCall } -export type MultiSignature = MultiSignature_Ed25519 | MultiSignature_Sr25519 | MultiSignature_Ecdsa +export interface Type_71_MaintenanceMode { + __kind: 'MaintenanceMode' + value: MaintenanceModeCall +} -export interface MultiSignature_Ed25519 { - __kind: 'Ed25519' - value: Uint8Array +export interface Type_71_Identity { + __kind: 'Identity' + value: IdentityCall } -export interface MultiSignature_Sr25519 { - __kind: 'Sr25519' - value: Uint8Array +export interface Type_71_EVM { + __kind: 'EVM' + value: EVMCall } -export interface MultiSignature_Ecdsa { - __kind: 'Ecdsa' - value: Uint8Array +export interface Type_71_Ethereum { + __kind: 'Ethereum' + value: EthereumCall +} + +export interface Type_71_Scheduler { + __kind: 'Scheduler' + value: SchedulerCall +} + +export interface Type_71_Democracy { + __kind: 'Democracy' + value: DemocracyCall +} + +export interface Type_71_CouncilCollective { + __kind: 'CouncilCollective' + value: CouncilCollectiveCall +} + +export interface Type_71_TechComitteeCollective { + __kind: 'TechComitteeCollective' + value: TechComitteeCollectiveCall +} + +export interface Type_71_Treasury { + __kind: 'Treasury' + value: TreasuryCall +} + +export interface Type_71_CrowdloanRewards { + __kind: 'CrowdloanRewards' + value: CrowdloanRewardsCall } export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping @@ -3728,86 +2893,73 @@ export interface IdentityJudgement_Erroneous { __kind: 'Erroneous' } -export interface AssetDestroyWitness { - accounts: number - sufficients: number - approvals: number +export interface EthTransaction { + nonce: bigint + gasPrice: bigint + gasLimit: bigint + action: EthTransactionAction + value: bigint + input: Uint8Array + signature: EthTransactionSignature } -export type CurrencyId = CurrencyId_SelfReserve | CurrencyId_OtherReserve +export type AccountVote = AccountVote_Standard | AccountVote_Split -export interface CurrencyId_SelfReserve { - __kind: 'SelfReserve' +export interface AccountVote_Standard { + __kind: 'Standard' + value: AccountVoteStandard } -export interface CurrencyId_OtherReserve { - __kind: 'OtherReserve' - value: bigint +export interface AccountVote_Split { + __kind: 'Split' + value: AccountVoteSplit } -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 type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x -export interface MultiLocation_X1 { - __kind: 'X1' - value: JunctionV0 +export interface Conviction_None { + __kind: 'None' } -export interface MultiLocation_X2 { - __kind: 'X2' - value: [JunctionV0, JunctionV0] +export interface Conviction_Locked1x { + __kind: 'Locked1x' } -export interface MultiLocation_X3 { - __kind: 'X3' - value: [JunctionV0, JunctionV0, JunctionV0] +export interface Conviction_Locked2x { + __kind: 'Locked2x' } -export interface MultiLocation_X4 { - __kind: 'X4' - value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0] +export interface Conviction_Locked3x { + __kind: 'Locked3x' } -export interface MultiLocation_X5 { - __kind: 'X5' - value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +export interface Conviction_Locked4x { + __kind: 'Locked4x' } -export interface MultiLocation_X6 { - __kind: 'X6' - value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +export interface Conviction_Locked5x { + __kind: 'Locked5x' } -export interface MultiLocation_X7 { - __kind: 'X7' - value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] +export interface Conviction_Locked6x { + __kind: 'Locked6x' } -export interface MultiLocation_X8 { - __kind: 'X8' - value: [JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0] -} +export type MultiSignature = MultiSignature_Ed25519 | MultiSignature_Sr25519 | MultiSignature_Ecdsa -export interface MultiAsset { - id: XcmAssetId - fungibility: FungibilityV1 +export interface MultiSignature_Ed25519 { + __kind: 'Ed25519' + value: Uint8Array } -export type AssetType = AssetType_Xcm - -export interface AssetType_Xcm { - __kind: 'Xcm' - value: MultiLocation +export interface MultiSignature_Sr25519 { + __kind: 'Sr25519' + value: Uint8Array } -export interface AssetRegistrarMetadata { - name: Uint8Array - symbol: Uint8Array - decimals: number - isFrozen: boolean +export interface MultiSignature_Ecdsa { + __kind: 'Ecdsa' + value: Uint8Array } export interface PersistedValidationData { @@ -3857,213 +3009,3 @@ export interface AccountVoteSplit { aye: bigint nay: bigint } - -export type JunctionV0 = JunctionV0_Parent | JunctionV0_Parachain | JunctionV0_AccountId32 | JunctionV0_AccountIndex64 | JunctionV0_AccountKey20 | JunctionV0_PalletInstance | JunctionV0_GeneralIndex | JunctionV0_GeneralKey | JunctionV0_OnlyChild | JunctionV0_Plurality - -export interface JunctionV0_Parent { - __kind: 'Parent' -} - -export interface JunctionV0_Parachain { - __kind: 'Parachain' - value: number -} - -export interface JunctionV0_AccountId32 { - __kind: 'AccountId32' - value: ENUM_AccountId32 -} - -export interface JunctionV0_AccountIndex64 { - __kind: 'AccountIndex64' - value: ENUM_AccountIndex64 -} - -export interface JunctionV0_AccountKey20 { - __kind: 'AccountKey20' - value: ENUM_AccountKey20 -} - -export interface JunctionV0_PalletInstance { - __kind: 'PalletInstance' - value: number -} - -export interface JunctionV0_GeneralIndex { - __kind: 'GeneralIndex' - value: bigint -} - -export interface JunctionV0_GeneralKey { - __kind: 'GeneralKey' - value: Uint8Array -} - -export interface JunctionV0_OnlyChild { - __kind: 'OnlyChild' -} - -export interface JunctionV0_Plurality { - __kind: 'Plurality' - value: ENUM_Plurality -} - -export type XcmAssetId = XcmAssetId_Concrete | XcmAssetId_Abstract - -export interface XcmAssetId_Concrete { - __kind: 'Concrete' - value: MultiLocation -} - -export interface XcmAssetId_Abstract { - __kind: 'Abstract' - value: Uint8Array -} - -export type FungibilityV1 = FungibilityV1_Fungible | FungibilityV1_NonFungible - -export interface FungibilityV1_Fungible { - __kind: 'Fungible' - value: bigint -} - -export interface FungibilityV1_NonFungible { - __kind: 'NonFungible' - value: AssetInstanceV1 -} - -export interface ENUM_AccountId32 { - network: NetworkId - id: Uint8Array -} - -export interface ENUM_AccountIndex64 { - network: NetworkId - index: bigint -} - -export interface ENUM_AccountKey20 { - network: NetworkId - key: Uint8Array -} - -export interface ENUM_Plurality { - id: BodyId - part: BodyPart -} - -export type AssetInstanceV1 = AssetInstanceV1_Undefined | AssetInstanceV1_Index | AssetInstanceV1_Array4 | AssetInstanceV1_Array8 | AssetInstanceV1_Array16 | AssetInstanceV1_Array32 | AssetInstanceV1_Blob - -export interface AssetInstanceV1_Undefined { - __kind: 'Undefined' -} - -export interface AssetInstanceV1_Index { - __kind: 'Index' - value: bigint -} - -export interface AssetInstanceV1_Array4 { - __kind: 'Array4' - value: Uint8Array -} - -export interface AssetInstanceV1_Array8 { - __kind: 'Array8' - value: Uint8Array -} - -export interface AssetInstanceV1_Array16 { - __kind: 'Array16' - value: Uint8Array -} - -export interface AssetInstanceV1_Array32 { - __kind: 'Array32' - value: Uint8Array -} - -export interface AssetInstanceV1_Blob { - __kind: 'Blob' - value: Uint8Array -} - -export type NetworkId = NetworkId_Any | NetworkId_Named | NetworkId_Polkadot | NetworkId_Kusama - -export interface NetworkId_Any { - __kind: 'Any' -} - -export interface NetworkId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface NetworkId_Polkadot { - __kind: 'Polkadot' -} - -export interface NetworkId_Kusama { - __kind: 'Kusama' -} - -export type BodyId = BodyId_Unit | BodyId_Named | BodyId_Index | BodyId_Executive | BodyId_Technical | BodyId_Legislative | BodyId_Judicial - -export interface BodyId_Unit { - __kind: 'Unit' -} - -export interface BodyId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface BodyId_Index { - __kind: 'Index' - value: number -} - -export interface BodyId_Executive { - __kind: 'Executive' -} - -export interface BodyId_Technical { - __kind: 'Technical' -} - -export interface BodyId_Legislative { - __kind: 'Legislative' -} - -export interface BodyId_Judicial { - __kind: 'Judicial' -} - -export type BodyPart = BodyPart_Voice | BodyPart_Members | BodyPart_Fraction | BodyPart_AtLeastProportion | BodyPart_MoreThanProportion - -export interface BodyPart_Voice { - __kind: 'Voice' -} - -export interface BodyPart_Members { - __kind: 'Members' - value: number -} - -export interface BodyPart_Fraction { - __kind: 'Fraction' - nom: number - denom: number -} - -export interface BodyPart_AtLeastProportion { - __kind: 'AtLeastProportion' - nom: number - denom: number -} - -export interface BodyPart_MoreThanProportion { - __kind: 'MoreThanProportion' - nom: number - denom: number -} diff --git a/src/types/v800.ts b/src/types/v800.ts deleted file mode 100644 index 55da8510..00000000 --- a/src/types/v800.ts +++ /dev/null @@ -1,3970 +0,0 @@ -import type {Result, Option} from './support' - -export type Proposal = Proposal_System | Proposal_Utility | Proposal_Timestamp | Proposal_Balances | Proposal_Sudo | Proposal_ParachainSystem | Proposal_EVM | Proposal_Ethereum | Proposal_ParachainStaking | Proposal_Scheduler | Proposal_Democracy | Proposal_CouncilCollective | Proposal_TechComitteeCollective | Proposal_Treasury | Proposal_AuthorInherent | Proposal_AuthorFilter | Proposal_CrowdloanRewards | Proposal_AuthorMapping | Proposal_Proxy | Proposal_MaintenanceMode | Proposal_Identity | Proposal_XcmpQueue | Proposal_DmpQueue | Proposal_Assets | Proposal_XTokens | Proposal_AssetManager - -export interface Proposal_System { - __kind: 'System' - value: SystemCall -} - -export interface Proposal_Utility { - __kind: 'Utility' - value: UtilityCall -} - -export interface Proposal_Timestamp { - __kind: 'Timestamp' - value: TimestampCall -} - -export interface Proposal_Balances { - __kind: 'Balances' - value: BalancesCall -} - -export interface Proposal_Sudo { - __kind: 'Sudo' - value: SudoCall -} - -export interface Proposal_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - -export interface Proposal_EVM { - __kind: 'EVM' - value: EVMCall -} - -export interface Proposal_Ethereum { - __kind: 'Ethereum' - value: EthereumCall -} - -export interface Proposal_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Proposal_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall -} - -export interface Proposal_Democracy { - __kind: 'Democracy' - value: DemocracyCall -} - -export interface Proposal_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall -} - -export interface Proposal_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall -} - -export interface Proposal_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} - -export interface Proposal_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Proposal_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - -export interface Proposal_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall -} - -export interface Proposal_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Proposal_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface Proposal_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall -} - -export interface Proposal_Identity { - __kind: 'Identity' - value: IdentityCall -} - -export interface Proposal_XcmpQueue { - __kind: 'XcmpQueue' - value: XcmpQueueCall -} - -export interface Proposal_DmpQueue { - __kind: 'DmpQueue' - value: DmpQueueCall -} - -export interface Proposal_Assets { - __kind: 'Assets' - value: AssetsCall -} - -export interface Proposal_XTokens { - __kind: 'XTokens' - value: XTokensCall -} - -export interface Proposal_AssetManager { - __kind: 'AssetManager' - value: AssetManagerCall -} - -export type SystemCall = SystemCall_fill_block | SystemCall_remark | SystemCall_set_heap_pages | SystemCall_set_code | SystemCall_set_code_without_checks | SystemCall_set_changes_trie_config | SystemCall_set_storage | SystemCall_kill_storage | SystemCall_kill_prefix | SystemCall_remark_with_event - -/** - * A dispatch that will fill the block weight up to the given ratio. - */ -export interface SystemCall_fill_block { - __kind: 'fill_block' - ratio: number -} - -/** - * Make some on-chain remark. - * - * # - * - `O(1)` - * # - */ -export interface SystemCall_remark { - __kind: 'remark' - remark: Uint8Array -} - -/** - * 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 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: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * 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 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: [Uint8Array, Uint8Array][] -} - -/** - * 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: Uint8Array[] -} - -/** - * 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: Uint8Array - subkeys: number -} - -/** - * 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: Uint8Array -} - -export type UtilityCall = UtilityCall_batch | UtilityCall_as_derivative | UtilityCall_batch_all - -/** - * 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_35[] -} - -/** - * 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_35 -} - -/** - * 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_35[] -} - -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 type BalancesCall = BalancesCall_transfer | BalancesCall_set_balance | BalancesCall_force_transfer | BalancesCall_transfer_keep_alive | BalancesCall_transfer_all - -/** - * 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: Uint8Array - 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: Uint8Array - newFree: bigint - newReserved: bigint -} - -/** - * 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: Uint8Array - dest: Uint8Array - 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: Uint8Array - 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: Uint8Array - keepAlive: boolean -} - -export type SudoCall = SudoCall_sudo | SudoCall_sudo_unchecked_weight | SudoCall_set_key | SudoCall_sudo_as - -/** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # - */ -export interface SudoCall_sudo { - __kind: 'sudo' - call: Type_35 -} - -/** - * Authenticates the sudo key and dispatches a function call with `Root` origin. - * This function does not check the weight of the call, and instead allows the - * Sudo user to specify the weight of the call. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - The weight of this call is defined by the caller. - * # - */ -export interface SudoCall_sudo_unchecked_weight { - __kind: 'sudo_unchecked_weight' - call: Type_35 - weight: bigint -} - -/** - * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB change. - * # - */ -export interface SudoCall_set_key { - __kind: 'set_key' - new: Uint8Array -} - -/** - * Authenticates the sudo key and dispatches a function call with `Signed` origin from - * a given account. - * - * The dispatch origin for this call must be _Signed_. - * - * # - * - O(1). - * - Limited storage reads. - * - One DB write (event). - * - Weight of derivative `call` execution + 10,000. - * # - */ -export interface SudoCall_sudo_as { - __kind: 'sudo_as' - who: Uint8Array - call: Type_35 -} - -export type ParachainSystemCall = ParachainSystemCall_set_upgrade_block | ParachainSystemCall_set_validation_data | ParachainSystemCall_sudo_send_upward_message | ParachainSystemCall_authorize_upgrade | ParachainSystemCall_enact_authorized_upgrade - -/** - * Force an already scheduled validation function upgrade to happen on a particular block. - * - * Note that coordinating this block for the upgrade has to happen independently on the - * relay chain and this parachain. Synchronizing the block for the upgrade is sensitive, - * and this bypasses all checks and and normal protocols. Very easy to brick your chain - * if done wrong. - */ -export interface ParachainSystemCall_set_upgrade_block { - __kind: 'set_upgrade_block' - relayChainBlock: number -} - -/** - * Set the current validation data. - * - * This should be invoked exactly once per block. It will panic at the finalization - * phase if the call was not invoked. - * - * The dispatch origin for this call must be `Inherent` - * - * As a side effect, this function upgrades the current validation function - * if the appropriate time has come. - */ -export interface ParachainSystemCall_set_validation_data { - __kind: 'set_validation_data' - data: ParachainInherentData -} - -export interface ParachainSystemCall_sudo_send_upward_message { - __kind: 'sudo_send_upward_message' - message: Uint8Array -} - -export interface ParachainSystemCall_authorize_upgrade { - __kind: 'authorize_upgrade' - codeHash: Uint8Array -} - -export interface ParachainSystemCall_enact_authorized_upgrade { - __kind: 'enact_authorized_upgrade' - code: Uint8Array -} - -export type EVMCall = EVMCall_withdraw | EVMCall_call | EVMCall_create | EVMCall_create2 - -/** - * Withdraw balance from EVM into currency/balances pallet. - */ -export interface EVMCall_withdraw { - __kind: 'withdraw' - address: Uint8Array - value: bigint -} - -/** - * Issue an EVM call operation. This is similar to a message call transaction in Ethereum. - */ -export interface EVMCall_call { - __kind: 'call' - source: Uint8Array - target: Uint8Array - input: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create operation. This is similar to a contract creation transaction in - * Ethereum. - */ -export interface EVMCall_create { - __kind: 'create' - source: Uint8Array - init: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -/** - * Issue an EVM create2 operation. - */ -export interface EVMCall_create2 { - __kind: 'create2' - source: Uint8Array - init: Uint8Array - salt: Uint8Array - value: bigint - gasLimit: bigint - gasPrice: bigint - nonce: (bigint | undefined) -} - -export type EthereumCall = EthereumCall_transact - -/** - * Transact an Ethereum transaction. - */ -export interface EthereumCall_transact { - __kind: 'transact' - transaction: EthTransaction -} - -export type ParachainStakingCall = ParachainStakingCall_set_staking_expectations | ParachainStakingCall_set_inflation | ParachainStakingCall_set_parachain_bond_account | ParachainStakingCall_set_parachain_bond_reserve_percent | ParachainStakingCall_set_total_selected | ParachainStakingCall_set_collator_commission | ParachainStakingCall_set_blocks_per_round | ParachainStakingCall_join_candidates | ParachainStakingCall_leave_candidates | ParachainStakingCall_go_offline | ParachainStakingCall_go_online | ParachainStakingCall_candidate_bond_more | ParachainStakingCall_candidate_bond_less | ParachainStakingCall_nominate | ParachainStakingCall_leave_nominators | ParachainStakingCall_revoke_nomination | ParachainStakingCall_nominator_bond_more | ParachainStakingCall_nominator_bond_less - -/** - * Set the expectations for total staked. These expectations determine the issuance for - * the round according to logic in `fn compute_issuance` - */ -export interface ParachainStakingCall_set_staking_expectations { - __kind: 'set_staking_expectations' - expectations: Range -} - -/** - * Set the annual inflation rate to derive per-round inflation - */ -export interface ParachainStakingCall_set_inflation { - __kind: 'set_inflation' - schedule: Range -} - -/** - * Set the account that will hold funds set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_account { - __kind: 'set_parachain_bond_account' - new: Uint8Array -} - -/** - * Set the percent of inflation set aside for parachain bond - */ -export interface ParachainStakingCall_set_parachain_bond_reserve_percent { - __kind: 'set_parachain_bond_reserve_percent' - new: number -} - -/** - * Set the total number of collator candidates selected per round - * - changes are not applied until the start of the next round - */ -export interface ParachainStakingCall_set_total_selected { - __kind: 'set_total_selected' - new: number -} - -/** - * Set the commission for all collators - */ -export interface ParachainStakingCall_set_collator_commission { - __kind: 'set_collator_commission' - new: number -} - -/** - * Set blocks per round - * - if called with `new` less than length of current round, will transition immediately - * in the next block - * - also updates per-round inflation config - */ -export interface ParachainStakingCall_set_blocks_per_round { - __kind: 'set_blocks_per_round' - new: number -} - -/** - * Join the set of collator candidates - */ -export interface ParachainStakingCall_join_candidates { - __kind: 'join_candidates' - bond: bigint - candidateCount: number -} - -/** - * Request to leave the set of candidates. If successful, the account is immediately - * removed from the candidate pool to prevent selection as a collator, but unbonding is - * executed with a delay of `T::LeaveCandidates` rounds. - */ -export interface ParachainStakingCall_leave_candidates { - __kind: 'leave_candidates' - candidateCount: number -} - -/** - * Temporarily leave the set of collator candidates without unbonding - */ -export interface ParachainStakingCall_go_offline { - __kind: 'go_offline' -} - -/** - * Rejoin the set of collator candidates if previously had called `go_offline` - */ -export interface ParachainStakingCall_go_online { - __kind: 'go_online' -} - -/** - * Bond more for collator candidates - */ -export interface ParachainStakingCall_candidate_bond_more { - __kind: 'candidate_bond_more' - more: bigint -} - -/** - * Bond less for collator candidates - */ -export interface ParachainStakingCall_candidate_bond_less { - __kind: 'candidate_bond_less' - less: bigint -} - -/** - * If caller is not a nominator, then join the set of nominators - * If caller is a nominator, then makes nomination to change their nomination state - */ -export interface ParachainStakingCall_nominate { - __kind: 'nominate' - collator: Uint8Array - amount: bigint - collatorNominatorCount: number - nominationCount: number -} - -/** - * Request to leave the set of nominators. If successful, the nominator is scheduled - * to exit - */ -export interface ParachainStakingCall_leave_nominators { - __kind: 'leave_nominators' - nominationCount: number -} - -/** - * Request to revoke an existing nomination. If successful, the nomination is scheduled - * to exit - */ -export interface ParachainStakingCall_revoke_nomination { - __kind: 'revoke_nomination' - collator: Uint8Array -} - -/** - * Bond more for nominators with respect to a specific collator candidate - */ -export interface ParachainStakingCall_nominator_bond_more { - __kind: 'nominator_bond_more' - candidate: Uint8Array - more: bigint -} - -/** - * Bond less for nominators with respect to a specific nominator candidate - */ -export interface ParachainStakingCall_nominator_bond_less { - __kind: 'nominator_bond_less' - candidate: Uint8Array - less: bigint -} - -export type SchedulerCall = SchedulerCall_schedule | SchedulerCall_cancel | SchedulerCall_schedule_named | SchedulerCall_cancel_named | SchedulerCall_schedule_after | SchedulerCall_schedule_named_after - -/** - * 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: Type_35 -} - -/** - * 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 -} - -/** - * 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: Uint8Array - when: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 -} - -/** - * 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: Uint8Array -} - -/** - * 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: Type_35 -} - -/** - * 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: Uint8Array - after: number - maybePeriodic: ([number, number] | undefined) - priority: number - call: Type_35 -} - -export type DemocracyCall = DemocracyCall_propose | DemocracyCall_second | DemocracyCall_vote | DemocracyCall_emergency_cancel | DemocracyCall_external_propose | DemocracyCall_external_propose_majority | DemocracyCall_external_propose_default | DemocracyCall_fast_track | DemocracyCall_veto_external | DemocracyCall_cancel_referendum | DemocracyCall_cancel_queued | DemocracyCall_delegate | DemocracyCall_undelegate | DemocracyCall_clear_public_proposals | DemocracyCall_note_preimage | DemocracyCall_note_preimage_operational | DemocracyCall_note_imminent_preimage | DemocracyCall_note_imminent_preimage_operational | DemocracyCall_reap_preimage | DemocracyCall_unlock | DemocracyCall_remove_vote | DemocracyCall_remove_other_vote | DemocracyCall_enact_proposal | DemocracyCall_blacklist | DemocracyCall_cancel_proposal - -/** - * 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: Uint8Array - value: bigint -} - -/** - * 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 -} - -/** - * 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 -} - -/** - * 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. - * - * 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: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * 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: Uint8Array - votingPeriod: number - delay: number -} - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -/** - * 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: Uint8Array - conviction: Conviction - balance: bigint -} - -/** - * 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' -} - -/** - * 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' -} - -/** - * 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: Uint8Array -} - -/** - * Same as `note_preimage` but origin is `OperationalPreimageOrigin`. - */ -export interface DemocracyCall_note_preimage_operational { - __kind: 'note_preimage_operational' - encodedProposal: Uint8Array -} - -/** - * 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: Uint8Array -} - -/** - * Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`. - */ -export interface DemocracyCall_note_imminent_preimage_operational { - __kind: 'note_imminent_preimage_operational' - encodedProposal: Uint8Array -} - -/** - * 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: Uint8Array - proposalLenUpperBound: number -} - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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: Uint8Array - index: 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: Uint8Array - index: number -} - -/** - * 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: Uint8Array - 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 -} - -export type CouncilCollectiveCall = CouncilCollectiveCall_set_members | CouncilCollectiveCall_execute | CouncilCollectiveCall_propose | CouncilCollectiveCall_vote | CouncilCollectiveCall_close | CouncilCollectiveCall_disapprove_proposal - -/** - * 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 CouncilCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 CouncilCollectiveCall_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 CouncilCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 CouncilCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 CouncilCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 CouncilCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TechComitteeCollectiveCall = TechComitteeCollectiveCall_set_members | TechComitteeCollectiveCall_execute | TechComitteeCollectiveCall_propose | TechComitteeCollectiveCall_vote | TechComitteeCollectiveCall_close | TechComitteeCollectiveCall_disapprove_proposal - -/** - * 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 TechComitteeCollectiveCall_set_members { - __kind: 'set_members' - newMembers: Uint8Array[] - prime: (Uint8Array | undefined) - oldCount: number -} - -/** - * 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 TechComitteeCollectiveCall_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 TechComitteeCollectiveCall_propose { - __kind: 'propose' - threshold: number - proposal: Proposal - lengthBound: 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 TechComitteeCollectiveCall_vote { - __kind: 'vote' - proposal: Uint8Array - index: number - approve: boolean -} - -/** - * 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 TechComitteeCollectiveCall_close { - __kind: 'close' - proposalHash: Uint8Array - 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 TechComitteeCollectiveCall_disapprove_proposal { - __kind: 'disapprove_proposal' - proposalHash: Uint8Array -} - -export type TreasuryCall = TreasuryCall_propose_spend | TreasuryCall_reject_proposal | TreasuryCall_approve_proposal - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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 -} - -export type AuthorInherentCall = AuthorInherentCall_set_author - -/** - * Inherent to set the author of a block - */ -export interface AuthorInherentCall_set_author { - __kind: 'set_author' - author: Uint8Array -} - -export type AuthorFilterCall = AuthorFilterCall_set_eligible - -/** - * Update the eligible ratio. Intended to be called by governance. - */ -export interface AuthorFilterCall_set_eligible { - __kind: 'set_eligible' - new: number -} - -export type CrowdloanRewardsCall = CrowdloanRewardsCall_associate_native_identity | CrowdloanRewardsCall_change_association_with_relay_keys | CrowdloanRewardsCall_claim | CrowdloanRewardsCall_update_reward_address | CrowdloanRewardsCall_complete_initialization | CrowdloanRewardsCall_initialize_reward_vec - -/** - * Associate a native rewards_destination identity with a crowdloan contribution. - * - * The caller needs to provide the unassociated relay account and a proof to succeed - * with the association - * The proof is nothing but a signature over the reward_address using the relay keys - */ -export interface CrowdloanRewardsCall_associate_native_identity { - __kind: 'associate_native_identity' - rewardAccount: Uint8Array - relayAccount: Uint8Array - proof: MultiSignature -} - -/** - * Change reward account by submitting proofs from relay accounts - * - * The number of valid proofs needs to be bigger than 'RewardAddressRelayVoteThreshold' - * The account to be changed needs to be submitted as 'previous_account' - * Origin must be RewardAddressChangeOrigin - */ -export interface CrowdloanRewardsCall_change_association_with_relay_keys { - __kind: 'change_association_with_relay_keys' - rewardAccount: Uint8Array - previousAccount: Uint8Array - proofs: [Uint8Array, MultiSignature][] -} - -/** - * Collect whatever portion of your reward are currently vested. - */ -export interface CrowdloanRewardsCall_claim { - __kind: 'claim' -} - -/** - * Update reward address, proving that the caller owns the current native key - */ -export interface CrowdloanRewardsCall_update_reward_address { - __kind: 'update_reward_address' - newRewardAccount: Uint8Array -} - -/** - * This extrinsic completes the initialization if some checks are fullfiled. These checks are: - * -The reward contribution money matches the crowdloan pot - * -The end vesting block is higher than the init vesting block - * -The initialization has not complete yet - */ -export interface CrowdloanRewardsCall_complete_initialization { - __kind: 'complete_initialization' - leaseEndingBlock: number -} - -/** - * Initialize the reward distribution storage. It shortcuts whenever an error is found - * This does not enforce any checks other than making sure we dont go over funds - * complete_initialization should perform any additional - */ -export interface CrowdloanRewardsCall_initialize_reward_vec { - __kind: 'initialize_reward_vec' - rewards: [Uint8Array, (Uint8Array | undefined), bigint][] -} - -export type AuthorMappingCall = AuthorMappingCall_add_association | AuthorMappingCall_update_association | AuthorMappingCall_clear_association - -/** - * Register your AuthorId onchain so blocks you author are associated with your account. - * - * Users who have been (or will soon be) elected active collators in staking, - * should submit this extrinsic to have their blocks accepted and earn rewards. - */ -export interface AuthorMappingCall_add_association { - __kind: 'add_association' - authorId: Uint8Array -} - -/** - * Change your AuthorId. - * - * This is useful for normal key rotation or for when switching from one physical collator - * machine to another. No new security deposit is required. - */ -export interface AuthorMappingCall_update_association { - __kind: 'update_association' - oldAuthorId: Uint8Array - newAuthorId: Uint8Array -} - -/** - * Clear your AuthorId. - * - * This is useful when you are no longer an author and would like to re-claim your security - * deposit. - */ -export interface AuthorMappingCall_clear_association { - __kind: 'clear_association' - authorId: Uint8Array -} - -export type ProxyCall = ProxyCall_proxy | ProxyCall_add_proxy | ProxyCall_remove_proxy | ProxyCall_remove_proxies | ProxyCall_anonymous | ProxyCall_kill_anonymous | ProxyCall_announce | ProxyCall_remove_announcement | ProxyCall_reject_announcement | ProxyCall_proxy_announced - -/** - * 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: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 -} - -/** - * 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: Uint8Array - proxyType: ProxyType - delay: number -} - -/** - * 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: Uint8Array - proxyType: ProxyType - delay: number -} - -/** - * 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' -} - -/** - * 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: Uint8Array - proxyType: ProxyType - index: number - height: number - extIndex: 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: Uint8Array - callHash: Uint8Array -} - -/** - * 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: Uint8Array - callHash: Uint8Array -} - -/** - * 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: Uint8Array - callHash: Uint8Array -} - -/** - * 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: Uint8Array - real: Uint8Array - forceProxyType: (ProxyType | undefined) - call: Type_35 -} - -export type MaintenanceModeCall = MaintenanceModeCall_enter_maintenance_mode | MaintenanceModeCall_resume_normal_operation - -/** - * Place the chain in maintenance mode - * - * Weight cost is: - * * One DB read to ensure we're not already in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event - */ -export interface MaintenanceModeCall_enter_maintenance_mode { - __kind: 'enter_maintenance_mode' -} - -/** - * Return the chain to normal operating mode - * - * Weight cost is: - * * One DB read to ensure we're in maintenance mode - * * Two DB writes - 1 for the mode and 1 for the event - */ -export interface MaintenanceModeCall_resume_normal_operation { - __kind: 'resume_normal_operation' -} - -export type IdentityCall = IdentityCall_add_registrar | IdentityCall_set_identity | IdentityCall_set_subs | IdentityCall_clear_identity | IdentityCall_request_judgement | IdentityCall_cancel_request | IdentityCall_set_fee | IdentityCall_set_account_id | IdentityCall_set_fields | IdentityCall_provide_judgement | IdentityCall_kill_identity | IdentityCall_add_sub | IdentityCall_rename_sub | IdentityCall_remove_sub | IdentityCall_quit_sub - -/** - * 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: Uint8Array -} - -/** - * 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: [Uint8Array, Data][] -} - -/** - * 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' -} - -/** - * 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 -} - -/** - * 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 -} - -/** - * 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 -} - -/** - * 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: Uint8Array -} - -/** - * 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 -} - -/** - * 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: Uint8Array - judgement: IdentityJudgement -} - -/** - * 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: Uint8Array -} - -/** - * 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: Uint8Array - data: Data -} - -/** - * 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: Uint8Array - data: Data -} - -/** - * 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: Uint8Array -} - -/** - * 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' -} - -export type XcmpQueueCall = never - -export type DmpQueueCall = DmpQueueCall_service_overweight - -/** - * Service a single overweight 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: - * - `Unknown`: Message of `index` is unknown. - * - `OverLimit`: Message execution may use greater than `weight_limit`. - * - * Events: - * - `OverweightServiced`: On success. - */ -export interface DmpQueueCall_service_overweight { - __kind: 'service_overweight' - index: bigint - weightLimit: bigint -} - -export type AssetsCall = AssetsCall_create | AssetsCall_force_create | AssetsCall_destroy | AssetsCall_mint | AssetsCall_burn | AssetsCall_transfer | AssetsCall_transfer_keep_alive | AssetsCall_force_transfer | AssetsCall_freeze | AssetsCall_thaw | AssetsCall_freeze_asset | AssetsCall_thaw_asset | AssetsCall_transfer_ownership | AssetsCall_set_team | AssetsCall_set_metadata | AssetsCall_clear_metadata | AssetsCall_force_set_metadata | AssetsCall_force_clear_metadata | AssetsCall_force_asset_status | AssetsCall_approve_transfer | AssetsCall_cancel_approval | AssetsCall_force_cancel_approval | AssetsCall_transfer_approved - -/** - * Issue a new class of fungible assets from a public origin. - * - * This new asset class has no assets initially and its owner is the origin. - * - * The origin must be Signed and the sender must have sufficient funds free. - * - * Funds of sender are reserved by `AssetDeposit`. - * - * Parameters: - * - `id`: The identifier of the new asset. This must not be currently in use to identify - * an existing asset. - * - `admin`: The admin of this class of assets. The admin is the initial address of each - * member of the asset class's admin team. - * - `min_balance`: The minimum balance of this new asset that any single account must - * have. If an account's balance is reduced below this, then it collapses to zero. - * - * Emits `Created` event when successful. - * - * Weight: `O(1)` - */ -export interface AssetsCall_create { - __kind: 'create' - id: bigint - admin: Uint8Array - minBalance: bigint -} - -/** - * Issue a new class of fungible assets from a privileged origin. - * - * This new asset class has no assets initially. - * - * The origin must conform to `ForceOrigin`. - * - * Unlike `create`, no funds are reserved. - * - * - `id`: The identifier of the new asset. This must not be currently in use to identify - * an existing asset. - * - `owner`: The owner of this class of assets. The owner has full superuser permissions - * over this asset, but may later change and configure the permissions using `transfer_ownership` - * and `set_team`. - * - `min_balance`: The minimum balance of this new asset that any single account must - * have. If an account's balance is reduced below this, then it collapses to zero. - * - * Emits `ForceCreated` event when successful. - * - * Weight: `O(1)` - */ -export interface AssetsCall_force_create { - __kind: 'force_create' - id: bigint - owner: Uint8Array - isSufficient: boolean - minBalance: bigint -} - -/** - * Destroy a class of fungible assets. - * - * The origin must conform to `ForceOrigin` or must be Signed and the sender must be the - * owner of the asset `id`. - * - * - `id`: The identifier of the asset to be destroyed. This must identify an existing - * asset. - * - * Emits `Destroyed` event when successful. - * - * NOTE: It can be helpful to first freeze an asset before destroying it so that you - * can provide accurate witness information and prevent users from manipulating state - * in a way that can make it harder to destroy. - * - * Weight: `O(c + p + a)` where: - * - `c = (witness.accounts - witness.sufficients)` - * - `s = witness.sufficients` - * - `a = witness.approvals` - */ -export interface AssetsCall_destroy { - __kind: 'destroy' - id: bigint - witness: AssetDestroyWitness -} - -/** - * Mint assets of a particular class. - * - * The origin must be Signed and the sender must be the Issuer of the asset `id`. - * - * - `id`: The identifier of the asset to have some amount minted. - * - `beneficiary`: The account to be credited with the minted assets. - * - `amount`: The amount of the asset to be minted. - * - * Emits `Issued` event when successful. - * - * Weight: `O(1)` - * Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. - */ -export interface AssetsCall_mint { - __kind: 'mint' - id: bigint - beneficiary: Uint8Array - amount: bigint -} - -/** - * Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. - * - * Origin must be Signed and the sender should be the Manager of the asset `id`. - * - * Bails with `BalanceZero` if the `who` is already dead. - * - * - `id`: The identifier of the asset to have some amount burned. - * - `who`: The account to be debited from. - * - `amount`: The maximum amount by which `who`'s balance should be reduced. - * - * Emits `Burned` with the actual amount burned. If this takes the balance to below the - * minimum for the asset, then the amount burned is increased to take it to zero. - * - * Weight: `O(1)` - * Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. - */ -export interface AssetsCall_burn { - __kind: 'burn' - id: bigint - who: Uint8Array - amount: bigint -} - -/** - * Move some assets from the sender account to another. - * - * Origin must be Signed. - * - * - `id`: The identifier of the asset to have some amount transferred. - * - `target`: The account to be credited. - * - `amount`: The amount by which the sender's balance of assets should be reduced and - * `target`'s balance increased. The amount actually transferred may be slightly greater in - * the case that the transfer would otherwise take the sender balance above zero but below - * the minimum balance. Must be greater than zero. - * - * Emits `Transferred` with the actual amount transferred. If this takes the source balance - * to below the minimum for the asset, then the amount transferred is increased to take it - * to zero. - * - * Weight: `O(1)` - * Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of - * `target`. - */ -export interface AssetsCall_transfer { - __kind: 'transfer' - id: bigint - target: Uint8Array - amount: bigint -} - -/** - * Move some assets from the sender account to another, keeping the sender account alive. - * - * Origin must be Signed. - * - * - `id`: The identifier of the asset to have some amount transferred. - * - `target`: The account to be credited. - * - `amount`: The amount by which the sender's balance of assets should be reduced and - * `target`'s balance increased. The amount actually transferred may be slightly greater in - * the case that the transfer would otherwise take the sender balance above zero but below - * the minimum balance. Must be greater than zero. - * - * Emits `Transferred` with the actual amount transferred. If this takes the source balance - * to below the minimum for the asset, then the amount transferred is increased to take it - * to zero. - * - * Weight: `O(1)` - * Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of - * `target`. - */ -export interface AssetsCall_transfer_keep_alive { - __kind: 'transfer_keep_alive' - id: bigint - target: Uint8Array - amount: bigint -} - -/** - * Move some assets from one account to another. - * - * Origin must be Signed and the sender should be the Admin of the asset `id`. - * - * - `id`: The identifier of the asset to have some amount transferred. - * - `source`: The account to be debited. - * - `dest`: The account to be credited. - * - `amount`: The amount by which the `source`'s balance of assets should be reduced and - * `dest`'s balance increased. The amount actually transferred may be slightly greater in - * the case that the transfer would otherwise take the `source` balance above zero but - * below the minimum balance. Must be greater than zero. - * - * Emits `Transferred` with the actual amount transferred. If this takes the source balance - * to below the minimum for the asset, then the amount transferred is increased to take it - * to zero. - * - * Weight: `O(1)` - * Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of - * `dest`. - */ -export interface AssetsCall_force_transfer { - __kind: 'force_transfer' - id: bigint - source: Uint8Array - dest: Uint8Array - amount: bigint -} - -/** - * Disallow further unprivileged transfers from an account. - * - * Origin must be Signed and the sender should be the Freezer of the asset `id`. - * - * - `id`: The identifier of the asset to be frozen. - * - `who`: The account to be frozen. - * - * Emits `Frozen`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_freeze { - __kind: 'freeze' - id: bigint - who: Uint8Array -} - -/** - * Allow unprivileged transfers from an account again. - * - * Origin must be Signed and the sender should be the Admin of the asset `id`. - * - * - `id`: The identifier of the asset to be frozen. - * - `who`: The account to be unfrozen. - * - * Emits `Thawed`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_thaw { - __kind: 'thaw' - id: bigint - who: Uint8Array -} - -/** - * Disallow further unprivileged transfers for the asset class. - * - * Origin must be Signed and the sender should be the Freezer of the asset `id`. - * - * - `id`: The identifier of the asset to be frozen. - * - * Emits `Frozen`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_freeze_asset { - __kind: 'freeze_asset' - id: bigint -} - -/** - * Allow unprivileged transfers for the asset again. - * - * Origin must be Signed and the sender should be the Admin of the asset `id`. - * - * - `id`: The identifier of the asset to be thawed. - * - * Emits `Thawed`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_thaw_asset { - __kind: 'thaw_asset' - id: bigint -} - -/** - * Change the Owner of an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * - `id`: The identifier of the asset. - * - `owner`: The new Owner of this asset. - * - * Emits `OwnerChanged`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_transfer_ownership { - __kind: 'transfer_ownership' - id: bigint - owner: Uint8Array -} - -/** - * Change the Issuer, Admin and Freezer of an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * - `id`: The identifier of the asset to be frozen. - * - `issuer`: The new Issuer of this asset. - * - `admin`: The new Admin of this asset. - * - `freezer`: The new Freezer of this asset. - * - * Emits `TeamChanged`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_set_team { - __kind: 'set_team' - id: bigint - issuer: Uint8Array - admin: Uint8Array - freezer: Uint8Array -} - -/** - * Set the metadata for an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * Funds of sender are reserved according to the formula: - * `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into - * account any already reserved funds. - * - * - `id`: The identifier of the asset to update. - * - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - * - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - * - `decimals`: The number of decimals this asset uses to represent one unit. - * - * Emits `MetadataSet`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_set_metadata { - __kind: 'set_metadata' - id: bigint - name: Uint8Array - symbol: Uint8Array - decimals: number -} - -/** - * Clear the metadata for an asset. - * - * Origin must be Signed and the sender should be the Owner of the asset `id`. - * - * Any deposit is freed for the asset owner. - * - * - `id`: The identifier of the asset to clear. - * - * Emits `MetadataCleared`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_clear_metadata { - __kind: 'clear_metadata' - id: bigint -} - -/** - * Force the metadata for an asset to some value. - * - * Origin must be ForceOrigin. - * - * Any deposit is left alone. - * - * - `id`: The identifier of the asset to update. - * - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - * - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - * - `decimals`: The number of decimals this asset uses to represent one unit. - * - * Emits `MetadataSet`. - * - * Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. - */ -export interface AssetsCall_force_set_metadata { - __kind: 'force_set_metadata' - id: bigint - name: Uint8Array - symbol: Uint8Array - decimals: number - isFrozen: boolean -} - -/** - * Clear the metadata for an asset. - * - * Origin must be ForceOrigin. - * - * Any deposit is returned. - * - * - `id`: The identifier of the asset to clear. - * - * Emits `MetadataCleared`. - * - * Weight: `O(1)` - */ -export interface AssetsCall_force_clear_metadata { - __kind: 'force_clear_metadata' - id: bigint -} - -/** - * Alter the attributes of a given asset. - * - * Origin must be `ForceOrigin`. - * - * - `id`: The identifier of the asset. - * - `owner`: The new Owner of this asset. - * - `issuer`: The new Issuer of this asset. - * - `admin`: The new Admin of this asset. - * - `freezer`: The new Freezer of this asset. - * - `min_balance`: The minimum balance of this new asset that any single account must - * have. If an account's balance is reduced below this, then it collapses to zero. - * - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient - * value to account for the state bloat associated with its balance storage. If set to - * `true`, then non-zero balances may be stored without a `consumer` reference (and thus - * an ED in the Balances pallet or whatever else is used to control user-account state - * growth). - * - `is_frozen`: Whether this asset class is frozen except for permissioned/admin - * instructions. - * - * Emits `AssetStatusChanged` with the identity of the asset. - * - * Weight: `O(1)` - */ -export interface AssetsCall_force_asset_status { - __kind: 'force_asset_status' - id: bigint - owner: Uint8Array - issuer: Uint8Array - admin: Uint8Array - freezer: Uint8Array - minBalance: bigint - isSufficient: boolean - isFrozen: boolean -} - -/** - * Approve an amount of asset for transfer by a delegated third-party account. - * - * Origin must be Signed. - * - * Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account - * for the purpose of holding the approval. If some non-zero amount of assets is already - * approved from signing account to `delegate`, then it is topped up or unreserved to - * meet the right value. - * - * NOTE: The signing account does not need to own `amount` of assets at the point of - * making this call. - * - * - `id`: The identifier of the asset. - * - `delegate`: The account to delegate permission to transfer asset. - * - `amount`: The amount of asset that may be transferred by `delegate`. If there is - * already an approval in place, then this acts additively. - * - * Emits `ApprovedTransfer` on success. - * - * Weight: `O(1)` - */ -export interface AssetsCall_approve_transfer { - __kind: 'approve_transfer' - id: bigint - delegate: Uint8Array - amount: bigint -} - -/** - * Cancel all of some asset approved for delegated transfer by a third-party account. - * - * Origin must be Signed and there must be an approval in place between signer and - * `delegate`. - * - * Unreserves any deposit previously reserved by `approve_transfer` for the approval. - * - * - `id`: The identifier of the asset. - * - `delegate`: The account delegated permission to transfer asset. - * - * Emits `ApprovalCancelled` on success. - * - * Weight: `O(1)` - */ -export interface AssetsCall_cancel_approval { - __kind: 'cancel_approval' - id: bigint - delegate: Uint8Array -} - -/** - * Cancel all of some asset approved for delegated transfer by a third-party account. - * - * Origin must be either ForceOrigin or Signed origin with the signer being the Admin - * account of the asset `id`. - * - * Unreserves any deposit previously reserved by `approve_transfer` for the approval. - * - * - `id`: The identifier of the asset. - * - `delegate`: The account delegated permission to transfer asset. - * - * Emits `ApprovalCancelled` on success. - * - * Weight: `O(1)` - */ -export interface AssetsCall_force_cancel_approval { - __kind: 'force_cancel_approval' - id: bigint - owner: Uint8Array - delegate: Uint8Array -} - -/** - * Transfer some asset balance from a previously delegated account to some third-party - * account. - * - * Origin must be Signed and there must be an approval in place by the `owner` to the - * signer. - * - * If the entire amount approved for transfer is transferred, then any deposit previously - * reserved by `approve_transfer` is unreserved. - * - * - `id`: The identifier of the asset. - * - `owner`: The account which previously approved for a transfer of at least `amount` and - * from which the asset balance will be withdrawn. - * - `destination`: The account to which the asset balance of `amount` will be transferred. - * - `amount`: The amount of assets to transfer. - * - * Emits `TransferredApproved` on success. - * - * Weight: `O(1)` - */ -export interface AssetsCall_transfer_approved { - __kind: 'transfer_approved' - id: bigint - owner: Uint8Array - destination: Uint8Array - amount: bigint -} - -export type XTokensCall = XTokensCall_transfer | XTokensCall_transfer_multiasset - -/** - * Transfer native currencies. - * - * `dest_weight` is the weight for XCM execution on the dest chain, and - * it would be charged from the transferred assets. If set below - * requirements, the execution may fail and assets wouldn't be - * received. - * - * It's a no-op if any error on local XCM execution or message sending. - * Note sending assets out per se doesn't guarantee they would be - * received. Receiving depends on if the XCM message could be delivered - * by the network, and if the receiving chain would handle - * messages correctly. - */ -export interface XTokensCall_transfer { - __kind: 'transfer' - currencyId: CurrencyId - amount: bigint - dest: MultiLocation - destWeight: bigint -} - -/** - * Transfer `MultiAsset`. - * - * `dest_weight` is the weight for XCM execution on the dest chain, and - * it would be charged from the transferred assets. If set below - * requirements, the execution may fail and assets wouldn't be - * received. - * - * It's a no-op if any error on local XCM execution or message sending. - * Note sending assets out per se doesn't guarantee they would be - * received. Receiving depends on if the XCM message could be delivered - * by the network, and if the receiving chain would handle - * messages correctly. - */ -export interface XTokensCall_transfer_multiasset { - __kind: 'transfer_multiasset' - asset: MultiAsset - dest: MultiLocation - destWeight: bigint -} - -export type AssetManagerCall = AssetManagerCall_register_asset | AssetManagerCall_set_asset_units_per_second - -/** - * Register new asset with the asset manager - */ -export interface AssetManagerCall_register_asset { - __kind: 'register_asset' - asset: AssetType - metadata: AssetRegistrarMetadata - minAmount: bigint -} - -/** - * Change the amount of units we are charging per execution second for a given AssetId - */ -export interface AssetManagerCall_set_asset_units_per_second { - __kind: 'set_asset_units_per_second' - assetId: bigint - unitsPerSecond: bigint -} - -export interface ChangesTrieConfiguration { - digestInterval: number - digestLevels: number -} - -export type Type_35 = Type_35_System | Type_35_Utility | Type_35_Timestamp | Type_35_Balances | Type_35_Sudo | Type_35_ParachainSystem | Type_35_EVM | Type_35_Ethereum | Type_35_ParachainStaking | Type_35_Scheduler | Type_35_Democracy | Type_35_CouncilCollective | Type_35_TechComitteeCollective | Type_35_Treasury | Type_35_AuthorInherent | Type_35_AuthorFilter | Type_35_CrowdloanRewards | Type_35_AuthorMapping | Type_35_Proxy | Type_35_MaintenanceMode | Type_35_Identity | Type_35_XcmpQueue | Type_35_DmpQueue | Type_35_Assets | Type_35_XTokens | Type_35_AssetManager - -export interface Type_35_System { - __kind: 'System' - value: SystemCall -} - -export interface Type_35_Utility { - __kind: 'Utility' - value: UtilityCall -} - -export interface Type_35_Timestamp { - __kind: 'Timestamp' - value: TimestampCall -} - -export interface Type_35_Balances { - __kind: 'Balances' - value: BalancesCall -} - -export interface Type_35_Sudo { - __kind: 'Sudo' - value: SudoCall -} - -export interface Type_35_ParachainSystem { - __kind: 'ParachainSystem' - value: ParachainSystemCall -} - -export interface Type_35_EVM { - __kind: 'EVM' - value: EVMCall -} - -export interface Type_35_Ethereum { - __kind: 'Ethereum' - value: EthereumCall -} - -export interface Type_35_ParachainStaking { - __kind: 'ParachainStaking' - value: ParachainStakingCall -} - -export interface Type_35_Scheduler { - __kind: 'Scheduler' - value: SchedulerCall -} - -export interface Type_35_Democracy { - __kind: 'Democracy' - value: DemocracyCall -} - -export interface Type_35_CouncilCollective { - __kind: 'CouncilCollective' - value: CouncilCollectiveCall -} - -export interface Type_35_TechComitteeCollective { - __kind: 'TechComitteeCollective' - value: TechComitteeCollectiveCall -} - -export interface Type_35_Treasury { - __kind: 'Treasury' - value: TreasuryCall -} - -export interface Type_35_AuthorInherent { - __kind: 'AuthorInherent' - value: AuthorInherentCall -} - -export interface Type_35_AuthorFilter { - __kind: 'AuthorFilter' - value: AuthorFilterCall -} - -export interface Type_35_CrowdloanRewards { - __kind: 'CrowdloanRewards' - value: CrowdloanRewardsCall -} - -export interface Type_35_AuthorMapping { - __kind: 'AuthorMapping' - value: AuthorMappingCall -} - -export interface Type_35_Proxy { - __kind: 'Proxy' - value: ProxyCall -} - -export interface Type_35_MaintenanceMode { - __kind: 'MaintenanceMode' - value: MaintenanceModeCall -} - -export interface Type_35_Identity { - __kind: 'Identity' - value: IdentityCall -} - -export interface Type_35_XcmpQueue { - __kind: 'XcmpQueue' - value: XcmpQueueCall -} - -export interface Type_35_DmpQueue { - __kind: 'DmpQueue' - value: DmpQueueCall -} - -export interface Type_35_Assets { - __kind: 'Assets' - value: AssetsCall -} - -export interface Type_35_XTokens { - __kind: 'XTokens' - value: XTokensCall -} - -export interface Type_35_AssetManager { - __kind: 'AssetManager' - value: AssetManagerCall -} - -export interface ParachainInherentData { - validationData: PersistedValidationData - relayChainState: StorageProof - downwardMessages: InboundDownwardMessage[] - horizontalMessages: [number, InboundHrmpMessage[]][] -} - -export interface EthTransaction { - nonce: bigint - gasPrice: bigint - gasLimit: bigint - action: EthTransactionAction - value: bigint - input: Uint8Array - signature: EthTransactionSignature -} - -export interface Range { - min: bigint - ideal: bigint - max: bigint -} - -export type AccountVote = AccountVote_Standard | AccountVote_Split - -export interface AccountVote_Standard { - __kind: 'Standard' - value: AccountVoteStandard -} - -export interface AccountVote_Split { - __kind: 'Split' - value: AccountVoteSplit -} - -export type Conviction = Conviction_None | Conviction_Locked1x | Conviction_Locked2x | Conviction_Locked3x | Conviction_Locked4x | Conviction_Locked5x | Conviction_Locked6x - -export interface Conviction_None { - __kind: '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 type MultiSignature = MultiSignature_Ed25519 | MultiSignature_Sr25519 | MultiSignature_Ecdsa - -export interface MultiSignature_Ed25519 { - __kind: 'Ed25519' - value: Uint8Array -} - -export interface MultiSignature_Sr25519 { - __kind: 'Sr25519' - value: Uint8Array -} - -export interface MultiSignature_Ecdsa { - __kind: 'Ecdsa' - value: Uint8Array -} - -export type ProxyType = ProxyType_Any | ProxyType_NonTransfer | ProxyType_Governance | ProxyType_Staking | ProxyType_CancelProxy | ProxyType_Balances | ProxyType_AuthorMapping - -export interface ProxyType_Any { - __kind: 'Any' -} - -export interface ProxyType_NonTransfer { - __kind: 'NonTransfer' -} - -export interface ProxyType_Governance { - __kind: 'Governance' -} - -export interface ProxyType_Staking { - __kind: 'Staking' -} - -export interface ProxyType_CancelProxy { - __kind: 'CancelProxy' -} - -export interface ProxyType_Balances { - __kind: 'Balances' -} - -export interface ProxyType_AuthorMapping { - __kind: 'AuthorMapping' -} - -export interface IdentityInfo { - additional: [Data, Data][] - display: Data - legal: Data - web: Data - riot: Data - email: Data - pgpFingerprint: (Uint8Array | undefined) - image: Data - twitter: Data -} - -export type Data = Data_None | Data_Raw0 | Data_Raw1 | Data_Raw2 | Data_Raw3 | Data_Raw4 | Data_Raw5 | Data_Raw6 | Data_Raw7 | Data_Raw8 | Data_Raw9 | Data_Raw10 | Data_Raw11 | Data_Raw12 | Data_Raw13 | Data_Raw14 | Data_Raw15 | Data_Raw16 | Data_Raw17 | Data_Raw18 | Data_Raw19 | Data_Raw20 | Data_Raw21 | Data_Raw22 | Data_Raw23 | Data_Raw24 | Data_Raw25 | Data_Raw26 | Data_Raw27 | Data_Raw28 | Data_Raw29 | Data_Raw30 | Data_Raw31 | Data_Raw32 | Data_BlakeTwo256 | Data_Sha256 | Data_Keccak256 | Data_ShaThree256 - -export interface Data_None { - __kind: 'None' -} - -export interface Data_Raw0 { - __kind: 'Raw0' - value: Uint8Array -} - -export interface Data_Raw1 { - __kind: 'Raw1' - value: Uint8Array -} - -export interface Data_Raw2 { - __kind: 'Raw2' - value: Uint8Array -} - -export interface Data_Raw3 { - __kind: 'Raw3' - value: Uint8Array -} - -export interface Data_Raw4 { - __kind: 'Raw4' - value: Uint8Array -} - -export interface Data_Raw5 { - __kind: 'Raw5' - value: Uint8Array -} - -export interface Data_Raw6 { - __kind: 'Raw6' - value: Uint8Array -} - -export interface Data_Raw7 { - __kind: 'Raw7' - value: Uint8Array -} - -export interface Data_Raw8 { - __kind: 'Raw8' - value: Uint8Array -} - -export interface Data_Raw9 { - __kind: 'Raw9' - value: Uint8Array -} - -export interface Data_Raw10 { - __kind: 'Raw10' - value: Uint8Array -} - -export interface Data_Raw11 { - __kind: 'Raw11' - value: Uint8Array -} - -export interface Data_Raw12 { - __kind: 'Raw12' - value: Uint8Array -} - -export interface Data_Raw13 { - __kind: 'Raw13' - value: Uint8Array -} - -export interface Data_Raw14 { - __kind: 'Raw14' - value: Uint8Array -} - -export interface Data_Raw15 { - __kind: 'Raw15' - value: Uint8Array -} - -export interface Data_Raw16 { - __kind: 'Raw16' - value: Uint8Array -} - -export interface Data_Raw17 { - __kind: 'Raw17' - value: Uint8Array -} - -export interface Data_Raw18 { - __kind: 'Raw18' - value: Uint8Array -} - -export interface Data_Raw19 { - __kind: 'Raw19' - value: Uint8Array -} - -export interface Data_Raw20 { - __kind: 'Raw20' - value: Uint8Array -} - -export interface Data_Raw21 { - __kind: 'Raw21' - value: Uint8Array -} - -export interface Data_Raw22 { - __kind: 'Raw22' - value: Uint8Array -} - -export interface Data_Raw23 { - __kind: 'Raw23' - value: Uint8Array -} - -export interface Data_Raw24 { - __kind: 'Raw24' - value: Uint8Array -} - -export interface Data_Raw25 { - __kind: 'Raw25' - value: Uint8Array -} - -export interface Data_Raw26 { - __kind: 'Raw26' - value: Uint8Array -} - -export interface Data_Raw27 { - __kind: 'Raw27' - value: Uint8Array -} - -export interface Data_Raw28 { - __kind: 'Raw28' - value: Uint8Array -} - -export interface Data_Raw29 { - __kind: 'Raw29' - value: Uint8Array -} - -export interface Data_Raw30 { - __kind: 'Raw30' - value: Uint8Array -} - -export interface Data_Raw31 { - __kind: 'Raw31' - value: Uint8Array -} - -export interface Data_Raw32 { - __kind: 'Raw32' - value: Uint8Array -} - -export interface Data_BlakeTwo256 { - __kind: 'BlakeTwo256' - value: Uint8Array -} - -export interface Data_Sha256 { - __kind: 'Sha256' - value: Uint8Array -} - -export interface Data_Keccak256 { - __kind: 'Keccak256' - value: Uint8Array -} - -export interface Data_ShaThree256 { - __kind: 'ShaThree256' - value: Uint8Array -} - -export type IdentityJudgement = IdentityJudgement_Unknown | IdentityJudgement_FeePaid | IdentityJudgement_Reasonable | IdentityJudgement_KnownGood | IdentityJudgement_OutOfDate | IdentityJudgement_LowQuality | IdentityJudgement_Erroneous - -export interface IdentityJudgement_Unknown { - __kind: 'Unknown' -} - -export interface IdentityJudgement_FeePaid { - __kind: 'FeePaid' - value: bigint -} - -export interface IdentityJudgement_Reasonable { - __kind: 'Reasonable' -} - -export interface IdentityJudgement_KnownGood { - __kind: 'KnownGood' -} - -export interface IdentityJudgement_OutOfDate { - __kind: 'OutOfDate' -} - -export interface IdentityJudgement_LowQuality { - __kind: 'LowQuality' -} - -export interface IdentityJudgement_Erroneous { - __kind: 'Erroneous' -} - -export interface AssetDestroyWitness { - accounts: number - sufficients: number - approvals: number -} - -export type CurrencyId = CurrencyId_SelfReserve | CurrencyId_OtherReserve - -export interface CurrencyId_SelfReserve { - __kind: 'SelfReserve' -} - -export interface CurrencyId_OtherReserve { - __kind: 'OtherReserve' - value: bigint -} - -export interface MultiLocation { - parents: number - interior: JunctionsV1 -} - -export interface MultiAsset { - id: XcmAssetId - fungibility: FungibilityV1 -} - -export type AssetType = AssetType_Xcm - -export interface AssetType_Xcm { - __kind: 'Xcm' - value: MultiLocation -} - -export interface AssetRegistrarMetadata { - name: Uint8Array - symbol: Uint8Array - decimals: number - isFrozen: boolean -} - -export interface PersistedValidationData { - parentHead: Uint8Array - relayParentNumber: number - relayParentStorageRoot: Uint8Array - maxPovSize: number -} - -export interface StorageProof { - trieNodes: Uint8Array[] -} - -export interface InboundDownwardMessage { - pubSentAt: number - pubMsg: Uint8Array -} - -export interface InboundHrmpMessage { - sentAt: number - data: Uint8Array -} - -export type EthTransactionAction = EthTransactionAction_Call | EthTransactionAction_Create - -export interface EthTransactionAction_Call { - __kind: 'Call' - value: Uint8Array -} - -export interface EthTransactionAction_Create { - __kind: 'Create' -} - -export interface EthTransactionSignature { - v: bigint - r: Uint8Array - s: Uint8Array -} - -export interface AccountVoteStandard { - vote: number - balance: bigint -} - -export interface AccountVoteSplit { - aye: bigint - nay: bigint -} - -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 type XcmAssetId = XcmAssetId_Concrete | XcmAssetId_Abstract - -export interface XcmAssetId_Concrete { - __kind: 'Concrete' - value: MultiLocation -} - -export interface XcmAssetId_Abstract { - __kind: 'Abstract' - value: Uint8Array -} - -export type FungibilityV1 = FungibilityV1_Fungible | FungibilityV1_NonFungible - -export interface FungibilityV1_Fungible { - __kind: 'Fungible' - value: bigint -} - -export interface FungibilityV1_NonFungible { - __kind: 'NonFungible' - value: AssetInstanceV1 -} - -export type JunctionV1 = JunctionV1_Parachain | JunctionV1_AccountId32 | JunctionV1_AccountIndex64 | JunctionV1_AccountKey20 | JunctionV1_PalletInstance | JunctionV1_GeneralIndex | JunctionV1_GeneralKey | JunctionV1_OnlyChild | JunctionV1_Plurality - -export interface JunctionV1_Parachain { - __kind: 'Parachain' - value: number -} - -export interface JunctionV1_AccountId32 { - __kind: 'AccountId32' - value: ENUM_AccountId32 -} - -export interface JunctionV1_AccountIndex64 { - __kind: 'AccountIndex64' - value: ENUM_AccountIndex64 -} - -export interface JunctionV1_AccountKey20 { - __kind: 'AccountKey20' - value: ENUM_AccountKey20 -} - -export interface JunctionV1_PalletInstance { - __kind: 'PalletInstance' - value: number -} - -export interface JunctionV1_GeneralIndex { - __kind: 'GeneralIndex' - value: bigint -} - -export interface JunctionV1_GeneralKey { - __kind: 'GeneralKey' - value: Uint8Array -} - -export interface JunctionV1_OnlyChild { - __kind: 'OnlyChild' -} - -export interface JunctionV1_Plurality { - __kind: 'Plurality' - value: ENUM_Plurality -} - -export type AssetInstanceV1 = AssetInstanceV1_Undefined | AssetInstanceV1_Index | AssetInstanceV1_Array4 | AssetInstanceV1_Array8 | AssetInstanceV1_Array16 | AssetInstanceV1_Array32 | AssetInstanceV1_Blob - -export interface AssetInstanceV1_Undefined { - __kind: 'Undefined' -} - -export interface AssetInstanceV1_Index { - __kind: 'Index' - value: bigint -} - -export interface AssetInstanceV1_Array4 { - __kind: 'Array4' - value: Uint8Array -} - -export interface AssetInstanceV1_Array8 { - __kind: 'Array8' - value: Uint8Array -} - -export interface AssetInstanceV1_Array16 { - __kind: 'Array16' - value: Uint8Array -} - -export interface AssetInstanceV1_Array32 { - __kind: 'Array32' - value: Uint8Array -} - -export interface AssetInstanceV1_Blob { - __kind: 'Blob' - value: Uint8Array -} - -export interface ENUM_AccountId32 { - network: NetworkId - id: Uint8Array -} - -export interface ENUM_AccountIndex64 { - network: NetworkId - index: bigint -} - -export interface ENUM_AccountKey20 { - network: NetworkId - key: Uint8Array -} - -export interface ENUM_Plurality { - id: BodyId - part: BodyPart -} - -export type NetworkId = NetworkId_Any | NetworkId_Named | NetworkId_Polkadot | NetworkId_Kusama - -export interface NetworkId_Any { - __kind: 'Any' -} - -export interface NetworkId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface NetworkId_Polkadot { - __kind: 'Polkadot' -} - -export interface NetworkId_Kusama { - __kind: 'Kusama' -} - -export type BodyId = BodyId_Unit | BodyId_Named | BodyId_Index | BodyId_Executive | BodyId_Technical | BodyId_Legislative | BodyId_Judicial - -export interface BodyId_Unit { - __kind: 'Unit' -} - -export interface BodyId_Named { - __kind: 'Named' - value: Uint8Array -} - -export interface BodyId_Index { - __kind: 'Index' - value: number -} - -export interface BodyId_Executive { - __kind: 'Executive' -} - -export interface BodyId_Technical { - __kind: 'Technical' -} - -export interface BodyId_Legislative { - __kind: 'Legislative' -} - -export interface BodyId_Judicial { - __kind: 'Judicial' -} - -export type BodyPart = BodyPart_Voice | BodyPart_Members | BodyPart_Fraction | BodyPart_AtLeastProportion | BodyPart_MoreThanProportion - -export interface BodyPart_Voice { - __kind: 'Voice' -} - -export interface BodyPart_Members { - __kind: 'Members' - value: number -} - -export interface BodyPart_Fraction { - __kind: 'Fraction' - nom: number - denom: number -} - -export interface BodyPart_AtLeastProportion { - __kind: 'AtLeastProportion' - nom: number - denom: number -} - -export interface BodyPart_MoreThanProportion { - __kind: 'MoreThanProportion' - nom: number - denom: number -} diff --git a/src/types/v900.ts b/src/types/v900.ts index 1fbfb79d..1663e8f1 100644 --- a/src/types/v900.ts +++ b/src/types/v900.ts @@ -1,12 +1,12 @@ import type {Result, Option} from './support' -export type Type_33 = Type_33_Ok | Type_33_Err +export type Type_43 = Type_43_Ok | Type_43_Err -export interface Type_33_Ok { +export interface Type_43_Ok { __kind: 'Ok' } -export interface Type_33_Err { +export interface Type_43_Err { __kind: 'Err' value: DispatchError } diff --git a/typegen/typegen.json b/typegen/typegen.json index dd36fb71..a6dc6e3b 100644 --- a/typegen/typegen.json +++ b/typegen/typegen.json @@ -1,7 +1,7 @@ { "outDir": "../src/types", - "specVersions": "https://moonbase.archive.subsquid.io/graphql", - "typesBundle": "moonbase", + "specVersions": "https://moonriver.archive.subsquid.io/graphql", + "typesBundle": "moonriver", "storage": [ "Instance1Collective.Members", "Instance1Collective.ProposalCount",