Releases: PolymeshAssociation/Polymesh
Polymesh v6.3.0-rc0
changelog
new features
- Adds the following rpc endpoints:
get_transfer_report
,get_execute_instruction_report
,compliance_report
#1650 - Change compliance rules - if there are no rules returns Ok #1631
- If no one else has voted on a multisig proposal, allows the owner of the proposal to reject it immediately #1632
- Adds check for valid
cdd
when transferring an asset #1650 - Prevents stash accounts to become controllers #1661
- Allows running the trie migration #1660
- Adds multiple checks for execute_instruction #1630
- In function
ensure_portfolio_transfer_validity_granular
,PortfolioValidityResult::receiver_is_same_portfolio
will be set to true if the transfer is between different portfolios, but belong to the Identity #1628
new external API
- Adds the following errors to the asset pallet:
InvalidTransferInvalidReceiverCDD
,InvalidTransferInvalidSenderCDD
#1650 - Adds the following errors to the nft pallet:
InvalidNFTTransferSenderIdMatchesReceiverId
,InvalidNFTTransferInvalidReceiverCDD
,InvalidNFTTransferInvalidSenderCDD
#1650 - Adds the following rpc endpoints:
get_transfer_report
,get_execute_instruction_report
,compliance_report
#1650 - Add the following asset storage:
CurrentAssetMetadataLocalKey
,CurrentAssetMetadataGlobalKey
#1650 - Add the following NFT storage:
CurrentNFTId
,CurrentCollectionId
#1650 - Adds the following error variant to the portfolio pallet:
InvalidTransferSenderIdMatchesReceiverId
#1628 - Adds the
ProposalFailedToExecute
event to the multsig pallet #1632 - Adds the following error variants to the asset_pallet:
InvalidTransferFrozenAsset
,InvalidTransferComplianceFailure
#1591
modified external API
- Deprecate the can_transfer_granular rpc endpoints #1650
- Deprecate the following asset storage:
AssetMetadataNextLocalKey
,AssetMetadataNextGlobalKey
#1658 - Deprecate the following NFT storage:
NextCollectionId
,NextNFTId
#1658 - Adds two error variants:
BoundNotMet
,TooManyNominators
to the staking palletError
#1623 - Removes useless type:
TickerRegistrationStatus
#1591 - Remove useless error constants
(ERC1400_TRANSFERS_HALTED, PORTFOLIO_FAILURE, TRANSFER_MANAGER_FAILURE, COMPLIANCE_MANAGER_FAILURE, ERC1400_TRANSFER_SUCCESS)
#1591
data migration
other
- Adds
pallet_state_trie_migration
to the runtime #1660 - Read the Epoch config from on-chain storage #1659
- Add settlement and asset const to chain metadata #1651
- Add global asset metadata to genesis config for common NFT metadata #1626
- Refactor Asset module #1603
- Updates our staking pallet to use the new Substrate macros and updated logic #1623
Polymesh v6.2.1
Polymesh v6.2.0
Polymesh v6.2.0-rc4
changelog
new features
- Allows instructions and assets to have mediators #1584
- Update example contracts to Ink! 4.3 #1569
- Add logging of Chain Extension errors for easier debugging #1569
- Add example NFT Royalty Smart Contract #1570
- Add support for CallRuntimeWithError chain_extension #1581
- Update chain extension whitelist to include common extrinsics #1606
- Add
polymesh-upgradable-ink
contract and set upgradable API hash on genesis #1606
new external API
- Adds the following storage to the asset pallet:
MandatoryMediators
#1584 - Adds the following error to the asset pallet:
NumberOfAssetMediatorsExceeded
#1584 - Adds the following extrinsics to the asset pallet:
add_mandatory_mediators
,remove_mandatory_mediators
#1584 - Adds the following storage to the settlement pallet:
InstructionMediatorsAffirmations
#1584 - Adds the following error to the settlement pallet:
CallerIsNotAMediator
,InvalidExpiryDate
,MediatorAffirmationExpired
#1584 - Adds the following extrinsics to the settlement pallet
add_instruction_with_mediators
,affirm_instruction_as_mediator
,withdraw_affirmation_as_mediator
,add_and_affirm_with_mediators
,reject_instruction_as_mediator
#1584 - Add support for CallRuntimeWithError chain_extension #1581
modified external API
- Adds
ChildDid
storage, which tracks all child identities of a given parent identity #1568 - Settlement legs transferring from different portfolios for the same identity will be rejected #1567
- Remove support for deprecated chain_extension OldCallRuntime #1581
new events
- Adds the following events to the asset pallet:
SetAssetMediators
,AssetMediatorsRemoved
#1584 - Adds the following events to the settlement pallet:
MediatorAffirmationReceived
,MediatorAffirmationWithdrawn
#1584 - Adds the
InstructionMediators
event to the settlement pallet #1610
data migration
- Initializes the
ChildDid
storage #1568
other
Polymesh v6.1.3
fixes
- Only allow upper case tickers to be registered
- Only allow a subset of non-alphanumeric characters to be used in tickers, specifically
A
..Z
0
..9
_
-
.
/
- Only allow controller transfers of unlocked asset balances (i.e. not balances that are currently locked in a settlement instruction)
Polymesh v6.1.2
Updates token inflation behaviour when POLYX total supply is greater than 1 billion.
Previous behaviour
When the total supply exceeds 1 billion, a fixed amount of 140 million POLYX will be minted annually for validators / nominators.
New behaviour
When the total supply exceeds 1 billion, and the reward curve based annual inflation (calculated based on the reward curve, staking ratio and total supply) exceeds 140 million, a fixed inflation of 140 million will be used instead.
Rationale for change
Without this change, as soon as the total supply exceeds 1 billion, there will be a jump in the inflation rate (and corresponding interest rate for nominators) due to moving to a fixed inflation amount of 140 million annually.
Instead of this behaviour we would rather see a smooth transition, continuing to use the reward curve based mechanism until that mechanism would result in inflation greater than 140 million annually, at which point we revert to the previous logic, capping the annual inflation at 140 million.
In other words, the 140 million annual inflation becomes a cap on annual inflation, rather than a fixed value, once the total supply reaches 1 billion POLYX.
Polymesh v6.1.1
Add write to NFTOwner
storage when moving funds between portfolios.
data migration
- Updates the
NFTOwner
storage
Polymesh v6.1.0
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 topallet_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 theGetLatestApiUpgrade
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
ifcontract_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
andreserved_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
Updates Substrate crates to include TrieCache back ported change.
Fixes memory issues on historical block queries.
Polymesh v6.0.0
changelog
new features
- Remove the
Default
trait fromAccountId
. (#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 forbatch
,batch_all
,force_batch
,dispatch_as
andwith_weight
. (#1469) Utility.relay_tx
now emits an eventRelayedTx { 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 aweight_limit: Option<Weight>
parameter; (#1414)execute_manual_instruction
returnsDispatchResultWithPostInfo
; (#1414)- Adds
WeightLimitExceeded
andInputWeightIsLessThanMinimum
as an Error variant; (#1414) unsafe_can_transfer_granular
andverify_restriction_granular
can return an error now. (#1414)- The memo type for settlements
InstructionMemo
now uses the commonpolymesh_primitives::Memo
. (#1459) polymesh_common_utilities::traits::balances::Memo
changed topolymesh_primitives::Memo
(#1459)polymesh_primitives::portfolio::Memo
moved topolymesh_primitives::Memo
. (#1459)- Removes storage items related to classic tickers (#1461)
LegAsset
has a new variant:LegAsset::OffChain { ticker, amount }
; (#1451)LegV2
has been renamedLeg
and the oldLeg
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 renamedInstructionLegs
and the oldInstructionLegs
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 renamedInstructionCreated
and the old event with the same name no longer applies (i.e the types have changed); (#1451) - Bridge
Controller
andAdmin
changed toOption<AccountId>
. (#1426) - Sudo
Key
changed toOption<AccoundId>
. (#1426) - Pip
Deposits
changed toOption<DepositInfo<T::AccountId>>
. (#1426) - The parameter in event
Sudo.KeyChanged
changed toOption<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
andChildDidUnlinked
. (#1411) - Added errors
IsChildIdentity
,NoParentIdentity
,NotParentOrChildIdentity
andDuplicateKey
. (#1411) - Added
Identity.ParentDid
storage map ("child identity" -> "parent identity"). (#1411) - Adds a
portfolio_kind
parameter to theissue
extrinsic; (#1464) - The following events were removed from the
asset_pallet
:Transfer
,Issued
andRedeemed
; (#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
andFungibleTokensMovedBetweenPortfolios
; (#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
CreatorControlsHaveBeenRemoved
error; (#1473) Portfolio.move_portfolio_funds
returns errorEmptyTransfer
if no assets are moved (zero amount or zero NFT ids). (#1477)- Extrinsic ids in the
System
pallet have changed becausefill_block
has been removed. (#1466) - Added
transfer_no_cdd
to theCurrency
trait inframe_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...
Polymesh v5.4.3
Fix weight issue related to get_key_did
chain extension.