github PolymeshAssociation/Polymesh v8.1.3

pre-release2 hours ago

Overview

This patch release adds dedicated NFT controller transfer events, tightens validation across compliance, settlement, asset freezing and the relayer, and makes PIP voting and multisig approval cheaper and more accurately weighted. It also improves precompile weights and benchmarks, and updates to Substrate stable2603-7.

Runtime spec_version: 8_001_030


New Events

  • nft.ControllerTransfer { caller_did, nfts, source, destination }: emitted by nft::controller_transfer, after NFTHoldingsUpdated (#2019)
  • nft.ControllerTransferTo { caller_did, nfts, source, destination }: emitted by nft::controller_transfer_to, after NFTHoldingsUpdated (#2019)

New Errors

  • ComplianceManager::EmptyClaimsInCondition (#2017)
  • ComplianceManager::TooManyTrustedIssuers (#2013)
  • ComplianceManager::TooManyTrustedIssuerClaimTypes (#2013)
  • Settlement::EmptyAffirmation (#2017)
  • Relayer::NestingNotAllowed (#2022)

New Constants

  • ComplianceManager::MaximumNumberOfTrustedIssuers = 8 (#2013)
  • ComplianceManager::MaxTrustedIssuerClaimTypes = 16 (#2013)

Storage Changes

  • Pips: new ProposalProposers storage map (PipId → Proposer). Voting and committee checks now read the proposer from it instead of decoding the full proposal. The storage version goes from 2 to 3, and a runtime migration fills the map from the existing Proposals (#2017)
  • Relayer: new RelayReentry storage value, used as a reentry guard for relay_tx (#2022)

Bug Fixes

Compliance

  • Adding or updating a compliance requirement now rejects IsAnyOf/IsNoneOf conditions with an empty claim list (#2017)
  • The number of trusted issuers and trusted issuer claim types are now capped by dedicated constants instead of the generic length limit (#2013)

Settlement

  • Affirming with receipts now rejects instructions that underestimate the number of off-chain receipts before verifying them (#2017)
  • Affirming with an empty holder set is now rejected (EmptyAffirmation), unless receipts are provided (#2017)
  • Pruning an instruction now also cancels its scheduled execution task (#2017)
  • transfer_funds now checks that the destination is a valid holder (#2017)
  • Same-DID transfer_funds now checks secondary key portfolio permissions on the destination portfolio (#2022)

Asset Freezing

  • set_holder_frozen now check that the target holder (DID or portfolio) is valid (#2017, #2022)

NFT

  • issue_nft now enforces AssetMetadataValueMaxLength on every metadata value (#2013)
  • The tokenURI precompile function now reverts if the NFT does not exist (#2017)

Relayer

  • Nested relay_tx calls are now rejected, however the inner call is dispatched (e.g. through a multisig proposal) (#2022)

STO

  • invest now handles instructions where the investor has no portfolios left to affirm, executing the instruction directly (#2017)

Precompiles

  • canTransfer, canSend and canReceive can now revert with Benchmarked weight limit exceeded

Weight Changes

  • MultiSig::approve now includes the cost of decoding the proposal. If max_weight is too low, the call fails with MaxWeightTooLow. (#2020)
  • Fixed the weight of the ERC-7943 canTransfer precompile functions for fungible and non-fungible assets (#2013)
  • The tokenURI precompile now uses a benchmarked weight instead of a fixed read count (#2022)
  • Improved compliance, NFT, precompile and settlement benchmarks, and regenerated weights for asset, compliance manager, multisig, NFT, PIPs, portfolio, relayer, settlement and STO (#2013, #2017, #2020, #2022)

Other Changes

  • Updated to Substrate stable2603-7 (#2016)
  • Added a spec note on NFT controller transfer events in docs/spec/04-asset-lifecycle.md (#2019)

Don't miss a new Polymesh release

NewReleases is sending notifications on new releases.