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 bynft::controller_transfer, afterNFTHoldingsUpdated(#2019)nft.ControllerTransferTo { caller_did, nfts, source, destination }: emitted bynft::controller_transfer_to, afterNFTHoldingsUpdated(#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: newProposalProposersstorage 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 existingProposals(#2017)Relayer: newRelayReentrystorage value, used as a reentry guard forrelay_tx(#2022)
Bug Fixes
Compliance
- Adding or updating a compliance requirement now rejects
IsAnyOf/IsNoneOfconditions 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_fundsnow checks that the destination is a valid holder (#2017)- Same-DID
transfer_fundsnow checks secondary key portfolio permissions on the destination portfolio (#2022)
Asset Freezing
NFT
issue_nftnow enforcesAssetMetadataValueMaxLengthon every metadata value (#2013)- The
tokenURIprecompile function now reverts if the NFT does not exist (#2017)
Relayer
- Nested
relay_txcalls are now rejected, however the inner call is dispatched (e.g. through a multisig proposal) (#2022)
STO
investnow handles instructions where the investor has no portfolios left to affirm, executing the instruction directly (#2017)
Precompiles
canTransfer,canSendandcanReceivecan now revert with Benchmarked weight limit exceeded
Weight Changes
MultiSig::approvenow includes the cost of decoding the proposal. Ifmax_weightis too low, the call fails withMaxWeightTooLow. (#2020)- Fixed the weight of the ERC-7943
canTransferprecompile functions for fungible and non-fungible assets (#2013) - The
tokenURIprecompile 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)