diff --git a/CHANGELOG.md b/CHANGELOG.md index fc6958a60e..1a8ec40194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Changes: +- Extend support for `WrapperKeepOpaque` with internal decoding (allowed to fail) - Adjust max-entries in historic provider LRU - Update `@polkadot/util` to 8.3.1 - Update package paths under ESM diff --git a/packages/api-augment/src/kusama/query.ts b/packages/api-augment/src/kusama/query.ts index 5e6287d6f7..cc61ee77cd 100644 --- a/packages/api-augment/src/kusama/query.ts +++ b/packages/api-augment/src/kusama/query.ts @@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1SessionInfo, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; +import type { FrameSupportMiscWrapperKeepOpaque, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1SessionInfo, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { Observable } from '@polkadot/types/types'; declare module '@polkadot/api-base/types/storage' { @@ -765,7 +765,7 @@ declare module '@polkadot/api-base/types/storage' { [key: string]: QueryableStorageEntry; }; multisig: { - calls: AugmentedQuery Observable>>, [U8aFixed]> & QueryableStorageEntry; + calls: AugmentedQuery Observable>>, [U8aFixed]> & QueryableStorageEntry; /** * The set of open multisig operations. **/ diff --git a/packages/api-augment/src/kusama/tx.ts b/packages/api-augment/src/kusama/tx.ts index 526a0918be..f20511d6aa 100644 --- a/packages/api-augment/src/kusama/tx.ts +++ b/packages/api-augment/src/kusama/tx.ts @@ -7,7 +7,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV1PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; +import type { FrameSupportMiscWrapperKeepOpaque, FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV1PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; declare module '@polkadot/api-base/types/submittable' { export interface AugmentedSubmittables { @@ -1896,7 +1896,7 @@ declare module '@polkadot/api-base/types/submittable' { * - Plus Call Weight * # **/ - asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option | null | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u16, Vec, Option, Bytes, bool, u64]>; + asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option | null | object | string | Uint8Array, call: FrameSupportMiscWrapperKeepOpaque | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u16, Vec, Option, FrameSupportMiscWrapperKeepOpaque, bool, u64]>; /** * Immediately dispatch a multi-signature call using a single approval from the caller. * diff --git a/packages/api-augment/src/polkadot/query.ts b/packages/api-augment/src/polkadot/query.ts index 190596f997..cb389f378a 100644 --- a/packages/api-augment/src/polkadot/query.ts +++ b/packages/api-augment/src/polkadot/query.ts @@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1SessionInfo, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; +import type { FrameSupportMiscWrapperKeepOpaque, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1SessionInfo, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { Observable } from '@polkadot/types/types'; declare module '@polkadot/api-base/types/storage' { @@ -739,7 +739,7 @@ declare module '@polkadot/api-base/types/storage' { [key: string]: QueryableStorageEntry; }; multisig: { - calls: AugmentedQuery Observable>>, [U8aFixed]> & QueryableStorageEntry; + calls: AugmentedQuery Observable>>, [U8aFixed]> & QueryableStorageEntry; /** * The set of open multisig operations. **/ diff --git a/packages/api-augment/src/polkadot/tx.ts b/packages/api-augment/src/polkadot/tx.ts index 0df8bb493c..5163489f15 100644 --- a/packages/api-augment/src/polkadot/tx.ts +++ b/packages/api-augment/src/polkadot/tx.ts @@ -7,7 +7,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV1PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; +import type { FrameSupportMiscWrapperKeepOpaque, FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV1PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; declare module '@polkadot/api-base/types/submittable' { export interface AugmentedSubmittables { @@ -1845,7 +1845,7 @@ declare module '@polkadot/api-base/types/submittable' { * - Plus Call Weight * # **/ - asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option | null | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u16, Vec, Option, Bytes, bool, u64]>; + asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option | null | object | string | Uint8Array, call: FrameSupportMiscWrapperKeepOpaque | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u16, Vec, Option, FrameSupportMiscWrapperKeepOpaque, bool, u64]>; /** * Immediately dispatch a multi-signature call using a single approval from the caller. * diff --git a/packages/api-augment/src/substrate/query.ts b/packages/api-augment/src/substrate/query.ts index 1d58b6d054..7374addb35 100644 --- a/packages/api-augment/src/substrate/query.ts +++ b/packages/api-augment/src/substrate/query.ts @@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types'; import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup'; +import type { FrameSupportMiscWrapperKeepOpaque, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup'; import type { Observable } from '@polkadot/types/types'; declare module '@polkadot/api-base/types/storage' { @@ -723,7 +723,7 @@ declare module '@polkadot/api-base/types/storage' { [key: string]: QueryableStorageEntry; }; multisig: { - calls: AugmentedQuery Observable>>, [U8aFixed]> & QueryableStorageEntry; + calls: AugmentedQuery Observable>>, [U8aFixed]> & QueryableStorageEntry; /** * The set of open multisig operations. **/ diff --git a/packages/api-augment/src/substrate/tx.ts b/packages/api-augment/src/substrate/tx.ts index e2054d3d1a..37ea382f10 100644 --- a/packages/api-augment/src/substrate/tx.ts +++ b/packages/api-augment/src/substrate/tx.ts @@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types'; import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup'; +import type { FrameSupportMiscWrapperKeepOpaque, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup'; declare module '@polkadot/api-base/types/submittable' { export interface AugmentedSubmittables { @@ -2266,7 +2266,7 @@ declare module '@polkadot/api-base/types/submittable' { * - Plus Call Weight * # **/ - asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option | null | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u16, Vec, Option, Bytes, bool, u64]>; + asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option | null | object | string | Uint8Array, call: FrameSupportMiscWrapperKeepOpaque | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u16, Vec, Option, FrameSupportMiscWrapperKeepOpaque, bool, u64]>; /** * Immediately dispatch a multi-signature call using a single approval from the caller. * diff --git a/packages/typegen/src/generate/tsDef.ts b/packages/typegen/src/generate/tsDef.ts index 1ac3aa83a7..dc8d35872a 100644 --- a/packages/typegen/src/generate/tsDef.ts +++ b/packages/typegen/src/generate/tsDef.ts @@ -50,6 +50,7 @@ const tsHashMap = tsExport; const tsOption = tsExport; const tsPlain = tsExport; const tsTuple = tsExport; +const tsWrapperKeepOpaque = tsExport; const tsWrapperOpaque = tsExport; /** @internal */ @@ -78,6 +79,7 @@ function tsEnum (registry: Registry, definitions: Record, { case TypeDefInfo.Vec: case TypeDefInfo.Option: case TypeDefInfo.VecFixed: + case TypeDefInfo.WrapperKeepOpaque: case TypeDefInfo.WrapperOpaque: return `${isGetter}${asGetter}`; @@ -123,6 +125,7 @@ function tsResultGetter (registry: Registry, definitions: Record, imports: TypeImports, withShortcut: boolean) => { + return singleParamNotation(registry, 'WrapperKeepOpaque', typeDef, definitions, imports, withShortcut); + }, + [TypeDefInfo.WrapperOpaque]: (registry: CodecRegistry, typeDef: TypeDef, definitions: Record, imports: TypeImports, withShortcut: boolean) => { return singleParamNotation(registry, 'WrapperOpaque', typeDef, definitions, imports, withShortcut); } diff --git a/packages/types-augment/src/lookup/substrate.ts b/packages/types-augment/src/lookup/substrate.ts index c97e42c81b..e74795227d 100644 --- a/packages/types-augment/src/lookup/substrate.ts +++ b/packages/types-augment/src/lookup/substrate.ts @@ -2495,7 +2495,7 @@ export default { threshold: 'u16', otherSignatories: 'Vec', maybeTimepoint: 'Option', - call: 'Bytes', + call: 'FrameSupportMiscWrapperKeepOpaque', storeCall: 'bool', maxWeight: 'u64', }, @@ -2514,6 +2514,10 @@ export default { } } }, + /** + * Lookup295: frame_support::traits::misc::WrapperKeepOpaque + **/ + FrameSupportMiscWrapperKeepOpaque: 'WrapperKeepOpaque', /** * Lookup296: pallet_bounties::pallet::Call **/ diff --git a/packages/types-augment/src/lookup/types-substrate.ts b/packages/types-augment/src/lookup/types-substrate.ts index cea89646cf..4322a2de71 100644 --- a/packages/types-augment/src/lookup/types-substrate.ts +++ b/packages/types-augment/src/lookup/types-substrate.ts @@ -3,7 +3,7 @@ declare module '@polkadot/types/lookup' { import type { Data } from '@polkadot/types'; - import type { BTreeMap, Bytes, Compact, Enum, Null, Option, Result, Set, Struct, Text, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; + import type { BTreeMap, Bytes, Compact, Enum, Null, Option, Result, Set, Struct, Text, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; import type { Vote } from '@polkadot/types/interfaces/elections'; import type { AccountId32, Call, H256, MultiAddress, PerU16, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime'; @@ -2695,7 +2695,7 @@ declare module '@polkadot/types/lookup' { readonly threshold: u16; readonly otherSignatories: Vec; readonly maybeTimepoint: Option; - readonly call: Bytes; + readonly call: FrameSupportMiscWrapperKeepOpaque; readonly storeCall: bool; readonly maxWeight: u64; } & Struct; @@ -2717,6 +2717,9 @@ declare module '@polkadot/types/lookup' { readonly type: 'AsMultiThreshold1' | 'AsMulti' | 'ApproveAsMulti' | 'CancelAsMulti'; } + /** @name FrameSupportMiscWrapperKeepOpaque (295) */ + export interface FrameSupportMiscWrapperKeepOpaque extends WrapperKeepOpaque {} + /** @name PalletBountiesCall (296) */ export interface PalletBountiesCall extends Enum { readonly isProposeBounty: boolean; diff --git a/packages/types-codec/src/base/Compact.spec.ts b/packages/types-codec/src/base/Compact.spec.ts index 18e44d0cdf..3010f30361 100644 --- a/packages/types-codec/src/base/Compact.spec.ts +++ b/packages/types-codec/src/base/Compact.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/DoNotConstruct.spec.ts b/packages/types-codec/src/base/DoNotConstruct.spec.ts index d08c7af4b1..622c4c1a94 100644 --- a/packages/types-codec/src/base/DoNotConstruct.spec.ts +++ b/packages/types-codec/src/base/DoNotConstruct.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/Enum.spec.ts b/packages/types-codec/src/base/Enum.spec.ts index 741bd363fa..548a0ea50b 100644 --- a/packages/types-codec/src/base/Enum.spec.ts +++ b/packages/types-codec/src/base/Enum.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecRegistry } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/base/Int.spec.ts b/packages/types-codec/src/base/Int.spec.ts index fb4181ae4b..cae3213afa 100644 --- a/packages/types-codec/src/base/Int.spec.ts +++ b/packages/types-codec/src/base/Int.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/Null.spec.ts b/packages/types-codec/src/base/Null.spec.ts index ceba149dcc..ab334dab42 100644 --- a/packages/types-codec/src/base/Null.spec.ts +++ b/packages/types-codec/src/base/Null.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/Option.spec.ts b/packages/types-codec/src/base/Option.spec.ts index 2d7aff8672..24d15bf1d9 100644 --- a/packages/types-codec/src/base/Option.spec.ts +++ b/packages/types-codec/src/base/Option.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/Result.spec.ts b/packages/types-codec/src/base/Result.spec.ts index 5afafcfab4..7a25127ef3 100644 --- a/packages/types-codec/src/base/Result.spec.ts +++ b/packages/types-codec/src/base/Result.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/Tuple.spec.ts b/packages/types-codec/src/base/Tuple.spec.ts index 5f9d44e28c..4203b6d9b1 100644 --- a/packages/types-codec/src/base/Tuple.spec.ts +++ b/packages/types-codec/src/base/Tuple.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { BlockNumber, VoteThreshold } from '@polkadot/types/interfaces'; diff --git a/packages/types-codec/src/base/UInt.spec.ts b/packages/types-codec/src/base/UInt.spec.ts index df9e079e26..108e600cbe 100644 --- a/packages/types-codec/src/base/UInt.spec.ts +++ b/packages/types-codec/src/base/UInt.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/base/Vec.spec.ts b/packages/types-codec/src/base/Vec.spec.ts index c8dcd41235..20caa70d00 100644 --- a/packages/types-codec/src/base/Vec.spec.ts +++ b/packages/types-codec/src/base/Vec.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { PropIndex } from '@polkadot/types/interfaces/democracy'; diff --git a/packages/types-codec/src/base/VecFixed.spec.ts b/packages/types-codec/src/base/VecFixed.spec.ts index 1b5eff06d5..d995c210cd 100644 --- a/packages/types-codec/src/base/VecFixed.spec.ts +++ b/packages/types-codec/src/base/VecFixed.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/checkTypes.manual.ts b/packages/types-codec/src/checkTypes.manual.ts index efb800a986..394eb7115a 100644 --- a/packages/types-codec/src/checkTypes.manual.ts +++ b/packages/types-codec/src/checkTypes.manual.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import '@polkadot/types-augment'; diff --git a/packages/types-codec/src/extended/BTreeMap.spec.ts b/packages/types-codec/src/extended/BTreeMap.spec.ts index 7b2c96b747..f2c8e38c2e 100644 --- a/packages/types-codec/src/extended/BTreeMap.spec.ts +++ b/packages/types-codec/src/extended/BTreeMap.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecClass, ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/extended/BTreeSet.spec.ts b/packages/types-codec/src/extended/BTreeSet.spec.ts index bcb0fbf625..507f745141 100644 --- a/packages/types-codec/src/extended/BTreeSet.spec.ts +++ b/packages/types-codec/src/extended/BTreeSet.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecClass, CodecTo } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/extended/BitVec.spec.ts b/packages/types-codec/src/extended/BitVec.spec.ts index c1f9743346..2d359de211 100644 --- a/packages/types-codec/src/extended/BitVec.spec.ts +++ b/packages/types-codec/src/extended/BitVec.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/Bytes.spec.ts b/packages/types-codec/src/extended/Bytes.spec.ts index 2c792c2e93..e481b13b20 100644 --- a/packages/types-codec/src/extended/Bytes.spec.ts +++ b/packages/types-codec/src/extended/Bytes.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/HashMap.spec.ts b/packages/types-codec/src/extended/HashMap.spec.ts index 9bf1bfa0db..b1a0a151ee 100644 --- a/packages/types-codec/src/extended/HashMap.spec.ts +++ b/packages/types-codec/src/extended/HashMap.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/Linkage.spec.ts b/packages/types-codec/src/extended/Linkage.spec.ts index 77ad4c8356..183d30ccf5 100644 --- a/packages/types-codec/src/extended/Linkage.spec.ts +++ b/packages/types-codec/src/extended/Linkage.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/Map.spec.ts b/packages/types-codec/src/extended/Map.spec.ts index ab6cddff13..3e7a79cdc9 100644 --- a/packages/types-codec/src/extended/Map.spec.ts +++ b/packages/types-codec/src/extended/Map.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecTo } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/extended/Range.spec.ts b/packages/types-codec/src/extended/Range.spec.ts index 27226e0d58..8a64269287 100644 --- a/packages/types-codec/src/extended/Range.spec.ts +++ b/packages/types-codec/src/extended/Range.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/Type.spec.ts b/packages/types-codec/src/extended/Type.spec.ts index b4c5259b13..ac313dbfb1 100644 --- a/packages/types-codec/src/extended/Type.spec.ts +++ b/packages/types-codec/src/extended/Type.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/Type.ts b/packages/types-codec/src/extended/Type.ts index ba95cf558a..1322f7b2e6 100644 --- a/packages/types-codec/src/extended/Type.ts +++ b/packages/types-codec/src/extended/Type.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecRegistry } from '../types'; diff --git a/packages/types-codec/src/extended/U8aFixed.spec.ts b/packages/types-codec/src/extended/U8aFixed.spec.ts index bc863376d9..9e217dc6f9 100644 --- a/packages/types-codec/src/extended/U8aFixed.spec.ts +++ b/packages/types-codec/src/extended/U8aFixed.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/WrapperKeepOpaque.spec.ts b/packages/types-codec/src/extended/WrapperKeepOpaque.spec.ts new file mode 100644 index 0000000000..50510c67fa --- /dev/null +++ b/packages/types-codec/src/extended/WrapperKeepOpaque.spec.ts @@ -0,0 +1,52 @@ +// Copyright 2017-2022 @polkadot/types-codec authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import { TypeRegistry } from '@polkadot/types'; +import { Bytes, Raw, u32, WrapperKeepOpaque } from '@polkadot/types-codec'; + +describe('WrapperKeepOpaque', (): void => { + const registry = new TypeRegistry(); + const u8au32 = new Uint8Array([4 << 2, 135, 214, 18, 0]); + const ClazzUSize = WrapperKeepOpaque.with('usize'); + const ClazzU32 = WrapperKeepOpaque.with(u32); + + it('has handles non-decodable values', (): void => { + const usize = new ClazzUSize(registry, u8au32); + + expect(usize.isDecoded).toEqual(false); + expect(() => usize.unwrap()).toThrow(/undecodable value/); + + expect(usize.toHex()).toEqual('0x87d61200'); + expect(usize.toHuman()).toEqual('0x87d61200'); + expect(usize.toJSON()).toEqual('0x87d61200'); + expect(usize.toRawType()).toEqual('WrapperKeepOpaque'); + expect(usize.toString()).toEqual('0x87d61200'); + expect(usize.toU8a()).toEqual(u8au32); + }); + + it('has handles decodable values', (): void => { + const u32 = new ClazzU32(registry, u8au32); + + expect(u32.isDecoded).toEqual(true); + expect(u32.unwrap().toNumber()).toEqual(1234567); + + expect(u32.toHex()).toEqual('0x87d61200'); + expect(u32.toHuman()).toEqual('1,234,567'); + expect(u32.toJSON()).toEqual('0x87d61200'); + expect(u32.toRawType()).toEqual('WrapperKeepOpaque'); + expect(u32.toString()).toEqual('1234567'); + expect(u32.toU8a()).toEqual(u8au32); + }); + + it('handles values from Raw', (): void => { + const u32 = new ClazzU32(registry, new Raw(registry, u8au32.slice(1))); + + expect(u32.unwrap().toNumber()).toEqual(1234567); + }); + + it('handles values from Bytes', (): void => { + const u32 = new ClazzU32(registry, new Bytes(registry, u8au32)); + + expect(u32.unwrap().toNumber()).toEqual(1234567); + }); +}); diff --git a/packages/types-codec/src/extended/WrapperKeepOpaque.ts b/packages/types-codec/src/extended/WrapperKeepOpaque.ts new file mode 100644 index 0000000000..a14fa69f44 --- /dev/null +++ b/packages/types-codec/src/extended/WrapperKeepOpaque.ts @@ -0,0 +1,92 @@ +// Copyright 2017-2022 @polkadot/types-codec authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { AnyJson, AnyU8a, Codec, CodecClass, CodecRegistry } from '../types'; + +import { assertReturn, compactStripLength, isHex, isU8a } from '@polkadot/util'; + +import { Raw } from '../native/Raw'; +import { typeToConstructor } from '../utils'; +import { Bytes } from './Bytes'; + +function decodeRaw (registry: CodecRegistry, typeName: CodecClass | string, value?: AnyU8a | Codec): [CodecClass, T | null, AnyU8a] { + const Type = typeToConstructor(registry, typeName); + + if (isU8a(value) || isHex(value)) { + try { + const [, u8a] = isHex(value) || (value instanceof Raw) + ? [0, value] + : compactStripLength(value); + + return [Type, new Type(registry, u8a), value]; + } catch { + return [Type, null, value]; + } + } + + const instance = new Type(registry, value); + + return [Type, instance, instance.toHex()]; +} + +export class WrapperKeepOpaque extends Bytes { + readonly #Type: CodecClass; + + readonly #decoded: T | null; + + constructor (registry: CodecRegistry, typeName: CodecClass | string, value?: AnyU8a | Codec) { + const [Type, decoded, u8a] = decodeRaw(registry, typeName, value); + + super(registry, u8a); + + this.#Type = Type; + this.#decoded = decoded; + } + + public static with (Type: CodecClass | string): CodecClass> { + return class extends WrapperKeepOpaque { + constructor (registry: CodecRegistry, value?: AnyU8a | T) { + super(registry, Type, value); + } + }; + } + + /** + * @description Checks if the wrapper is decodable + */ + public get isDecoded (): boolean { + return !!this.#decoded; + } + + /** + * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information + */ + public override toHuman (isExtended?: boolean): AnyJson { + return this.#decoded + ? this.#decoded.toHuman(isExtended) + : super.toHuman(); + } + + /** + * @description Returns the base runtime type name for this instance + */ + public override toRawType (): string { + return `WrapperKeepOpaque<${this.registry.getClassName(this.#Type) || (this.#decoded ? this.#decoded.toRawType() : new this.#Type(this.registry).toRawType())}>`; + } + + /** + * @description Converts the Object to to a string (either decoded or bytes) + */ + public override toString (): string { + return this.#decoded + ? this.#decoded.toString() + : super.toString(); + } + + /** + * @description Returns the decoded that the WrapperKeepOpaque represents (if available), throws if non-decodable + */ + public unwrap (): T { + return assertReturn(this.#decoded, 'WrapperKeepOpaque: unwrapping an undecodable value'); + } +} diff --git a/packages/types-codec/src/extended/WrapperOpaque.spec.ts b/packages/types-codec/src/extended/WrapperOpaque.spec.ts index 9a38625200..8207e8ad59 100644 --- a/packages/types-codec/src/extended/WrapperOpaque.spec.ts +++ b/packages/types-codec/src/extended/WrapperOpaque.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { TypeRegistry } from '@polkadot/types'; diff --git a/packages/types-codec/src/extended/index.ts b/packages/types-codec/src/extended/index.ts index 35b0bab710..7005aea1d4 100644 --- a/packages/types-codec/src/extended/index.ts +++ b/packages/types-codec/src/extended/index.ts @@ -11,4 +11,5 @@ export { CodecMap, CodecMap as Map } from './Map'; export { Range, RangeInclusive } from './Range'; export { Type } from './Type'; export { U8aFixed } from './U8aFixed'; +export { WrapperKeepOpaque } from './WrapperKeepOpaque'; export { WrapperOpaque } from './WrapperOpaque'; diff --git a/packages/types-codec/src/native/Bool.spec.ts b/packages/types-codec/src/native/Bool.spec.ts index 030dcebf64..a2f8f31556 100644 --- a/packages/types-codec/src/native/Bool.spec.ts +++ b/packages/types-codec/src/native/Bool.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecTo } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/native/Date.spec.ts b/packages/types-codec/src/native/Date.spec.ts index 7715ef29d9..64760f82f2 100644 --- a/packages/types-codec/src/native/Date.spec.ts +++ b/packages/types-codec/src/native/Date.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecTo } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/native/Raw.spec.ts b/packages/types-codec/src/native/Raw.spec.ts index 15d2e4c7db..b13278a8e9 100644 --- a/packages/types-codec/src/native/Raw.spec.ts +++ b/packages/types-codec/src/native/Raw.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { AnyU8a, CodecTo } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/native/Set.spec.ts b/packages/types-codec/src/native/Set.spec.ts index 10b9173e1d..00f87f38f0 100644 --- a/packages/types-codec/src/native/Set.spec.ts +++ b/packages/types-codec/src/native/Set.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 /* eslint-disable sort-keys */ diff --git a/packages/types-codec/src/native/Struct.data.ts b/packages/types-codec/src/native/Struct.data.ts index 623d353518..f1053e735b 100644 --- a/packages/types-codec/src/native/Struct.data.ts +++ b/packages/types-codec/src/native/Struct.data.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 export const TEST_A = '0x0000000000048670f76b10bd81bf93b0b420ad46c209d1183202abcdfce1b0e13108ccf4020000000000000000000000000000000000000000000000000000000000000000000088b116afe3b5020000000000000001000000000000000000000000000000420d0300030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060203040506020304050602030405060202'; diff --git a/packages/types-codec/src/native/Struct.spec.ts b/packages/types-codec/src/native/Struct.spec.ts index ac7cd7b7bd..780e89779e 100644 --- a/packages/types-codec/src/native/Struct.spec.ts +++ b/packages/types-codec/src/native/Struct.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 /* eslint-disable sort-keys */ diff --git a/packages/types-codec/src/native/Text.spec.ts b/packages/types-codec/src/native/Text.spec.ts index b1c84d1d8e..9ba5f6be3d 100644 --- a/packages/types-codec/src/native/Text.spec.ts +++ b/packages/types-codec/src/native/Text.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecTo } from '@polkadot/types-codec/types'; diff --git a/packages/types-codec/src/primitive/I128.ts b/packages/types-codec/src/primitive/I128.ts index 43e09061bc..8e593ab924 100644 --- a/packages/types-codec/src/primitive/I128.ts +++ b/packages/types-codec/src/primitive/I128.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Int } from '../base/Int'; diff --git a/packages/types-codec/src/primitive/I16.ts b/packages/types-codec/src/primitive/I16.ts index 3f12e68b14..924440780b 100644 --- a/packages/types-codec/src/primitive/I16.ts +++ b/packages/types-codec/src/primitive/I16.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Int } from '../base/Int'; diff --git a/packages/types-codec/src/primitive/I256.ts b/packages/types-codec/src/primitive/I256.ts index 9cbcbeffd4..bb6999ba49 100644 --- a/packages/types-codec/src/primitive/I256.ts +++ b/packages/types-codec/src/primitive/I256.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Int } from '../base/Int'; diff --git a/packages/types-codec/src/primitive/I32.ts b/packages/types-codec/src/primitive/I32.ts index 3cd6df94db..c479f8616d 100644 --- a/packages/types-codec/src/primitive/I32.ts +++ b/packages/types-codec/src/primitive/I32.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Int } from '../base/Int'; diff --git a/packages/types-codec/src/primitive/I64.ts b/packages/types-codec/src/primitive/I64.ts index 921a664621..bb97c22ffe 100644 --- a/packages/types-codec/src/primitive/I64.ts +++ b/packages/types-codec/src/primitive/I64.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Int } from '../base/Int'; diff --git a/packages/types-codec/src/primitive/I8.ts b/packages/types-codec/src/primitive/I8.ts index 22c611a74a..fce9649d79 100644 --- a/packages/types-codec/src/primitive/I8.ts +++ b/packages/types-codec/src/primitive/I8.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Int } from '../base/Int'; diff --git a/packages/types-codec/src/primitive/U128.ts b/packages/types-codec/src/primitive/U128.ts index 9845b8f43a..bee7057b7f 100644 --- a/packages/types-codec/src/primitive/U128.ts +++ b/packages/types-codec/src/primitive/U128.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { UInt } from '../base/UInt'; diff --git a/packages/types-codec/src/primitive/U16.ts b/packages/types-codec/src/primitive/U16.ts index e58b3f1b2c..2a3afe4ca6 100644 --- a/packages/types-codec/src/primitive/U16.ts +++ b/packages/types-codec/src/primitive/U16.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { UInt } from '../base/UInt'; diff --git a/packages/types-codec/src/primitive/U256.ts b/packages/types-codec/src/primitive/U256.ts index 7385569558..5b75b417c0 100644 --- a/packages/types-codec/src/primitive/U256.ts +++ b/packages/types-codec/src/primitive/U256.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { UInt } from '../base/UInt'; diff --git a/packages/types-codec/src/primitive/U32.ts b/packages/types-codec/src/primitive/U32.ts index 76a556dbd0..b440e0d891 100644 --- a/packages/types-codec/src/primitive/U32.ts +++ b/packages/types-codec/src/primitive/U32.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { UInt } from '../base/UInt'; diff --git a/packages/types-codec/src/primitive/U64.ts b/packages/types-codec/src/primitive/U64.ts index cb65c2ecfd..50cba9ba91 100644 --- a/packages/types-codec/src/primitive/U64.ts +++ b/packages/types-codec/src/primitive/U64.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { UInt } from '../base/UInt'; diff --git a/packages/types-codec/src/primitive/U8.ts b/packages/types-codec/src/primitive/U8.ts index b5fa72b6e6..0504623fdd 100644 --- a/packages/types-codec/src/primitive/U8.ts +++ b/packages/types-codec/src/primitive/U8.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { UInt } from '../base/UInt'; diff --git a/packages/types-codec/src/primitive/USize.ts b/packages/types-codec/src/primitive/USize.ts index 8d4988dcf8..67d00afccb 100644 --- a/packages/types-codec/src/primitive/USize.ts +++ b/packages/types-codec/src/primitive/USize.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CodecRegistry } from '../types'; diff --git a/packages/types-codec/src/utils/sanitize.spec.ts b/packages/types-codec/src/utils/sanitize.spec.ts index 70feaeca7a..157d8dfd85 100644 --- a/packages/types-codec/src/utils/sanitize.spec.ts +++ b/packages/types-codec/src/utils/sanitize.spec.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2022 @polkadot/types authors & contributors +// Copyright 2017-2022 @polkadot/types-codec authors & contributors // SPDX-License-Identifier: Apache-2.0 import { alias, flattenSingleTuple, removeColons, removeExtensions } from '@polkadot/types-codec/utils/sanitize'; diff --git a/packages/types-create/src/create/class.ts b/packages/types-create/src/create/class.ts index 64628d5e84..ac3df17083 100644 --- a/packages/types-create/src/create/class.ts +++ b/packages/types-create/src/create/class.ts @@ -4,7 +4,7 @@ import type { Codec, CodecClass, CodecRegistry, U8aBitLength, UIntBitLength } from '@polkadot/types-codec/types'; import type { CreateRegistry, TypeDef } from '../types'; -import { BTreeMap, BTreeSet, Bytes, CodecSet, Compact, DoNotConstruct, Enum, HashMap, Int, Null, Option, Range, RangeInclusive, Result, Struct, Tuple, U8aFixed, UInt, Vec, VecFixed, WrapperOpaque } from '@polkadot/types-codec'; +import { BTreeMap, BTreeSet, Bytes, CodecSet, Compact, DoNotConstruct, Enum, HashMap, Int, Null, Option, Range, RangeInclusive, Result, Struct, Tuple, U8aFixed, UInt, Vec, VecFixed, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec'; import { assert, isNumber, stringify } from '@polkadot/util'; import { TypeDefInfo } from '../types'; @@ -173,6 +173,9 @@ const infoMapping: Record => + createWithSub(WrapperKeepOpaque, value), + [TypeDefInfo.WrapperOpaque]: (registry: CodecRegistry, value: TypeDef): CodecClass => createWithSub(WrapperOpaque, value) }; diff --git a/packages/types-create/src/types.ts b/packages/types-create/src/types.ts index d2171d66d0..ffa69eab58 100644 --- a/packages/types-create/src/types.ts +++ b/packages/types-create/src/types.ts @@ -26,6 +26,7 @@ export enum TypeDefInfo { UInt, Vec, VecFixed, + WrapperKeepOpaque, WrapperOpaque } diff --git a/packages/types-create/src/util/encodeTypes.ts b/packages/types-create/src/util/encodeTypes.ts index 1262ac48ec..6d6c0b3d60 100644 --- a/packages/types-create/src/util/encodeTypes.ts +++ b/packages/types-create/src/util/encodeTypes.ts @@ -32,6 +32,7 @@ function encodeWithParams (CodecRegistry: CodecRegistry, typeDef: TypeDef, outer case TypeDefInfo.Option: case TypeDefInfo.Result: case TypeDefInfo.Vec: + case TypeDefInfo.WrapperKeepOpaque: case TypeDefInfo.WrapperOpaque: return paramsNotation(outer, sub, (p) => encodeTypeDef(CodecRegistry, p)); } @@ -137,6 +138,8 @@ const encoders: Record + encodeWithParams(CodecRegistry, typeDef, 'WrapperKeepOpaque'), [TypeDefInfo.WrapperOpaque]: (CodecRegistry: CodecRegistry, typeDef: TypeDef) => encodeWithParams(CodecRegistry, typeDef, 'WrapperOpaque') }; diff --git a/packages/types-create/src/util/getTypeDef.ts b/packages/types-create/src/util/getTypeDef.ts index 61f5157bbb..0c475c0575 100644 --- a/packages/types-create/src/util/getTypeDef.ts +++ b/packages/types-create/src/util/getTypeDef.ts @@ -215,6 +215,7 @@ const wrappedExtraction: [string, string, TypeDefInfo][] = [ ['Linkage<', '>', TypeDefInfo.Linkage], ['Option<', '>', TypeDefInfo.Option], ['Vec<', '>', TypeDefInfo.Vec], + ['WrapperKeepOpaque<', '>', TypeDefInfo.WrapperKeepOpaque], ['WrapperOpaque<', '>', TypeDefInfo.WrapperOpaque] ]; diff --git a/packages/types/src/codec/index.ts b/packages/types/src/codec/index.ts index 08721412dd..9370951362 100644 --- a/packages/types/src/codec/index.ts +++ b/packages/types/src/codec/index.ts @@ -6,4 +6,4 @@ // expand with slight care (for instance, Length is really only used internally to // others, so there _should_ not be need for direct use) -export { BTreeMap, BTreeSet, Compact, DoNotConstruct, Enum, HashMap, Int, Json, Linkage, CodecMap, Map, Option, Range, RangeInclusive, Raw, Result, CodecSet, Set, Struct, Tuple, UInt, U8aFixed, Vec, VecFixed, WrapperOpaque } from '@polkadot/types-codec'; +export { BTreeMap, BTreeSet, Compact, DoNotConstruct, Enum, HashMap, Int, Json, Linkage, CodecMap, Map, Option, Range, RangeInclusive, Raw, Result, CodecSet, Set, Struct, Tuple, UInt, U8aFixed, Vec, VecFixed, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec'; diff --git a/packages/types/src/metadata/PortableRegistry/PortableRegistry.ts b/packages/types/src/metadata/PortableRegistry/PortableRegistry.ts index 94760cfd36..0d72037072 100644 --- a/packages/types/src/metadata/PortableRegistry/PortableRegistry.ts +++ b/packages/types/src/metadata/PortableRegistry/PortableRegistry.ts @@ -533,16 +533,15 @@ export class PortableRegistry extends Struct implements ILookup { )) }); } else if (path.length) { - if (path[path.length - 1].toString() === 'WrapperOpaque') { + const last = path[path.length - 1].toString(); + + if (['WrapperKeepOpaque', 'WrapperOpaque'].includes(last)) { return withTypeString(this.registry, { - info: TypeDefInfo.WrapperOpaque, + info: last === 'WrapperKeepOpaque' + ? TypeDefInfo.WrapperKeepOpaque + : TypeDefInfo.WrapperOpaque, sub: this.#createSiDef(params[0].type.unwrap()) }); - } else if (path[path.length - 1].toString() === 'WrapperKeepOpaque') { - return { - info: TypeDefInfo.Plain, - type: 'Bytes' - }; } } diff --git a/packages/types/src/metadata/util/extractTypes.ts b/packages/types/src/metadata/util/extractTypes.ts index 0e3e755d10..cf3a3803af 100644 --- a/packages/types/src/metadata/util/extractTypes.ts +++ b/packages/types/src/metadata/util/extractTypes.ts @@ -29,6 +29,7 @@ export function extractTypes (types: string[]): Extracted[] { case TypeDefInfo.Option: case TypeDefInfo.Vec: case TypeDefInfo.VecFixed: + case TypeDefInfo.WrapperKeepOpaque: case TypeDefInfo.WrapperOpaque: return extractSubSingle(decoded.sub as TypeDef);