Skip to content

Commit

Permalink
Merge pull request #3489 from threefoldtech/development_chain2.9_types
Browse files Browse the repository at this point in the history
` chain 2.9 release` update chain types
  • Loading branch information
0oM4R authored Oct 20, 2024
2 parents d757d29 + 8491548 commit ca42e22
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 59 deletions.
1 change: 1 addition & 0 deletions packages/tfchain_client/chainMeta.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ declare module "@polkadot/api-base/types/consts" {
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ declare module "@polkadot/api-base/types/errors" {
* Account is not a member
**/
NotMember: AugmentedError<ApiType>;
/**
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/**
* Proposal must exist
**/
Expand Down Expand Up @@ -245,6 +249,7 @@ declare module "@polkadot/api-base/types/errors" {
CanOnlyIncreaseFrequency: AugmentedError<ApiType>;
ContractIsNotUnique: AugmentedError<ApiType>;
ContractNotExists: AugmentedError<ApiType>;
ContractPaymentStateNotExists: AugmentedError<ApiType>;
ContractWrongBillingLoopIndex: AugmentedError<ApiType>;
FailedToFreeIPs: AugmentedError<ApiType>;
FailedToReserveIP: AugmentedError<ApiType>;
Expand Down Expand Up @@ -274,6 +279,7 @@ declare module "@polkadot/api-base/types/errors" {
OffchainSignedTxCannotSign: AugmentedError<ApiType>;
OffchainSignedTxNoLocalAccountAvailable: AugmentedError<ApiType>;
PricingPolicyNotExists: AugmentedError<ApiType>;
RewardDistributionError: AugmentedError<ApiType>;
ServiceContractApprovalNotAllowed: AugmentedError<ApiType>;
ServiceContractBillingNotApprovedByBoth: AugmentedError<ApiType>;
ServiceContractBillingVariableAmountTooHigh: AugmentedError<ApiType>;
Expand Down
20 changes: 18 additions & 2 deletions packages/tfchain_client/src/interfaces/chain/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,22 +392,32 @@ declare module "@polkadot/api-base/types/events" {
* Deprecated event
**/
ContractDeployed: AugmentedEvent<ApiType, [u64, AccountId32]>;
ContractGracePeriodElapsed: AugmentedEvent<
ApiType,
[contractId: u64, gracePeriod: u64],
{ contractId: u64; gracePeriod: u64 }
>;
/**
* A Contract grace period was ended
* A Contract grace period was ended due to overdarfted being settled
**/
ContractGracePeriodEnded: AugmentedEvent<
ApiType,
[contractId: u64, nodeId: u32, twinId: u32],
{ contractId: u64; nodeId: u32; twinId: u32 }
>;
/**
* A Contract grace period is triggered
* A Contract grace period is triggered due to overdarfted
**/
ContractGracePeriodStarted: AugmentedEvent<
ApiType,
[contractId: u64, nodeId: u32, twinId: u32, blockNumber: u64],
{ contractId: u64; nodeId: u32; twinId: u32; blockNumber: u64 }
>;
ContractPaymentOverdrawn: AugmentedEvent<
ApiType,
[contractId: u64, timestamp: u64, partiallyBilledAmount: u128, overdraft: u128],
{ contractId: u64; timestamp: u64; partiallyBilledAmount: u128; overdraft: u128 }
>;
/**
* A contract was updated
**/
Expand Down Expand Up @@ -449,6 +459,12 @@ declare module "@polkadot/api-base/types/events" {
* a Rent contract is canceled
**/
RentContractCanceled: AugmentedEvent<ApiType, [contractId: u64], { contractId: u64 }>;
RentWaived: AugmentedEvent<ApiType, [contractId: u64], { contractId: u64 }>;
RewardDistributed: AugmentedEvent<
ApiType,
[contractId: u64, standardRewards: u128, additionalRewards: u128],
{ contractId: u64; standardRewards: u128; additionalRewards: u128 }
>;
/**
* A Service contract is approved
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import type {
PalletSmartContractContract,
PalletSmartContractContractBillingInformation,
PalletSmartContractContractLock,
PalletSmartContractContractPaymentState,
PalletSmartContractContractResources,
PalletSmartContractServiceContract,
PalletSmartContractSolutionProvider,
Expand Down Expand Up @@ -430,6 +431,12 @@ declare module "@polkadot/api-base/types/storage" {
[u64]
> &
QueryableStorageEntry<ApiType, [u64]>;
contractPaymentState: AugmentedQuery<
ApiType,
(arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletSmartContractContractPaymentState>>,
[u64]
> &
QueryableStorageEntry<ApiType, [u64]>;
contracts: AugmentedQuery<
ApiType,
(arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletSmartContractContract>>,
Expand Down
90 changes: 63 additions & 27 deletions packages/tfchain_client/src/interfaces/chain/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,24 @@ export default {
nodeId: "u32",
extraFee: "u64",
},
RentWaived: {
contractId: "u64",
},
ContractGracePeriodElapsed: {
contractId: "u64",
gracePeriod: "u64",
},
ContractPaymentOverdrawn: {
contractId: "u64",
timestamp: "u64",
partiallyBilledAmount: "u128",
overdraft: "u128",
},
RewardDistributed: {
contractId: "u64",
standardRewards: "u128",
additionalRewards: "u128",
},
},
},
/**
Expand Down Expand Up @@ -2352,10 +2370,21 @@ export default {
* Lookup265: pallet_smart_contract::types::StorageVersion
**/
PalletSmartContractStorageVersion: {
_enum: ["V1", "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10", "V11"],
_enum: ["V1", "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10", "V11", "V12"],
},
/**
* Lookup266: pallet_smart_contract::pallet::Error<T>
* Lookup266: pallet_smart_contract::types::ContractPaymentState<BalanceOf>
**/
PalletSmartContractContractPaymentState: {
standardReserve: "u128",
additionalReserve: "u128",
standardOverdraft: "u128",
additionalOverdraft: "u128",
lastUpdatedSeconds: "u64",
cycles: "u16",
},
/**
* Lookup267: pallet_smart_contract::pallet::Error<T>
**/
PalletSmartContractError: {
_enum: [
Expand Down Expand Up @@ -2411,16 +2440,18 @@ export default {
"WrongAuthority",
"UnauthorizedToChangeSolutionProviderId",
"UnauthorizedToSetExtraFee",
"RewardDistributionError",
"ContractPaymentStateNotExists",
],
},
/**
* Lookup267: pallet_tft_bridge::types::StorageVersion
* Lookup268: pallet_tft_bridge::types::StorageVersion
**/
PalletTftBridgeStorageVersion: {
_enum: ["V1", "V2"],
},
/**
* Lookup268: pallet_tft_bridge::pallet::Error<T>
* Lookup269: pallet_tft_bridge::pallet::Error<T>
**/
PalletTftBridgeError: {
_enum: [
Expand Down Expand Up @@ -2448,7 +2479,7 @@ export default {
],
},
/**
* Lookup270: pallet_tft_price::pallet::Error<T>
* Lookup271: pallet_tft_price::pallet::Error<T>
**/
PalletTftPriceError: {
_enum: [
Expand All @@ -2463,7 +2494,7 @@ export default {
],
},
/**
* Lookup272: pallet_burning::types::Burn<sp_core::crypto::AccountId32, BalanceOf, BlockNumber>
* Lookup273: pallet_burning::types::Burn<sp_core::crypto::AccountId32, BalanceOf, BlockNumber>
**/
PalletBurningBurn: {
target: "AccountId32",
Expand All @@ -2472,19 +2503,19 @@ export default {
message: "Bytes",
},
/**
* Lookup273: pallet_burning::pallet::Error<T>
* Lookup274: pallet_burning::pallet::Error<T>
**/
PalletBurningError: {
_enum: ["NotEnoughBalanceToBurn"],
},
/**
* Lookup275: pallet_kvstore::pallet::Error<T>
* Lookup276: pallet_kvstore::pallet::Error<T>
**/
PalletKvstoreError: {
_enum: ["NoValueStored", "KeyIsTooLarge", "ValueIsTooLarge"],
},
/**
* Lookup277: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
* Lookup278: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
**/
PalletCollectiveVotes: {
index: "u32",
Expand All @@ -2494,7 +2525,7 @@ export default {
end: "u32",
},
/**
* Lookup278: pallet_collective::pallet::Error<T, I>
* Lookup279: pallet_collective::pallet::Error<T, I>
**/
PalletCollectiveError: {
_enum: [
Expand All @@ -2508,24 +2539,25 @@ export default {
"TooManyProposals",
"WrongProposalWeight",
"WrongProposalLength",
"PrimeAccountNotMember",
],
},
/**
* Lookup280: pallet_membership::pallet::Error<T, I>
* Lookup281: pallet_membership::pallet::Error<T, I>
**/
PalletMembershipError: {
_enum: ["AlreadyMember", "NotMember", "TooManyMembers"],
},
/**
* Lookup281: pallet_dao::proposal::DaoProposal
* Lookup282: pallet_dao::proposal::DaoProposal
**/
PalletDaoProposalDaoProposal: {
index: "u32",
description: "Bytes",
link: "Bytes",
},
/**
* Lookup282: pallet_dao::proposal::DaoVotes<BlockNumber, sp_core::crypto::AccountId32>
* Lookup283: pallet_dao::proposal::DaoVotes<BlockNumber, sp_core::crypto::AccountId32>
**/
PalletDaoProposalDaoVotes: {
index: "u32",
Expand All @@ -2536,14 +2568,14 @@ export default {
vetos: "Vec<AccountId32>",
},
/**
* Lookup284: pallet_dao::proposal::VoteWeight
* Lookup285: pallet_dao::proposal::VoteWeight
**/
PalletDaoProposalVoteWeight: {
farmId: "u32",
weight: "u64",
},
/**
* Lookup285: pallet_dao::pallet::Error<T>
* Lookup286: pallet_dao::pallet::Error<T>
**/
PalletDaoError: {
_enum: [
Expand All @@ -2568,7 +2600,7 @@ export default {
],
},
/**
* Lookup286: pallet_validator::pallet::Error<T>
* Lookup287: pallet_validator::pallet::Error<T>
**/
PalletValidatorError: {
_enum: [
Expand All @@ -2587,7 +2619,7 @@ export default {
],
},
/**
* Lookup288: sp_runtime::MultiSignature
* Lookup289: sp_runtime::MultiSignature
**/
SpRuntimeMultiSignature: {
_enum: {
Expand All @@ -2597,43 +2629,47 @@ export default {
},
},
/**
* Lookup289: sp_core::sr25519::Signature
* Lookup290: sp_core::sr25519::Signature
**/
SpCoreSr25519Signature: "[u8;64]",
/**
* Lookup290: sp_core::ecdsa::Signature
* Lookup291: sp_core::ecdsa::Signature
**/
SpCoreEcdsaSignature: "[u8;65]",
/**
* Lookup293: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<T>
* Lookup294: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<T>
**/
FrameSystemExtensionsCheckNonZeroSender: "Null",
/**
* Lookup294: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
* Lookup295: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
**/
FrameSystemExtensionsCheckSpecVersion: "Null",
/**
* Lookup295: frame_system::extensions::check_tx_version::CheckTxVersion<T>
* Lookup296: frame_system::extensions::check_tx_version::CheckTxVersion<T>
**/
FrameSystemExtensionsCheckTxVersion: "Null",
/**
* Lookup296: frame_system::extensions::check_genesis::CheckGenesis<T>
* Lookup297: frame_system::extensions::check_genesis::CheckGenesis<T>
**/
FrameSystemExtensionsCheckGenesis: "Null",
/**
* Lookup299: frame_system::extensions::check_nonce::CheckNonce<T>
* Lookup300: frame_system::extensions::check_nonce::CheckNonce<T>
**/
FrameSystemExtensionsCheckNonce: "Compact<u32>",
/**
* Lookup300: frame_system::extensions::check_weight::CheckWeight<T>
* Lookup301: frame_system::extensions::check_weight::CheckWeight<T>
**/
FrameSystemExtensionsCheckWeight: "Null",
/**
* Lookup301: pallet_transaction_payment::ChargeTransactionPayment<T>
* Lookup302: pallet_transaction_payment::ChargeTransactionPayment<T>
**/
PalletTransactionPaymentChargeTransactionPayment: "Compact<u128>",
/**
* Lookup302: tfchain_runtime::Runtime
* Lookup303: pallet_smart_contract::types::ContractIdProvides<tfchain_runtime::Runtime>
**/
PalletSmartContractContractIdProvides: "Null",
/**
* Lookup304: tfchain_runtime::Runtime
**/
TfchainRuntimeRuntime: "Null",
};
4 changes: 4 additions & 0 deletions packages/tfchain_client/src/interfaces/chain/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ import type {
PalletSmartContractContractBill,
PalletSmartContractContractBillingInformation,
PalletSmartContractContractData,
PalletSmartContractContractIdProvides,
PalletSmartContractContractLock,
PalletSmartContractContractPaymentState,
PalletSmartContractContractResources,
PalletSmartContractContractState,
PalletSmartContractDiscountLevel,
Expand Down Expand Up @@ -263,7 +265,9 @@ declare module "@polkadot/types/types/registry" {
PalletSmartContractContractBill: PalletSmartContractContractBill;
PalletSmartContractContractBillingInformation: PalletSmartContractContractBillingInformation;
PalletSmartContractContractData: PalletSmartContractContractData;
PalletSmartContractContractIdProvides: PalletSmartContractContractIdProvides;
PalletSmartContractContractLock: PalletSmartContractContractLock;
PalletSmartContractContractPaymentState: PalletSmartContractContractPaymentState;
PalletSmartContractContractResources: PalletSmartContractContractResources;
PalletSmartContractContractState: PalletSmartContractContractState;
PalletSmartContractDiscountLevel: PalletSmartContractDiscountLevel;
Expand Down
Loading

0 comments on commit ca42e22

Please sign in to comment.