github PolymeshAssociation/Polymesh v7.0.0
Polymesh v7.0.0-rc1

pre-release18 hours ago

changelog

new features

  • Split secondary key permissions out of Identity::KeyRecords to allow for more efficient permissions checks. #1679
  • Replace Ticker with AssetId in storage, events and extrinsics. #1694
  • Allow VenueId to be optional when creating settlement instructions. #1700
  • Update Staking module to more recent Substrate version. #1678
  • Improvements to Multisig module to allow more flexible deployments and management. #1687

new external API

  • The follosing extrinsics have been added: kick, set_staking_configs, chill_other, force_apply_min_commission, set_min_commission; #1678
  • multisig.add_admin(identity) callable by the multisig to add an identity as admin.
  • multisig.remove_admin_via_admin(multisig) callable by the admin to remove itself as admin of a multisig.
  • multisig.remove_payer() callable by the multisig to remove the paying identity. The multisig will need to pay for its own transaction/protocol fees.
  • multisig.remove_payer_via_payer(multisig) callable by the paying identity to remove itself as the payer of fees for the multisig.
  • multisig.approve_join_identity(auth_id) callable by multisig signers to approve joining a new identity. The primary key of the joining identity will pay for transaction fees.
  • multisig.join_identity(auth_id) this is called by the proposal created in approve_join_identity to accept a join identity authorization.
  • Added storage AuthToProposalId used by multisig.approve_join_identity to map an auth_id to proposal_id.
  • Replace Ticker with AssetId in storage, events and extrinsics. #1694
    • pallet_asset
      • The following storage have been added: UniqueTickerRegistration, SecurityTokens, AssetIdentifiers, AssetsExemptFromAffirmation, PreApprovedAsset, TickersOwnedByUser, SecurityTokensOwnedByuser, AssetIDTicker, TickerAssetID, RngNonce;
      • The following extrinsics have been added: register_unique_ticker, exempt_asset_affirmation, remove_asset_affirmation_exemption, pre_approve_asset, remove_asset_pre_approval, link_ticker_to_asset_id;

modified external API

  • Remove Multisig.create_or_approve_proposal
  • Remove storage Multisig.ProposalIds since we don't lookup proposal ids from the proposal call.
  • Renamed storage Multisig.MultiSigTxDone to Multisig.NextProposalId.
  • Removed the bridge pallet extrinsics, events and errors.
  • Removed deprecated *_as_identity MultiSig extrinsic calls.
  • Removed the suffix _as_key from all MultiSig extrinsics.
  • Changed MultiSig storage MultiSigSigners type from Signatory<AccountId> to just AccountId.
  • Replaced all Signatory<AccountId> type with AccountId in the MutliSig pallet's events, storage and extrinsics.
  • Removed field auto_close from the ProposalDetails type (and ProposalDetail storage).
  • Refactor the ProposalDetail storage into two storage items ProposalVoteCounts and ProposalStates. ProposalVoteCounts only stores the approval/rejection vote counts. ProposalStates only store the state and expirey.
  • Change the key hasher of the Proposal value in double map MultiSig.ProposalIds from Blake2_128Concat to Blake2_128.
  • multisig.make_multisig_secondary take an optional set of permissions. Only the creator's primary key can set custom permissions.
  • multisig.add_multisig_signer has been replaced with multisig.add_multisig_signers to allow adding multiple signers.
  • multisig.remove_multisig_signer has been replaced with multisig.remove_multisig_signers to allow removing multiple signers.
  • Use BoundedVec<AccountId, T::MaxSigners> for signers list when creating/adding/removing multisig signers. Multisigs can still have more than T::MaxSigners, the limit is just used for a single call.
  • Added an multisig proposal execution reentry guard to prevent nested proposal executions.
  • Remove Multisig extrinsics *_via_creator to *_via_admin.
  • Multisig storage CreatorDid renamed to AdminDid.
  • Added Multisig storage PayingDid to hold the identity that pays transaction fees.
  • When creating a new MultiSig the calling DID is set as the PayingDid by default, but doesn't have admin controls.
  • create_multisig now adds the new multisig to the caller's identity as a secondary key. By default the multisig will have no permissions unless the caller is the primary key and has provided custom permissions.
  • Removed multisig make_multisig_primary, make_multisig_secondary and remove_creator_controls extrinsics.
  • Replaced remove_creator_controls with remove_admin_via_admin extrinsic.
  • Remove storage CurrentDid from identity pallet. This value was only set during a transaction and cleared when the transaction finished (even on errors).
  • StakingLedger::unlocking and StakingLedger::claimed_rewards types changed from Vec to BoundedVec;
  • The following extrinsics were removed: set_min_bond_threshold, set_history_depth, submit_election_solution, submit_election_solution_unsigned;
  • The following events have been removed: StakingElection, SolutionStored, MinimumBondThresholdUpdated;
  • Adds the following error variants: DuplicateIndex, InsufficientBond, InvalidNumberOfNominations, IncorrectHistoryDepth, CannotChillOther, TooManyValidators, CommissionTooLow, IdentityIsAlreadyPermissioned, IdentityIsMissingCDD, IdentityNotFound, ValidatorNotFound;
  • Removes the following error variants: InsufficientValue, OffchainElectionEarlySubmission, OffchainElectionWeakSubmission, SnapshotUnavailable, OffchainElectionBogusWinnerCount, OffchainElectionBogusWinner, OffchainElectionBogusCompact, OffchainElectionBogusNominator, OffchainElectionBogusNomination, OffchainElectionSlashedNomination, OffchainElectionBogusSelfVote, OffchainElectionBogusEdge, OffchainElectionBogusScore, OffchainElectionBogusElectionSize, CallNotAllowed, AlreadyExists, NotExists, NoChange, InvalidValidatorIdentity, InvalidValidatorCommission, HitIntendedValidatorCount, BondTooSmall, InvalidValidatorUnbondAmount ;
  • Changed Identity.KeyRecords storage type to only hold the key type (primary, secondary, multisig) and the DID/AccountId. Secondary key permissions have been split out into storage Identity.KeyExtrinsicPermissions, Identity.KeyAssetPermissions, and Identity.KeyPortfolioPermissions. #1679
  • Renamed type DispatchableName to ExtrinsicName and change it to wrap a String instead of raw bytes Vec<u8>. #1679
  • Changed PalletName to wrap a String instead of raw bytes Vec<u8>. #1679
  • Changed type PalletPermissions to remove the pallet_name field (pallet name is used as a key the new ExtrinsicPermissions type). #1679
  • The extrinsic permissions in type Permissions has been changed to a new type ExtrinsicPermissions which uses maps instead of sets. #1679
  • Storage value ExternalAgents.GroupPermissions has changed since the extrinsic permissions uses maps instead of sets now. #1679
  • The SecurityTokens storage was renamed to Assets. #1702
  • The following extrinsics changed the venue_id to Option<VenueId>: add_instruction, add_and_affirm_instruction, add_and_affirm_with_mediators, add_instruction_with_mediators. #1700
  • Replace Ticker with AssetId in storage, events and extrinsics. #1694
    • pallet_asset
      • The following storage have been remove: Tickers, Tokens, Identifiers, TickersExemptFromAffirmation; PreApprovedTicker;
      • The following storage have changed types: AssetNames, BalanceOf, FundingRound, IssuedInFundingRound, Frozen, AssetDocuments, AssetDocumentsIdSequence, AssetMetadataValues, AssetMetadataValueDetails, AssetMetadataLocalNameToKey, AssetMetadataLocalKeyToName, AssetMetadataLocalSpecs, AssetMetadataNextLocalKey, MandatoryMediators, CurrentAssetMetadataLocalKey;
      • The following extrinsics have been removed: register_ticker, redeem_from_portfolio, exempt_ticker_affirmation, remove_ticker_affirmation_exemption, pre_approve_ticker, remove_ticker_pre_approval;
      • The following extrinsics have been changed: create_asset, freeze, unfreeze, rename_asset, issue, redeem, make_divisible, add_documents, remove_documents, set_funding_round, update_identifiers, controller_transfer, create_asset_with_custom_type, set_asset_metadata, set_asset_metadata_details, register_and_set_local_asset_metadata, register_asset_metadata_local_type, update_asset_type, remove_local_metadata_key, remove_metadata_value, add_mandatory_mediators, remove_mandatory_mediators;
    • pallet_checkpoint
      • The following storage have changed types: TotalSupply, Balance, CheckpointIdSequence, BalanceUpdates, Timestamps, ScheduleIdSequence, CachedNextCheckpoints, ScheduledCheckpoints, ScheduleRefCount, SchedulePoints;
      • The following extrinsics have been changed: create_checkpoint, create_schedule, remove_schedule;
    • pallet_compliance_manager
      • The following storage have changed types: AssetCompliances, TrustedClaimIssuer;
      • The following extrinsics have been changed: add_compliance_requirement, remove_compliance_requirement, replace_asset_compliance, reset_asset_compliance, pause_asset_compliance, resume_asset_compliance, add_default_trusted_claim_issuer, remove_default_trusted_claim_issuer, change_compliance_requirement;
    • pallet_corporate_actions
      • The following storage have changed types: DefaultTargetIdentities, DefaultWithholdingTax, DidWithholdingTax, CAIdSequence, CorporateActions;
      • The following extrinsics have been changed: set_default_targets, set_default_withholding_tax, set_did_withholding_tax, initiate_corporate_action, link_ca_doc, remove_ca, change_record_date;
    • pallet_distribution
      • The following extrinsics have been changed: distribute
    • pallet_external_agents
      • The following storage have changed types: AGIdSequence, AgentOf, GroupOfAgent, NumFullAgents, GroupPermissions;
      • The following extrinsics have been changed: create_group, set_group_permissions, remove_agent, abdicate, change_group, create_group_and_add_auth, create_and_change_custom_group
    • pallet_nft
      • The following storage have changed types: NumberOfNFTs, CollectionAsset, MetadataValue, NFTsInCollection, NFTOwner;
      • The following extrinsics have been changed: create_nft_collection, issue_nft, redeem_nft, controller_transfer;
    • pallet_portfolio
      • The following storage have changed types: PortfolioAssetBalances, PortfolioLockedAssets, PortfolioNFT, PortfolioLockedNFT, PreApprovedPortfolios;
      • The following extrinsics have been changed: pre_approve_portfolio, remove_portfolio_pre_approval;
    • pallet_settlement
      • The following storage have changed types: VenueFiltering, VenueAllowList;
      • The following extrinsics have been changed: set_venue_filtering, allow_venues, disallow_venues;
    • pallet_statistics
      • The following storage have changed types: ActiveAssetStats, AssetTransferCompliances;
      • The following extrinsics have been changed: set_active_asset_stats, batch_update_asset_stats, set_asset_transfer_compliance;
    • pallet_sto
      • The following storage have changed types: Fundraisers, FundraiserCount, FundraiserNames;
      • The following extrinsics have been changed: freeze_fundraiser, unfreeze_fundraiser, modify_fundraiser_window, stop;

new events

  • Add MultiSig.ProposalApprovalVote event to signal an approval vote instead of event ProposalApproved. The ProposalApproved event is now only emitted when the proposal has received enough votes to be executed.
  • New multisig events: MultiSigAddedAdmin, MultiSigRemovedAdmin, and MultiSigRemovedPayingDid.
  • Replace Ticker with AssetId in storage, events and extrinsics. #1694
    • pallet_asset
      • The following events have changed: AssetCreated, IdentifiersUpdated, DivisibilityChanged, AssetOwnershipTransferred, AssetFrozen, AssetUnfrozen, AssetRenamed, FundingRoundSet, DocumentAdded, DocumentRemoved, ControllerTransfer, SetAssetMetadataValue, SetAssetMetadataValueDetails, RegisterAssetMetadataLocalType, AssetTypeChanged, LocalMetadataKeyDeleted, MetadataValueDeleted, AssetBalanceUpdated,AssetAffirmationExemption, RemoveAssetAffirmationExemption, PreApprovedAsset, RemovePreApprovedAsset, AssetMediatorsAdded, AssetMediatorsRemoved;
    • pallet_checkpoint
      • The following events have changed: CheckpointCreated, ScheduleCreated, ScheduleRemoved;
    • pallet_compliance_manager
      • The following events have changed: ComplianceRequirementCreated, ComplianceRequirementRemoved, AssetComplianceReplaced, AssetComplianceReset, AssetComplianceResumed, AssetCompliancePaused, ComplianceRequirementChanged, TrustedDefaultClaimIssuerAdded, TrustedDefaultClaimIssuerRemoved;
    • pallet_corporate_actions
      • The following events have changed: DefaultTargetIdentitiesChanged, DefaultWithholdingTaxChanged, DidWithholdingTaxChanged;
    • pallet_external_agents
      • The following events have changed: GroupCreated, GroupPermissionsUpdated, AgentAdded, AgentRemoved, GroupChanged;
    • pallet_nft
      • The following events have changed: NftCollectionCreated;
    • pallet_portfolio
      • The following events have changed: PreApprovedPortfolio, RevokePreApprovedPortfolio;
    • pallet_settlement
      • The following events have changed: VenueFiltering, VenuesAllowed, VenuesBlocked, VenueUnauthorized;
    • pallet_statistics
      • The following events have changed: StatTypesAdded, StatTypesRemoved, AssetStatsUpdated, SetAssetTransferCompliance;
    • pallet_sto
      • The following events have changed: Invested

modified events

  • The following events were modified: InstructionCreated; #1700
  • Any event containing a Permissions value will have changed (the extrinsic permissions are stored as a map instead of a set). #1679
  • Renamed MultiSig event MultiSigSignaturesRequiredChanged to MultiSigSignersRequiredChanged.
  • The multisig events now use struct variants instead of tuple variants.
  • MultiSig.ProposalExecuted event is now emitted for both successful and failed executions. The result field is used to see if the execution failed and get the error.
  • MultiSig.ProposalFailedToExecute has been removed, since the error is available in the ProposalExecuted event.
  • Renamed MultiSigSignerAuthorized to MultiSigSignersAuthorized and change the signer field to signers as a bounded vec. Now only one event is emitted when adding multiple signers.
  • Renamed MultiSigSignerRemoved to MultiSigSignersRemoved and change the signer field to signers as a bounded vec. Now only one event is emitted when removing multiple signers.
  • The caller_did is now optional for multisig events: ProposalAdded, ProposalExecuted, MultiSigSignersRequiredChanged, ProposalApprovalVote, ProposalRejectionVote, ProposalApproved, and ProposalRejected. Since the multisig could be unlinked from an identity when those events are emitted.
  • Changed the caller's DID to be optional in the following committee events: FinalVotes, Approved, Rejected, and Executed.
  • Removed the caller's DID from committee event: ReleaseCoordinatorUpdated.

data migration

  • Migration to remove old MultiSig.ProposalDetail storage.
  • Migrate MultiSig signers storage from Signatory type.
  • Migrate renamed storage MultiSigToIdentity.
  • Migrate Multisig MultiSigTxDone to NextProposalId.
  • Removed storage Multisig.LostCreatorPrivileges.
  • Migrate Multisig.CreatorDid to Multisig.PayingDid and Multisig.AdminDid (only if LostCreatorPrivileges hasn't been set).
  • The InstructionDetails storage was migrated. #1700
  • Replace Ticker with AssetId in storage, events and extrinsics. #1694
    • pallet_checkpoint
      • The following storage have been migrated: TotalSupply, Balance, CheckpointIdSequence, BalanceUpdates, Timestamps, ScheduleIdSequence, CachedNextCheckpoints, ScheduledCheckpoints, ScheduleRefCount, SchedulePoints;
    • pallet_compliance_manager
      • The following storage been migrated: AssetCompliances, TrustedClaimIssuer;
    • pallet_ballot
      • The following storage been migrated: Metas, TimeRanges, MotionNumChoices, RCV, Results, Votes;
    • pallet_distribution
      • The following storage been migrated: Distributions, HolderPaid;
    • pallet_asset
      • The following storage have been migrated: Tickers, Tokens, Identifiers, TickersExemptFromAffirmation, AssetNames, BalanceOf, FundingRound, IssuedInFundingRound, Frozen, AssetDocuments, AssetDocumentsIdSequence, AssetMetadataValues, AssetMetadataValueDetails, AssetMetadataLocalNameToKey, AssetMetadataLocalKeyToName, AssetMetadataLocalSpecs, AssetMetadataNextLocalKey, MandatoryMediators, CurrentAssetMetadataLocalKey;
    • pallet_corporate_actions
      • The following storage have been migrated: DefaultTargetIdentities, DefaultWithholdingTax, DidWithholdingTax, CAIdSequence, CorporateActions;
    • pallet_external_agents
      • The following storage have been migrated: AGIdSequence, AgentOf, GroupOfAgent, NumFullAgents, GroupPermissions;
    • pallet_nft
      • The following storage have been migrated: NumberOfNFTs, CollectionTicker, Collection, NFTsInCollection, NFTOwner;
    • pallet_portfolio
      • The following storage have been migrated: PortfolioAssetBalances, PortfolioLockedAssets, PortfolioNFT, PortfolioLockedNFT, PreApprovedPortfolios;
    • pallet_settlement
      • The following storage have been migrated: VenueFiltering, VenueAllowList, InstructionLegs;
    • pallet_statistics
      • The following storage have been migrated: ActiveAssetStats, AssetTransferCompliances, AssetStats, TransferConditionExemptEntities;
    • pallet_sto
      • The following storage have been migrated: Fundraisers, FundraiserCount, FundraiserNames;

other

  • Remove internal Context::current_identity* API.
  • Replace Ticker with AssetId in storage, events and extrinsics. #1694
    • pallet_asset
      • The following errors have been added: TickerIsAlreadyLinkedToAnAsset, TickerRegistrationNotFound, AssetIDGenerationError;
      • The following RPC have been removed: can_transfer_granular;
      • The following RPC have been added: transfer_report;
    • pallet_nft
      • The following errors have been added: InvalidAssetID;
      • The following RPC have been removed: validate_nft_transfer;
      • The following RPC have been added: transfer_report;
    • pallet_compliance
      • The following RPC have been changed: compliance_report;
    • pallet_identity
      • The following RPC have been removed: get_asset_did;
  • Improve Rust Integration Test. #1686
  • Remove unneeded types from polymesh_schema.json file and regenerate TypeScript types for integration testing. #1667
  • The return type of identity RPC endpoints get_key_identity_data and get_did_records has changed, since the Permissions type now uses a map instead of a set for extrinsic permissions. #1679

Don't miss a new Polymesh release

NewReleases is sending notifications on new releases.