Releases: PolymeshAssociation/Polymesh
Releases · PolymeshAssociation/Polymesh
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)
Polymesh v5.1.3
Fix portfolio move bug (See #1374)
Polymesh v5.1.2
Removes ITN Rewards
- removes corresponding storage
- makes reward extrinsics uncallable
Polymesh v5.1.1
new features
- New CLI flag
--db-max-total-wal-size
to limit the size of RocksDB WAL files. (See PolymeshAssociation/substrate#29)
modified logic
- When deploying Smart Contracts make sure that the contract's address is linked to the identity before transferring the initial storage fee. (See PolymeshAssociation/substrate@9c28705)
Polymesh v5.1.0
changelog
modified logic
- MultiSig pays protocol fees. (#1307)
- modified MultiSigSigners map (#1282)
- check instruction leg amount and returns error if zero (#1284)
- removed state from pip.Proposals (#1287)
- modified renaming portfolio function to insert new name in nameToNumber map (#1285)
- added redeem_from_portfolio function (#1292)
- modified base_redeem to correctly check referenced portfolio (#1338)
modified api
- created update_venue_signers function and VenueSignersUpdated Event (#1273)
- adds
CustomClaimTypeAdded
event to record custom claim (#1266) - adds
CustomClaimTypeDoesNotExist
error if claim type doesn't exist (#1266) - adds
CustomClaims
,CustomClaimsInverse
,CustomClaimIdSequence
storage to record custom claim details (#1266) - adds
register_custom_claim_type
extrinsic to register new custom claim types (#1266) - add a few new fields to
AssetCreated
event (#1272) - added optional memo field to Instructions (#1280)
new features
- adds the ability to register and then add custom claims (
Claim::Custom
) (#1266) - Add storage version check script to pipeline and fix genesis config for Portfolio & Statistics pallets.
- Add missing rpc endpoints and signedExtensions. #1329
- Re-use the develop runtime code and add support for building just a special ci runtime.
- Updates benchmarks for new 5.1 extrinsics
- Bump
spec_version
to 5_001_002 (5.1.0-rc2)
Polymesh 5.0.4
changelog
new features
- Allows relayer functionality for the
Balances
module
modified logic
- Extrinsic
Portfolio.movePortfolioFunds
will throw errorInvalidGranularity
if trying to move a fraction of a non-divisible token. - Settlement affirms calls will also check granularity of token transfer when trying to lock the tokens. Will throw a
FailedToLockTokens
error. - Fixes on-chain election issues following offline offenses
Polymesh 5.0.3
Changes relative to 5.0.2
- Updates extrinsic weights for batched functions
- Adds health check and key rotation utilities to Docker images
- Adds aarch64 binaries to release artefacts
- Multisig protocol fees paid correctly by associated identities primary key
Polymesh 5.0.2
changelog
modified logic
- We have moved from substrate 3.0.0 to substrate's monthly-2021-11 tag instead. Allowing us to implement smart contracts. (#1188)
- Update to Substrate monthly 2022-05. (#1241)
- Add permission complexity to the weights of extrinsics:
identity.add_authorization
,identity.set_permission_to_signer
,identity.legacy_set_permission_to_signer
, andidentity.add_secondary_keys_with_authorization
(#1192) - More restrict limits on secondary keys and their permissions. (#1189)
- Add missing check to
relayer.accept_paying_key
. (#1209) - Add missing weight to
change_bridge_exempted
. (#1209) - Use a cost function for
Condition
type for more accurate call weights. (#1204) - Change
multisig.create_create_proposal_as_key
andmultisig.create_proposal_as_identity
to not use themultsig::ProposalIds
map. (#1225) - Adding secondary key and permissions length checks to
cdd_register_did
(#1221) capitalDistribution.distribute()
will throw errorDistributionAmountIsZero
whenamount
is zero and throwDistributionPerShareIsZero
whenper_share
is zero. (#1236)- adding tests for checking multisig errors and secondary key & permission limits (#1227)
- Fixed the balance check for MultiSig primary/secondary keys. (#1224)
- MultiSig balance limit changed from zero to
1.0 POLYX
. (#1224) - Remove dead code
unlink_multisig_signers_from_did()
, since the signers for a multisig are never linked to the identity. (#1224) - minor change and removed test case (#1235)
- Created more specific error types for improving singer already linked type errors (#1226)
Treasury::disbursement()
now checks if the beneficiaries exist and have a primary key. (#1233)- If the treasury disbursement transfer fails (treasury balance locked, beneficiary missing CDD), then event
Treasury::TreasuryDisbursementFailed
. (#1233) Identity.remove_secondary_keys()
now checks if the keys to remove are secondary keys. (#1220)
new features
- Add generated error types to
errors_schema.json
for improved error decoding. (#1167) - Add support for custom asset metadata (key/value pairs). (#1218)
- Asset metadata keys can be either ticker-local or global names, with either on/off chain specifications (value type/format/encoding). (#1218)
- Asset metadata can be permanently locked, or locked for a limited amount of time (1 month, 1 year, etc...). (#1218)
- An optional expire date can be set for the metadata value. This is informational only, the chain doesn't remove the value after the expire date. (#1218)
- On-chain metadata type specification can be used to generate encode/decode code for UIs/Smart Contracts. (#1218)
- Add new asset identifier
AssetIdentifier::FIGI
. (#1234) - Bump transaction version to 3. (#1236)
- Added
Asset::create_asset_with_custom_type
(#1222) - Added
CorporateAction::initiate_corporate_action_and_distribute
(#1222) - Added
ExternalAgent::create_group_and_add_auth
(#1222) - Added
ExternalAgent::create_and_change_custom_group
(#1222) - Adds the smart contracts pallet; see the code for documentation regarding extrinsics and storage items. (#1217)
- Unlimited number of secondary keys. (#1220)
Identity.KeyRecords
maps key toKeyRecord
type. Can be used to see if the key is a primary key, secondary key or multisig signer. Also has the identity/multisig account that the key is linked to. (#1220)- Add
Claim
based asset statistics and transfer rules. (Jurisdiction, Affiliated, Accredited) (#1159)
modified api
- Used
InvalidCDDId
error event inadd_investor_uniqueness_claim
function (#1214) - Add
Asset::set_asset_metadata(Ticker, AssetMetadataKey, AssetMetadataValue, Option<AssetMetadataValueDetails>)
- Set asset metadata value. (#1218) - Add
Asset::set_asset_metadata_details
- Set asset metadata value details (expire, lock status). (#1218) - Add
Asset::register_and_set_local_asset_metadata
- Register and set local asset metadata. (#1218) - Add
Asset::register_asset_metadata_local_type
- Register asset metadata local type. (#1218) - Add
Asset::register_asset_metadata_global_type
- Register asset metadata global type. Only callable by root. (#1218) - Add
storage_deposit_limit
parameter toPolymeshContracts::call
,PolymeshContracts::instantiate_with_code
,PolymeshContracts::instantiate
,PolymeshContracts::instantiate_with_code_perms
,PolymeshContracts::instantiate_with_hash_perms
. (#1241) - Added
upload_code
andremove_code
extrinsics to contracts pallet. (#1241) - Rename
multisig.make_multisig_signer
->multisig.make_multisig_secondary
. The old name was confusing to users, since it adds the multisig as a secondary key to the identity that created the multisig. (#1224) - Deprecated extrinsics that use
Signatory<AccountId>
for secondary keys. (#1237) - Rename deprecated
Identity.remove_secondary_keys
->Identity.remove_secondary_keys_old
. (#1237) - Rename deprecated
Identity.add_secondary_keys_with_authorization
->Identity.add_secondary_keys_with_authorization_old
. (#1237) - Deprecate
Identity.set_permission_to_signer
. (#1237) - Add placeholder for
Identity.legacy_set_permission_to_signer
. (#1237) - Add new extrinsics to replace deprecated extrinsics:
Identity.add_secondary_keys_with_authorization
,Identity.set_secondary_key_permissions
,Identity.remove_secondary_keys
. (#1237) - Contracts
instantiate
APIs now use empty permissions by default. (#1239) - Enable RPC for contracts. (#1239)
- Added error
Treasury::InvalidIdentity
returned fromTreasury::disbursement
if one of the beneficiaries doesn't exist or doesn't have a primary key. (#1233) - Added the primary key to event
Treasury::TreasuryDisbursement
. (#1233) - Added event
Treasury::TreasuryDisbursementFailed
event for disbursements that fail. (#1233) - Removed unused events
Identity.OffChainAuthorizationRevoked
andIdentity.MockInvestorUIDCreated
. (#1220) - Removed extrinsic
Identity.legacy_set_permission_to_signer()
and typeLegacyPermissions
. (#1220) - Replace use of
Signatory<AccountId>
type withAccountId
in identity events:SecondaryKeysRemoved
andSignerLeft
. (#1220) - Use
AccountId
instead ofSecondaryKey<AccountId>
in eventSecondaryKeyPermissionsUpdated
. (to dedup the permissions) (#1220) - Rename extrinsic
Identity.set_permission_to_signer()
toIdentity.set_secondary_key_permissions()
. (#1220) - Replace use of
Signatory<AccountId>
withAccountId
in extrinsics:remove_secondary_keys
,set_secondary_key_permissions
(#1220) - Moved secondary key permissions from
Identity.DidRecords
toIdentity.KeyRecords
. (https://github.com/PolymeshAssociation/P...
Polymesh v4.1.2
Updates to later Substrate branch, pulling in PRs:
paritytech/substrate#8260
paritytech/substrate#8325
paritytech/substrate#11084
This helps to ensure good peer connections.
There is no on-chain logic change related to this change.