Skip to content

Commit 995f176

Browse files
committed
chore: 🤖 add runtime apis to generated types - regenerated types from 7.2.0 node
1 parent ad557db commit 995f176

File tree

13 files changed

+2851
-1721
lines changed

13 files changed

+2851
-1721
lines changed

‎scripts/fetchDefinitions.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ function camelCaseParamNames(field) {
6868
}
6969

7070
function writeDefinitions(schemaObj) {
71-
const { types, rpc: rpcModules } = schemaObj;
71+
const { rpc: rpcModules } = schemaObj;
7272

7373
fs.writeFileSync(
7474
path.resolve(typesDir, 'definitions.ts'),
7575
`/* eslint-disable @typescript-eslint/naming-convention */\nexport default ${util.inspect(
76-
{ rpc: {}, types },
76+
{ ...schemaObj, rpc: {} },
7777
{
7878
compact: false,
7979
depth: null,

‎scripts/transactions.json‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@
286286
"pre_approve_asset": "pre_approve_asset",
287287
"remove_asset_pre_approval": "remove_asset_pre_approval",
288288
"link_ticker_to_asset_id": "link_ticker_to_asset_id",
289-
"unlink_ticker_from_asset_id": "unlink_ticker_from_asset_id"
289+
"unlink_ticker_from_asset_id": "unlink_ticker_from_asset_id",
290+
"update_global_metadata_spec": "update_global_metadata_spec"
290291
},
291292
"CapitalDistribution": {
292293
"distribute": "distribute",
@@ -321,7 +322,8 @@
321322
"link_ca_doc": "link_ca_doc",
322323
"remove_ca": "remove_ca",
323324
"change_record_date": "change_record_date",
324-
"initiate_corporate_action_and_distribute": "initiate_corporate_action_and_distribute"
325+
"initiate_corporate_action_and_distribute": "initiate_corporate_action_and_distribute",
326+
"initiate_corporate_action_and_ballot": "initiate_corporate_action_and_ballot"
325327
},
326328
"CorporateBallot": {
327329
"attach_ballot": "attach_ballot",
@@ -536,5 +538,8 @@
536538
"set_emergency_election_result": "set_emergency_election_result",
537539
"submit": "submit",
538540
"governance_fallback": "governance_fallback"
541+
},
542+
"TransactionPayment": {
543+
"set_disable_fees": "set_disable_fees"
539544
}
540545
}

‎src/generated/types.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ export enum AssetTx {
562562
RemoveAssetPreApproval = 'asset.removeAssetPreApproval',
563563
LinkTickerToAssetId = 'asset.linkTickerToAssetId',
564564
UnlinkTickerFromAssetId = 'asset.unlinkTickerFromAssetId',
565+
UpdateGlobalMetadataSpec = 'asset.updateGlobalMetadataSpec',
565566
}
566567

567568
export enum CapitalDistributionTx {
@@ -601,6 +602,7 @@ export enum CorporateActionTx {
601602
RemoveCa = 'corporateAction.removeCa',
602603
ChangeRecordDate = 'corporateAction.changeRecordDate',
603604
InitiateCorporateActionAndDistribute = 'corporateAction.initiateCorporateActionAndDistribute',
605+
InitiateCorporateActionAndBallot = 'corporateAction.initiateCorporateActionAndBallot',
604606
}
605607

606608
export enum CorporateBallotTx {
@@ -837,6 +839,10 @@ export enum ElectionProviderMultiPhaseTx {
837839
GovernanceFallback = 'electionProviderMultiPhase.governanceFallback',
838840
}
839841

842+
export enum TransactionPaymentTx {
843+
SetDisableFees = 'transactionPayment.setDisableFees',
844+
}
845+
840846
export enum ModuleName {
841847
System = 'system',
842848
Babe = 'babe',
@@ -884,6 +890,7 @@ export enum ModuleName {
884890
Nft = 'nft',
885891
StateTrieMigration = 'stateTrieMigration',
886892
ElectionProviderMultiPhase = 'electionProviderMultiPhase',
893+
TransactionPayment = 'transactionPayment',
887894
}
888895

889896
export type TxTag =
@@ -932,7 +939,8 @@ export type TxTag =
932939
| ContractsTx
933940
| NftTx
934941
| StateTrieMigrationTx
935-
| ElectionProviderMultiPhaseTx;
942+
| ElectionProviderMultiPhaseTx
943+
| TransactionPaymentTx;
936944

937945
// eslint-disable-next-line @typescript-eslint/naming-convention
938946
export const TxTags = {
@@ -982,4 +990,5 @@ export const TxTags = {
982990
nft: NftTx,
983991
stateTrieMigration: StateTrieMigrationTx,
984992
electionProviderMultiPhase: ElectionProviderMultiPhaseTx,
993+
transactionPayment: TransactionPaymentTx,
985994
};

‎src/polkadot/augment-api-consts.ts‎

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,29 @@ export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>
2323
declare module '@polkadot/api-base/types/consts' {
2424
interface AugmentedConsts<ApiType extends ApiTypes> {
2525
asset: {
26+
/**
27+
* Max length for the Asset Metadata type name.
28+
**/
2629
assetMetadataNameMaxLength: u32 & AugmentedConst<ApiType>;
30+
/**
31+
* Max length for the Asset Metadata type definition.
32+
**/
2733
assetMetadataTypeDefMaxLength: u32 & AugmentedConst<ApiType>;
34+
/**
35+
* Max length for the Asset Metadata value.
36+
**/
2837
assetMetadataValueMaxLength: u32 & AugmentedConst<ApiType>;
38+
/**
39+
* Max length for the name of an asset.
40+
**/
2941
assetNameMaxLength: u32 & AugmentedConst<ApiType>;
42+
/**
43+
* Max length of the funding round name.
44+
**/
3045
fundingRoundNameMaxLength: u32 & AugmentedConst<ApiType>;
46+
/**
47+
* Maximum number of mediators for an asset.
48+
**/
3149
maxAssetMediators: u32 & AugmentedConst<ApiType>;
3250
};
3351
babe: {
@@ -52,14 +70,24 @@ declare module '@polkadot/api-base/types/consts' {
5270
};
5371
balances: {
5472
/**
73+
* This type is no longer needed but kept for compatibility reasons.
5574
* The minimum amount required to keep an account open.
5675
**/
5776
existentialDeposit: u128 & AugmentedConst<ApiType>;
5877
};
5978
base: {
79+
/**
80+
* The maximum length governing `TooLong`.
81+
*
82+
* How lengths are computed to compare against this value is situation based.
83+
* For example, you could halve it, double it, compute a sum for some tree of strings, etc.
84+
**/
6085
maxLen: u32 & AugmentedConst<ApiType>;
6186
};
6287
complianceManager: {
88+
/**
89+
* The maximum claim reads that are allowed to happen in worst case of a condition resolution
90+
**/
6391
maxConditionComplexity: u32 & AugmentedConst<ApiType>;
6492
};
6593
contracts: {
@@ -142,7 +170,13 @@ declare module '@polkadot/api-base/types/consts' {
142170
unsafeUnstableInterface: bool & AugmentedConst<ApiType>;
143171
};
144172
corporateAction: {
173+
/**
174+
* Max number of per-DID withholding tax overrides.
175+
**/
145176
maxDidWhts: u32 & AugmentedConst<ApiType>;
177+
/**
178+
* Max number of DID specified in `TargetIdentities`.
179+
**/
146180
maxTargetIds: u32 & AugmentedConst<ApiType>;
147181
};
148182
electionProviderMultiPhase: {
@@ -250,7 +284,13 @@ declare module '@polkadot/api-base/types/consts' {
250284
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
251285
};
252286
identity: {
287+
/**
288+
* POLYX given to primary keys of all new Identities
289+
**/
253290
initialPOLYX: u128 & AugmentedConst<ApiType>;
291+
/**
292+
* Maximum number of authorizations an identity can give.
293+
**/
254294
maxGivenAuths: u32 & AugmentedConst<ApiType>;
255295
};
256296
imOnline: {
@@ -278,6 +318,22 @@ declare module '@polkadot/api-base/types/consts' {
278318
maxNumberOfCollectionKeys: u8 & AugmentedConst<ApiType>;
279319
maxNumberOfNFTsCount: u32 & AugmentedConst<ApiType>;
280320
};
321+
pips: {
322+
/**
323+
* The maximum number of votes that can be pruned at once.
324+
**/
325+
maxRefundsAndVotesPruned: u32 & AugmentedConst<ApiType>;
326+
};
327+
portfolio: {
328+
/**
329+
* Maximum number of fungible assets that can be moved in a single transfer call.
330+
**/
331+
maxNumberOfFungibleMoves: u32 & AugmentedConst<ApiType>;
332+
/**
333+
* Maximum number of NFTs that can be moved in a single transfer call.
334+
**/
335+
maxNumberOfNFTsMoves: u32 & AugmentedConst<ApiType>;
336+
};
281337
scheduler: {
282338
/**
283339
* The maximum weight that may be scheduled per block for any dispatchables.
@@ -289,11 +345,33 @@ declare module '@polkadot/api-base/types/consts' {
289345
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
290346
};
291347
settlement: {
348+
/**
349+
* Maximum number mediators in the instruction level (this does not include asset mediators).
350+
**/
351+
maxInstructionMediators: u32 & AugmentedConst<ApiType>;
352+
/**
353+
* Maximum number of fungible assets that can be in a single instruction.
354+
**/
292355
maxNumberOfFungibleAssets: u32 & AugmentedConst<ApiType>;
356+
/**
357+
* Maximum number of NFTs that can be transferred in a instruction.
358+
**/
293359
maxNumberOfNFTs: u32 & AugmentedConst<ApiType>;
360+
/**
361+
* Maximum number of NFTs that can be transferred in a leg.
362+
**/
294363
maxNumberOfNFTsPerLeg: u32 & AugmentedConst<ApiType>;
364+
/**
365+
* Maximum number of off-chain assets that can be transferred in a instruction.
366+
**/
295367
maxNumberOfOffChainAssets: u32 & AugmentedConst<ApiType>;
368+
/**
369+
* Maximum number of portfolios.
370+
**/
296371
maxNumberOfPortfolios: u32 & AugmentedConst<ApiType>;
372+
/**
373+
* Maximum number of venue signers.
374+
**/
297375
maxNumberOfVenueSigners: u32 & AugmentedConst<ApiType>;
298376
};
299377
staking: {
@@ -374,7 +452,13 @@ declare module '@polkadot/api-base/types/consts' {
374452
slashDeferDuration: u32 & AugmentedConst<ApiType>;
375453
};
376454
statistics: {
455+
/**
456+
* Maximum stats that can be enabled for an Asset.
457+
**/
377458
maxStatsPerAsset: u32 & AugmentedConst<ApiType>;
459+
/**
460+
* Maximum transfer conditions that can be enabled for an Asset.
461+
**/
378462
maxTransferConditionsPerAsset: u32 & AugmentedConst<ApiType>;
379463
};
380464
system: {
@@ -424,7 +508,7 @@ declare module '@polkadot/api-base/types/consts' {
424508
/**
425509
* The polynomial that is applied in order to derive fee from weight.
426510
**/
427-
weightToFee: Vec<SpWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
511+
weightToFeeConst: Vec<SpWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
428512
};
429513
utility: {
430514
/**

0 commit comments

Comments
 (0)