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
. (#1220) - Replaced storage maps
MultiSig.KeyToMultiSig
andIdentity.KeyToIdentityIds
withIdentity.KeyRecords
. (#1220) - Replaced use of
Signatory<AccountId>
withAccountId
in typeSecondaryKey<AccountId>
. (#1220) - Marked RPC
identity_getDidRecords
as deprecated and limited the number of secondary keys returned to 200. (#1220) - Rename event
Identity.SignerLeft
toIdentity.SecondaryKeyLeftIdentity
. (#1220) - Add
statistics.set_active_asset_stats
andstatistics.batch_update_assets
to add/remove and update asset statistics. (#1159) - Add
statistics.set_asset_transfer_compliance
andstatistics.set_entities_exempt
to manage stats based transfer rules and exempt status. (#1159) - Add
statistics.set_entities_exempt
to manage investor exempt status. (#1159) - Remove
statistics.add_transfer_manager
,statistics.remove_transfer_manager
,statistics.add_exempted_entities
,statistics.remove_exempted_entities
. (#1159) - Add events:
StatTypesRemoved
,StatTypesAdded
,AssetStatsUpdated
,SetAssetTransferCompliance
,TransferConditionExemptionsAdded
,TransferConditionExemptionsRemoved
. (#1159) - Remove events:
TransferManagerAdded
,TransferManagerRemoved
,ExemptionsAdded
,ExemptionsRemoved
(#1159) - Added types:
AssetScope
,StatOpType
,StatType
,StatClaim
,Stat1stKey
,Stat2ndKey
,StatUpdate
,TransferCondition
,AssetTransferCompliance
,TransferConditionExemptKey
,TransferConditionResult
(#1159) - Removed types:
Counter
,TransferManager
,TransferManagerResult
(#1159) - Removed field
statistics_result
and addedtransfer_condition_result
in typeGranularCanTransferResult
. (#1159) - RPC version bump for
asset_canTransferGranular
call to reflex the change to typeGranularCanTransferResult
. (#1159) Treasury::disbursement
emits theBalances::Transfer
event for each disbursement beneficiary. (#1233)- Replace all the old events/extrinsics in the
Statistics
pallet. (#1159)