Releases: PolymeshAssociation/Polymesh
Releases · PolymeshAssociation/Polymesh
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.
Polymesh v5.4.2
Remove investor uniqueness functionality
Polymesh v5.4.1
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
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
andTransactionPaymentCallApi_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 toTickerNotAlphanumeric
- Removing ascii checking logic from
Ticker::decode
/try_from
to improve error messages - The
Weight
type has been changed from just a singleu64
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
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
extrinsicissue_nft
extrinsicredeem_nft
extirinsic
- Enhances the Settlement pallet to allow NFTs transfer:
add_instruction_with_memo_v2
extrinsicadd_and_affirm_instruction_with_memo_v2
extrinsicaffirm_instruction_v2
extrinsicwithdraw_affirmation_v2
extrinsicreject_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)
toAssetType
: - 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 aPortfolioNotEmpty
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
, andbase_redeem
return an error for non-fungible tokens.- Adds the weight of executing the instruction to
add_and_affirm_instruction_with_memo_v2
andadd_instruction_with_memo_v2
. - Throw error
InvestorUniquenessNotAllowed
ifAsset.create_asset
is called withdisable_iu: false
.
Polymesh v5.2.0
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 thebridge
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 theCallRuntimeWhitelist
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 anOption
(#1381)- Disable Settlement
claim_receipt
andunclaim_receipt
. (#1405)