Skip to content

Releases: PolymeshAssociation/Polymesh

Polymesh v6.1.1

05 Jan 12:30
bbe2fe7
Compare
Choose a tag to compare

Add write to NFTOwner storage when moving funds between portfolios.

data migration

  • Updates the NFTOwner storage

Polymesh v6.1.0

12 Dec 09:11
99054ca
Compare
Choose a tag to compare

new features

  • Adds controller (aka forced) transfer logic for NFTs.
  • Adds storage to track NFT collection total supply.
  • Adds storage to map NFTs into user Portfolios.
  • Allows a smart contract to create and take custody of portfolios on behalf of an identity.
  • Allows a smart contract to be deployed as a primary key of a child identity.
  • Stores smart contract API upgrades on chain storage.
  • Allows derivative keys to be used as identity signing keys.
  • Prevents Identity based signers for MultiSigs

new external API

  • Adds the controller_transfer extrinsic to pallet_nft. #1529
  • Adds NFTsInCollection storage to track the number of nfts in a collection. #1529
  • Adds the following extrisincs: allow_identity_to_create_portfolios, revoke_create_portfolios_permission, create_custody_portfolio. #1547
  • Adds the following extrisincs: instantiate_with_code_as_primary_key, instantiate_with_hash_as_primary_key. #1548
  • Adds the upgrade_api extrinsic and the GetLatestApiUpgrade chain extension call. #1559
  • Add as_derivative in the utility pallet. #1560
  • Change NFTOwner map to track the holder's portfolio. #1566

modified external API

  • on_instantiate_transfer if contract_did is different from the caller's did, also check if its parent match the caller's identity. #1548
  • No longer permit Identity based multisig signers - accept_multisig_signer_as_identity will now always fail. #1556
  • dispatch_as temporarily sets current_did and current_payer to the identity and account from as_origin. #1560

new events

  • Adds the following events: RemoveAssetAffirmationExemption, AssetAffirmationExemption, PreApprovedAsset, RemovePreApprovedAsset, PreApprovedPortfolio, RevokePreApprovedPortfolio, InstructionAutomaticallyAffirmed. #1557
  • Adds the ApiHashUpdated event. #1559
  • Adds the SCRuntimeCall event for contract calls into the runtime. #1561

other

  • Adds the following variants to the nft error enum: SupplyOverflow, SupplyUnderflow. #1529
  • Adds the following variant to PortfolioUpdateReason: ControllerTransfer. #1529
  • Remove the old itn_rewards and reserved_classic_tickers files. #1544
  • Adds ConstSize wrapper for const u32 values. This is needed for the size limits for bounded collections like BoundedBTreeMap to be used as extrinsic parameters, since extrinsic parameters need extra traits (Clone, Debug, PartialEq, Eq) and this also applies to the size limit generic type parameter on bounded collections. #1530

data migration

  • Initializes the new NFT storage with data that already lives on chain. #1546

Polymesh v6.0.1

08 Nov 18:36
6edde62
Compare
Choose a tag to compare

Updates Substrate crates to include TrieCache back ported change.

Fixes memory issues on historical block queries.

Polymesh v6.0.0

10 Oct 09:28
23980d8
Compare
Choose a tag to compare

changelog

new features

  • Remove the Default trait from AccountId. (#1426)
  • Identities can create child identities (if they are not a child identity). The child identities share the CDD claim of their parent. (#1411)
  • Child identities can be unlinked from their parent identity and receive their own CDD claim from a CDD provider. (#1411)
  • Adds change_sigs_required_via_creator, remove_creator_controls; (#1473)
  • Update to Substrate monthly-2023-03 with trie-db fixes backported. (#1466)
  • Substrate - HTTP/WS rpc on the same port. The old http-only port is still supported, the ws port now supports both. (#1466)
  • Adds the following extrinsics to the asset pallet: exempt_ticker_affirmation, remove_ticker_affirmation_exemption, pre_approve_ticker, remove_ticker_pre_approval; (#1455)
  • Adds the following extrinsics to the portfolio pallet: pre_approve_portfolio, remove_portfolio_pre_approval; (#1455)
  • The pallet_utiltity has been updated to use the implementations from Substrate for batch, batch_all, force_batch, dispatch_as and with_weight. (#1469)
  • Utility.relay_tx now emits an event RelayedTx { caller_did: IdentityId, target: AccountId, result: DispatchResult }. (#1469)
  • The new batch extrinsics now support non-signed origins and can be used in Pips/Committee proposals. (#1469)
  • The new batch extrinsics are compatible with Polkadot.js webapp (allowing the UI to do atomic batches) and will return the actual weight of the batched calls. (#1469)
  • Update Polymesh Ink! API to support Polymesh 6.0. (#1505)
  • Add protocol fee when creating new child identities - initially set to 0. (#1523)
  • Simplify Checkpoint schedules. Schedules are now just a list of pending Moment checkpoints, instead of complex calendar basic repeating values. (#1488)
  • Adds the affirm_with_receipts_with_count extrinsic;
  • Adds the affirm_instruction_with_count extrinsic;
  • Adds the withdraw_affirmation_with_count extrinsic;
  • Adds the reject_instruction_with_count extrinsic;
  • Adds the get_affirmation_count rpc call;

modified api

  • Compliance Manager Event and Config moved to pallet/common; (#1414)
  • execute_manual_instruction adds a weight_limit: Option<Weight> parameter; (#1414)
  • execute_manual_instruction returns DispatchResultWithPostInfo; (#1414)
  • Adds WeightLimitExceeded and InputWeightIsLessThanMinimum as an Error variant; (#1414)
  • unsafe_can_transfer_granular and verify_restriction_granular can return an error now. (#1414)
  • The memo type for settlements InstructionMemo now uses the common polymesh_primitives::Memo. (#1459)
  • polymesh_common_utilities::traits::balances::Memo changed to polymesh_primitives::Memo (#1459)
  • polymesh_primitives::portfolio::Memo moved to polymesh_primitives::Memo. (#1459)
  • Removes storage items related to classic tickers (#1461)
  • LegAsset has a new variant: LegAsset::OffChain { ticker, amount }; (#1451)
  • LegV2 has been renamed Leg and the old Leg no longer applies (i.e the types are different); (#1451)
  • The following variants have been removed from the Settlement error enum: NoPendingAffirm, LegNotPending, ReceiptNotClaimed, NoPortfolioProvided, LegCountTooSmall, InstructionHasTooManyLegs, InvalidLegAsset, MaxNumberOfNFTsPerLegExceeded, DeprecatedCallOnV2Instruction, ReceiptForNonFungibleAsset; (#1451)
  • The following variants have been added to the Settlement error enum: MaxNumberOfFungibleAssetsExceeded, MaxNumberOfOffChainAssetsExceeded, NumberOfFungibleTransfersUnderestimated, UnexpectedOnChainAsset, UnexpectedOFFChainAsset, OffChainAssetCantBeLocked, OffChainAssetMustBeAffirmedWithReceipts, NumberOfOffChainTransfersUnderestimated, LegNotFound; (#1451)
  • InstructionLegsV2 storage has been renamed InstructionLegs and the old InstructionLegs no longer applies (i.e the types are different); (#1451)
  • The following extrinsics have been deleted: add_instruction_with_memo, add_and_affirm_instruction_with_memo, add_instruction_with_memo_v2, add_and_affirm_instruction_with_memo_v2, affirm_instruction_v2, withdraw_affirmation_v2, reject_instruction_v2; (#1451)
  • The following extrinsics have new parameters: add_instruction, add_and_affirm_instruction, withdraw_affirmation, reject_instruction, affirm_with_receipts, affirm_instruction; (#1451)
  • The InstructionV2Created event has been renamed InstructionCreated and the old event with the same name no longer applies (i.e the types have changed); (#1451)
  • Bridge Controller and Admin changed to Option<AccountId>. (#1426)
  • Sudo Key changed to Option<AccoundId>. (#1426)
  • Pip Deposits changed to Option<DepositInfo<T::AccountId>>. (#1426)
  • The parameter in event Sudo.KeyChanged changed to Option<AccountId>. (#1426)
  • Added identity.create_child_identity extrinsic for creating a child identity. A secondary key from the caller's identity is moved to the child identity as the primary key. (#1411)
  • Added identity.create_child_identities extrinsic to create multiple child identities from keys using off-chain signatures. The keys can't be linked to any identity. (#1411)
  • Added identity.unlink_child_identity extrinsic for unlinking a child identity from its parent. (#1411)
  • Added events ChildDidCreated and ChildDidUnlinked. (#1411)
  • Added errors IsChildIdentity, NoParentIdentity, NotParentOrChildIdentity and DuplicateKey. (#1411)
  • Added Identity.ParentDid storage map ("child identity" -> "parent identity"). (#1411)
  • Adds a portfolio_kind parameter to the issue extrinsic; (#1464)
  • The following events were removed from the asset_pallet: Transfer, Issued and Redeemed; (#1427)
  • The following event was added to the asset_pallet: AssetBalanceUpdated; (#1427)
  • The following events were removed from the nft_pallet: IssuedNFT, RedeemedNFT; (#1427)
  • The following event was added to the nft_pallet: NFTPortfolioUpdated; (#1427)
  • The following events were removed from the portfolio_pallet: MovedBetweenPortfolios, NFTsMovedBetweenPortfolios and FungibleTokensMovedBetweenPortfolios; (#1427)
  • The following event was added to the portfolio_pallet: FundsMovedBetweenPortfolios; (#1427)
  • The following extrisinc was deleted: move_portfolio_funds_v2; (#1427)
  • The parameters for move_portfolio_funds have changed. (#1427)
  • Removes depreciated old get_did_records for V1 records (#1471)
  • Adds CreatorControlsHaveBeenRemovederror; (#1473)
  • Portfolio.move_portfolio_funds returns error EmptyTransfer if no assets are moved (zero amount or zero NFT ids). (#1477)
  • Extrinsic ids in the System pallet have changed because fill_block has been removed. (#1466)
  • Added transfer_no_cdd to the Currency trait in frame_support. To allow transferring POLYX to accounts without a CDD (i.e. Contract's deposit account). (#1466)
  • The original Polymesh Utility.batch has been renamed to `Utilit...
Read more

Polymesh v5.4.3

13 Sep 11:06
f48441e
Compare
Choose a tag to compare

Fix weight issue related to get_key_did chain extension.

Polymesh v5.4.2

13 Sep 10:51
9301b52
Compare
Choose a tag to compare

Remove investor uniqueness functionality

Polymesh v5.4.1

28 Jun 17:15
f1f1bc4
Compare
Choose a tag to compare

changelog

modified logic

  • Use the paying account id in the TransactionFeePaid event, instead of the caller account. (#1479)
  • Remove the 80/20 split between treasury/author. The block author gets 100% of transaction/protocol fees. (#1479)
  • Use the payer account in the protocolFee.FeeCharged event. (#1481)

Data Migration

  • Remove unneeded migrations and fix pallet_scheduler StorageVersion. (#1480)

Polymesh v5.4.0

06 Jun 13:40
f530505
Compare
Choose a tag to compare

changelog

new features

  • Add remove_local_metadata_key extrinsic
  • Add remove_metadata_value extrinsic
  • Update to Substrate monthly 2022-12
  • Move to V2 Weights (now includes a proof_size)

modified API

  • Add two new error variants: AssetMetadataKeyBelongsToNFTCollection, AssetMetadataValueIsEmpty
  • Add two new events: MetadataValueDeleted, LocalMetadataKeyDeleted
  • Add new event transaction-payment.TransactionFeePaid to record tx fees.
  • The Contract pallet RPC endpoints have been removed and can only be accessed as Runtime Calls (state_call RPC endpoint).
  • Added payment_queryFeeDetails RPC endpoint.
  • Added Runtime APIs TransactionPaymentCallApi_query_call_info and TransactionPaymentCallApi_query_call_fee_details. Used to query the cost of a call without having to first sign a transaction with that call.

modified logic

  • base_set_asset_metadata_details no longer allows locking a key with empty value
  • Renaming TickerNotAscii error to TickerNotAlphanumeric
  • Removing ascii checking logic from Ticker::decode / try_from to improve error messages
  • The Weight type has been changed from just a single u64 to a pair (ref_time and proof_size).
  • Updated weights for Polymesh v5.4

fixes

  • Add FungibleToken type to avoid registry type error
  • Backport /wss transport fix in linked Substrate repo
  • Fixes can_transfer_granular RPC to correctly check senders CDD status

data migration

  • Substrate pallet migrations in pallet_contracts, pallet_scheduler, pallet_preimage.

Polymesh v5.3.0

31 Mar 16:15
f8bc6f0
Compare
Choose a tag to compare

Adds a basic pallet for non-fungible tokens. Users should be able to create collections, issue and redeem NFTs. The settlement and portfolio pallets have also been changed to allow transferring NFTs and moving them between portfolios.

changelog

new features

  • Adds the NFT Pallet:
    • create_nft_collection extrinsic
    • issue_nft extrinsic
    • redeem_nft extirinsic
  • Enhances the Settlement pallet to allow NFTs transfer:
    • add_instruction_with_memo_v2extrinsic
    • add_and_affirm_instruction_with_memo_v2 extrinsic
    • affirm_instruction_v2 extrinsic
    • withdraw_affirmation_v2 extrinsic
    • reject_instruction_v2 extrinsic
  • Enhances the Portfolio pallet to allow moving NFTs between portfolios:
    • move_portfolio_funds_v2 extrinsic
  • Adds nft_validateNFTTransfer rpc call

modified API

  • The following events have been added to the Settlement pallet:
    • InstructionV2Created
  • The following errors have been added to the Settlement pallet:
    • DuplicatedNFTId, InvalidLegAsset, MaxNumberOfNFTsExceeded, MaxNumberOfNFTsPerLegExceeded, NumberOfTransferredNFTsUnderestimated, DeprecatedCallOnV2Instruction, ReceiptForNonFungibleAsset
  • The following events have been added to the Portfolio pallet:
    • NFTsMovedBetweenPortfolios, FungibleTokensMovedBetweenPortfolios
  • The following errors have been added to the Portfolio pallet:
    • NFTNotFoundInPortfolio, NFTAlreadyLocked, NFTNotLocked, InvalidTransferNFTNotOwned, InvalidTransferNFTIsLocked
  • Adds the following error variants to the asset pallet:
    • UnexpectedNonFungibleToken, IncompatibleAssetTypeUpdate;
  • Adds NonFungible(NonFungibleType) to AssetType:
  • Adds remove_local_metadata_key to remove (non-locked) local metadata keys
  • Adds remove_metadata_value for managing metadata
  • Adds the InvalidNFTTransferCountOverflow, InvalidNFTTransferInsufficientCount, MaxNumberOfNFTsPerLegExceeded, ZeroCount, DuplicatedNFTId error variants to the NFT pallet;
  • Removes the InvalidNFTTransferBalanceOverflow, InvalidNFTTransferNoBalance, error variants from the NFT pallet;
  • Removes DuplicatedNFTId error variant from the setlement pallet
  • Adds execute_scheduled_instruction_v2 extrinsic

modified logic

  • delete_portfolio will also check for NFTs. If there are NFTs when trying to delete a portfolio, the function will return a PortfolioNotEmpty error.
  • base_update_asset_type fails updating a fungible asset to a non-fungible one, and the other way around.
  • unsafe_transfer, _mint, base_make_divisible, and base_redeem return an error for non-fungible tokens.
  • Adds the weight of executing the instruction to add_and_affirm_instruction_with_memo_v2 and add_instruction_with_memo_v2.
  • Throw error InvestorUniquenessNotAllowed if Asset.create_asset is called with disable_iu: false.

Polymesh v5.2.0

02 Mar 20:33
e8bfe85
Compare
Choose a tag to compare

modified logic

  • Minor changes to running_count insert and delete logic (#1333)
  • Move the decode logic from the RPC wrapper into the chain runtime. This is an internal change between the host binary and the chain runtime. (#1343)
  • Modified unbond function to not allow a validator to unbond leaving less than 50k POLYX bonded (#1348)
  • Added check for ticker starting first byte (#1344)
  • Adds a helper function for setting the Timestamp in unit tests. (#1359)
  • Add ensure check for revoke_claim to make sure claim exist (#1361)
  • Created a check in ticker registration to make sure it is alphanumeric (#1296)
  • Store block hashes for the last 4,096 blocks rather than the current 250 blocks - as per paritytech/polkadot#6037 (#1375)
  • Allow operational extrinsics which are submitted by the GC or a CDD provider to have non-zero tips and corresponding priorities. (#1377)
  • To avoid a state rollback (i.e allow setting instruction status to the failed state) the return of execute_instruction_retryable is now matched, and returns an event in case of failure. (#1383)
  • Added compliance check for validators list and test case to check error (#1376)
  • Don't allow the same ticker to be moved multiple times within the same portfolio move extrinsic (#1374)
  • Emit event BridgeTxFailed to report errors (missing CDD, limit reached) when trying to handle a bridge transaction, instead of returning the error. This is needed to support new Substrate release that wrap all calls in transactions. (#1373)
  • Updates extrinsic benchmarks for 5.2. (#1392)
  • Settlement receipts are not allowed for tickers of on-chain assets. (#1405)
  • Update example settlement contract to use manual settlement execution. (#1391)

data migration required

  • Called Identity add_account_key_ref_count function on current validators (#1333)

new features

  • Allow payment_queryInfo RPC endpoint to work even when the RPC node is a different version from the chain runtime. (#1343)
  • Add support for Smart Contracts to call into the runtime, read from storage, Twox hash, get chain spec/transaction version, get key's identity. (#1337)
  • Add CallRuntimeWhitelist storage to restrict the pallets/extrinsics that contracts are allowed to call. (#1337)
  • Add a new event BridgeTxFailed to the bridge pallet. (#1373)
  • Add example Smart Contract for vesting POLYX. (#1388)
  • Add example Smart Contract for wrapped POLYX. (#1392)
  • Add Polymesh Runtime 5.x contract code for upgradable contracts. (#1393)

modified api

  • Add payment_queryFeeDetails RPC endpoint. (#1343)
  • Added CallRuntime chain extension to allow contracts to call extrinsics. Only extrinsics in the CallRuntimeWhitelist are allowed. (#1337)
  • Added new function chill_from_governance (#1317)
  • Added execute_manual_instruction extrinsic (#1352)
  • Added ReadStorage chain extension for reading from any hashed storage key (key and value limited to 8kb). (#1337)
  • Added GetSpecVersion chain extension to get current spec version. (#1337)
  • Added GetTransactionVersion chain extension to get the current transaction version. (#1337)
  • Added GetKeyDid chain extension to get the identity for a key (AccountId). (#1337)
  • Added KeyHasher chain extension with hash Twox (64, 128, 256) support. (#1337)
  • Converted old chain extensions to OldCallRuntime. Those chain extensions are deprecated and shouldn't be used. (#1337)
  • Added storage CallRuntimeWhitelist to restrict the pallets/extrinsics that contracts are allowed to call. (#1337)
  • Added extrinsic PolymeshContracts.update_call_runtime_whitelist() to add/remove extrinsics from the whitelist. (#1337)
  • New extrinsic identity::cdd_register_did_with_cdd to allow CDD providers to create an identity and add a CDD claim with a blank CddId, in a single extrinsic call. (#1380)
  • Adds an event: FailedToExecuteInstruction; (#1383)
  • The execute_scheduled_instruction will no longer return an error; (#1383)
  • Portfolio::NameToNumber returns an Option (#1381)
  • Disable Settlement claim_receipt and unclaim_receipt. (#1405)