Polymesh 3.1.0 Release Notes
MESH-1597: Split issuance and token creation #981
new features
Asset::create_asset_and_mint
does whatAsset::create_asset
used to do
modified API
Asset::create_asset
no longer mints tokens by default
MESH-1543: coverage bridge #979
Refactor on UT of bridge
pallet and it also add new ones to increase the coverage of this module.
Changes in Bridge
pallet
handle_bridge_tx_now
adds new argumentexempted_did
, which ignore the bridge limits if it is some. This allows to remove the "hacky approach" inforce_handle_signed_bridge_tx
line 853.- Move code outside
decl_storage
macro. - Remove some duplicated code.
More stuff
- Genesis configuration has been moved out from
lib.rs
intogenesis.rs
. - Runtime migrations have been moved out from
lib.rs
intomigration.rs
. ExtBuilder
supports bridge configuration.
modified API
Bridge::Event::TxsHandled
added therecipient
account to each handled transaction.
MESH-1603: allow portfolio custodians unilaterally quit #977
new features
- A new extrinsic
quit_portfolio_custody
is added in theportfolio
module to allow a portfolio custodian to relinquish custodianship duties without going through the authorization sequence.
modified logic
- Accepting a portfolio custody authorization for the portfolio owner will not add the pair of portfolio owned and the portfolio ID to the
PortfoliosInCustody
mapping in theportfolio
module. - The portfolio name length parameter was removed from the weight of the
create_portfolio
extrinsic in theportfolio
module.
MESH-1598: use expect/assert in benchmarks #986
Changed all ?
operators in the benchmarks to unwrap()
and changed all ensure
's to assert
.
MESH-1617: Fixed a bug preventing some operators from changing commission #987
MESH-1593: Fix payout_stakers benchmarks #988
MESH-1542: Improve code coverage for Identity module #990
MESH-1581: External Agents #978
new features
- The
ExternalAgents
pallet has been added. The functionality is described more thoroughly in the code documentation. As a result, many things noted below, on a best-effort basis, have changed, including extrinsics, schema, events, error types, and some data types. - Types
AgentGroup
andAGId
have been added.
modified API
SubsetRestriction
(i.e.ExtrinsicPermissions
& friends) is now redefined as eitherWhole
,These(elems)
, andExcept(elems)
.TargetIdentity::PrimaryIssuanceAgent
is nowTargetIdentity::ExternalAgent
, testing for if the identity is any of the external agents.AuthorizationData::BecomeAgent(Ticker, AgentGroup)
was added. This authorization is used for adding an external agent with a group to an asset. Similarly,AuthorizationType::BecomeAgent
was added.AuthIdentifier
was removed. It was never actually in use.- Extrinsics
CorporateActions::reset_caa
,Asset::remove_primary_issuance_agent
, andAsset::accept_primary_issuance_agent_transfer
have been removed. - The error
IrrelevantAuthorization
(Portfolio pallet) was removed. CorporateActions::Agent
(storage item) was removed.SecurityToken.primary_issuance_agent
was removed.SecondaryKeyNotAuthorizedForAsset
was moved to the external agents pallet.
modified logic
- Relevant extrinsics now check for agent permissions. Sometimes, this replaces other explicit checks such as from the explicit CAA or PIA concepts.
AuthorizationData::{TransferPrimaryIssuanceAgent, TransferCorporateActionAgent}
are now always rejected by the chain. That is, these variants are deprecated awaiting future removal.
MESH-1587: move Alcyone & general genesis identity balances to the bridge #966
modified logic
- Genesis identities in dev and testnet configurations are changed a bit to more closely resemble the ITN config.
MESH-1623: add memo field to portfolio #1004
new features
- Add optional memo field to
portfolio.move_portfolio_funds
. Each asset moved can have a memo added to the move.
modified API
- Add memo field (
Option<Memo>
) toMovePortfolioItem
struct. - Add memo field to
MovedBetweenPortfolios
event.
modified logic
- Each asset that is moved between portfolios can have a memo attached to the move action.
MESH-1620: refactor #1011
This is a refactor of the batch functions in the utility pallet. No logic was changed. The main goal is to decrease duplicate code.
ExternalAgents: Fix schema + fn agent_permissions #1012
modified API
- Fixed bug in schema,
Meta
->ExceptMeta
modified logic
- Fixed bug in
fn agent_permissions
forExceptMeta
MESH-1619: Allow rescheduling failed Settlements #996
new features
- Event
InstructionRescheduled
- Errors
InstructionNotFailed
andUnknownInstruction
- Extrinsic
Settlement::reschedule_instruction
modified API
Settlement::reject_instruction
only takes instruction_id as an argument
modified logic
- Instructions are no longer pruned upon failure and instead go into a
Failed
state.
MESH-1621: Script to create snapshot of all user balances #1000
Created a script to get users balances and store them in a CSV file.
To run: enter yarn polyx_balances
from cli folder
MESH-1622: create script to distribute POLYX #1010
How to run script:
cd scripts/cli/util
node <file_name>.js --account <private_key or mnemonic phrase> --amount <amount>
If you are using mnemonic phrase as the account wrap it in quotes.
MESH-1620: improve batch functions (EventCounts, ErrorAt) #1003
new features
- batch functions return number of events emitted from each call.
modified API
- Changed
BatchInterrupted
,BatchOptimisticFailed
andBatchCompleted
events to include a vector of event counts. - Wrap the call index and error in a
ErrorAt
type. This changesBatchInterrupted
andBatchOptimisticFailed
.
MESH-1638: Add a reverse map to allow an easy lookup from IdentityId to list of assets for which the identity is an EA #1021
new features
- External agents now has a mapping for Agents to what tickers they are agents for. This is available in
ExternalAgents::AgentOf
map (IdentityId, Ticker) => ().