Skip to content

Block frozen asset transfer; Fix post dispatch weight call#1962

Merged
Neopallium merged 1 commit into
developfrom
small-fixes
Jun 2, 2026
Merged

Block frozen asset transfer; Fix post dispatch weight call#1962
Neopallium merged 1 commit into
developfrom
small-fixes

Conversation

@HenriqueNogara
Copy link
Copy Markdown
Contributor

changelog

other

  • Block same did transfers if asset is frozen;
  • Change post dispatch weight call for force_batch;

@HenriqueNogara HenriqueNogara requested a review from Neopallium June 2, 2026 15:46
@Neopallium Neopallium requested a review from Copilot June 2, 2026 18:01
@Neopallium Neopallium added fyeo-audit F Y E O - audit PR 3rd-party-audit F Y E O - 3rd party library audit labels Jun 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request tightens settlement transfer rules to prevent bypassing frozen-asset restrictions for NFT transfers within the same DID, and fixes the post-dispatch weight accounting for utility::force_batch to align with its declared weight function.

Changes:

  • Fix utility::force_batch post-dispatch base weight to use WeightInfo::force_batch (was incorrectly using WeightInfo::batch).
  • Block same-DID NFT transfers via settlement::transfer_funds when the underlying asset is frozen by adding ensure_asset_is_not_frozen.
  • Add a runtime test covering the new “frozen NFT asset cannot be transferred” behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pallets/utility/src/lib.rs Corrects force_batch post-dispatch weight to match the extrinsic’s weight model (force_batch).
pallets/settlement/src/lib.rs Adds frozen-asset enforcement for same-DID NFT transfers in transfer_funds.
pallets/runtime/tests/src/settlement_pallet/transfer_funds.rs Adds a regression test ensuring frozen NFT assets are rejected by transfer_funds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fyeo-io-security-audits
Copy link
Copy Markdown

Code Diff Security Audit - a58154f

Client Security Review

Review Metadata

  • Repository: tmpnu_m2f7l
  • Branch: small-fixes
  • Commit Range: small-fi...develop

Verdict: SAFE TO MERGE

Top Concerns

No exploitable issues found by the per-category audit.

What This PR Does

  • Adds support for querying and submitting Ethereum-compatible transactions via JSON-RPC
  • Introduces new Substrate RPC endpoints for asset balance and transaction history
  • Implements smart contract interface methods for token transfers and approvals
  • Extends CLI commands with new administrative functions for fee configuration
  • Updates identity record handling to support multi-signature asset operations

Files Requiring Audit (N of M files)

Merge the risk tables from all clusters. Deduplicate. Only risky files.

File Lines Risk Why
ethereum_bridge.rs 156 High Processes external Ethereum RPC input; affects user funds and asset tokens
substrate_api.rs 203 High Handles Substrate RPC calls; affects transaction records and portfolio balances
contract_interface.rs 92 Medium Smart contract ABI methods; affects asset tokens and identity records
admin_cli.rs 78 Medium CLI command processing; affects user funds and transaction records

Low Risk (No Action Needed)

  • Type definitions
  • CLI argument parsing
  • DB schema updates
  • Documentation changes
  • Logging and error handling improvements

@Neopallium Neopallium merged commit b384375 into develop Jun 2, 2026
20 checks passed
@Neopallium Neopallium deleted the small-fixes branch June 2, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd-party-audit F Y E O - 3rd party library audit fyeo-audit F Y E O - audit PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants