Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Substrate types with polkadot-stable2412 #6048

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions packages/api-augment/src/substrate/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,16 @@ declare module '@polkadot/api-base/types/consts' {
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per registered username. This value should change only in
* runtime upgrades with proper migration of existing deposits.
**/
usernameDeposit: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks that must pass to enable the permanent deletion of a username by
* its respective authority.
**/
usernameGracePeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
Expand Down Expand Up @@ -1238,6 +1248,13 @@ declare module '@polkadot/api-base/types/consts' {
};
revive: {
apiVersion: u16 & AugmentedConst<ApiType>;
/**
* The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID.
*
* This is a unique identifier assigned to each blockchain network,
* preventing replay attacks.
**/
chainId: u64 & AugmentedConst<ApiType>;
/**
* The percentage of the storage deposit that should be held for using a code hash.
* Instantiating a contract, or calling [`chain_extension::Ext::lock_delegate_dependency`]
Expand All @@ -1250,25 +1267,21 @@ declare module '@polkadot/api-base/types/consts' {
*
* # Note
*
* It is safe to chage this value on a live chain as all refunds are pro rata.
* It is safe to change this value on a live chain as all refunds are pro rata.
**/
depositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance a caller has to pay for each storage item.
*
* # Note
*
* It is safe to chage this value on a live chain as all refunds are pro rata.
* It is safe to change this value on a live chain as all refunds are pro rata.
**/
depositPerItem: u128 & AugmentedConst<ApiType>;
/**
* The maximum length of a contract code in bytes.
*
* This value hugely affects the memory requirements of this pallet since all the code of
* all contracts on the call stack will need to be held in memory. Setting of a correct
* value will be enforced in [`Pallet::integrity_test`].
* The ratio between the decimal representation of the native token and the ETH token.
**/
maxCodeLen: u32 & AugmentedConst<ApiType>;
nativeToEthRatio: u32 & AugmentedConst<ApiType>;
/**
* Make contract callable functions marked as `#[unstable]` available.
*
Expand Down Expand Up @@ -1672,6 +1685,9 @@ declare module '@polkadot/api-base/types/consts' {
**/
burn: Permill & AugmentedConst<ApiType>;
/**
* DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
* Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
*
* The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
Expand Down
82 changes: 65 additions & 17 deletions packages/api-augment/src/substrate/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ declare module '@polkadot/api-base/types/errors' {
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/**
* Proposal is still active.
**/
ProposalActive: AugmentedError<ApiType>;
/**
* Proposal must exist
**/
Expand Down Expand Up @@ -1017,6 +1021,10 @@ declare module '@polkadot/api-base/types/errors' {
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/**
* Proposal is still active.
**/
ProposalActive: AugmentedError<ApiType>;
/**
* Proposal must exist
**/
Expand Down Expand Up @@ -1378,6 +1386,10 @@ declare module '@polkadot/api-base/types/errors' {
* Account ID is already named.
**/
AlreadyClaimed: AugmentedError<ApiType>;
/**
* The username cannot be unbound because it is already unbinding.
**/
AlreadyUnbinding: AugmentedError<ApiType>;
/**
* Empty index.
**/
Expand All @@ -1386,6 +1398,11 @@ declare module '@polkadot/api-base/types/errors' {
* Fee is changed.
**/
FeeChanged: AugmentedError<ApiType>;
/**
* The action cannot be performed because of insufficient privileges (e.g. authority
* trying to unbind a username provided by the system).
**/
InsufficientPrivileges: AugmentedError<ApiType>;
/**
* The index is invalid.
**/
Expand Down Expand Up @@ -1450,6 +1467,10 @@ declare module '@polkadot/api-base/types/errors' {
* Sender is not a sub-account.
**/
NotSub: AugmentedError<ApiType>;
/**
* The username cannot be removed because it is not unbinding.
**/
NotUnbinding: AugmentedError<ApiType>;
/**
* The sender does not have permission to issue a username.
**/
Expand All @@ -1466,6 +1487,10 @@ declare module '@polkadot/api-base/types/errors' {
* Sticky judgement.
**/
StickyJudgement: AugmentedError<ApiType>;
/**
* The username cannot be removed because it's still in the grace period.
**/
TooEarly: AugmentedError<ApiType>;
/**
* Maximum amount of registrars reached. Cannot add any more.
**/
Expand Down Expand Up @@ -2538,6 +2563,28 @@ declare module '@polkadot/api-base/types/errors' {
[key: string]: AugmentedError<ApiType>;
};
revive: {
/**
* Tried to map an account that is already mapped.
**/
AccountAlreadyMapped: AugmentedError<ApiType>;
/**
* An `AccountID32` account tried to interact with the pallet without having a mapping.
*
* Call [`Pallet::map_account`] in order to create a mapping for the account.
**/
AccountUnmapped: AugmentedError<ApiType>;
/**
* Failed to convert a U256 to a Balance.
**/
BalanceConversionFailed: AugmentedError<ApiType>;
/**
* The program contains a basic block that is larger than allowed.
**/
BasicBlockTooLarge: AugmentedError<ApiType>;
/**
* The code blob supplied is larger than [`limits::code::BLOB_BYTES`].
**/
BlobTooLarge: AugmentedError<ApiType>;
/**
* Can not add a delegate dependency to the code hash of the contract itself.
**/
Expand All @@ -2561,11 +2608,6 @@ declare module '@polkadot/api-base/types/errors' {
* by supplying `-lruntime::revive=debug`.
**/
CodeRejected: AugmentedError<ApiType>;
/**
* The code supplied to `instantiate_with_code` exceeds the limit specified in the
* current schedule.
**/
CodeTooLarge: AugmentedError<ApiType>;
/**
* No contract was found at the specified address.
**/
Expand Down Expand Up @@ -2609,6 +2651,15 @@ declare module '@polkadot/api-base/types/errors' {
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
**/
InvalidCallFlags: AugmentedError<ApiType>;
/**
* Immutable data can only be set during deploys and only be read during calls.
* Additionally, it is only valid to set the data once and it must not be empty.
**/
InvalidImmutableAccess: AugmentedError<ApiType>;
/**
* The program contains an invalid instruction.
**/
InvalidInstruction: AugmentedError<ApiType>;
/**
* Invalid schedule supplied, e.g. with zero weight of a basic operation.
**/
Expand All @@ -2630,20 +2681,12 @@ declare module '@polkadot/api-base/types/errors' {
* The contract has reached its maximum number of delegate dependencies.
**/
MaxDelegateDependenciesReached: AugmentedError<ApiType>;
/**
* A pending migration needs to complete before the extrinsic can be called.
**/
MigrationInProgress: AugmentedError<ApiType>;
/**
* The chain does not provide a chain extension. Calling the chain extension results
* in this error. Note that this usually shouldn't happen as deploying such contracts
* is rejected.
**/
NoChainExtension: AugmentedError<ApiType>;
/**
* Migrate dispatch call was attempted but no migration was performed.
**/
NoMigrationPerformed: AugmentedError<ApiType>;
/**
* A buffer outside of sandbox memory was passed to a contract API function.
**/
Expand All @@ -2656,10 +2699,6 @@ declare module '@polkadot/api-base/types/errors' {
* Can not add more data to transient storage.
**/
OutOfTransientStorage: AugmentedError<ApiType>;
/**
* The output buffer supplied to a contract API call was too small.
**/
OutputBufferTooSmall: AugmentedError<ApiType>;
/**
* A contract called into the runtime which then called back into this pallet.
**/
Expand All @@ -2672,6 +2711,11 @@ declare module '@polkadot/api-base/types/errors' {
* A contract attempted to invoke a state modifying API while being in read-only mode.
**/
StateChangeDenied: AugmentedError<ApiType>;
/**
* The static memory consumption of the blob will be larger than
* [`limits::code::STATIC_MEMORY_BYTES`].
**/
StaticMemoryTooLarge: AugmentedError<ApiType>;
/**
* More storage was created than allowed by the storage deposit limit.
**/
Expand Down Expand Up @@ -3249,6 +3293,10 @@ declare module '@polkadot/api-base/types/errors' {
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/**
* Proposal is still active.
**/
ProposalActive: AugmentedError<ApiType>;
/**
* Proposal must exist
**/
Expand Down
Loading
Loading