Skip to content

Move .sol file to polymesh precompiles - #1982

Merged
Neopallium merged 4 commits into
developfrom
polymesh-precompiles
Jul 30, 2026
Merged

Move .sol file to polymesh precompiles#1982
Neopallium merged 4 commits into
developfrom
polymesh-precompiles

Conversation

@HenriqueNogara

@HenriqueNogara HenriqueNogara commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

changelog

Other

  • Moves .sol file to polymesh_precompiles;
  • Rename interface;
  • Add type precompiles for runtimes;

@HenriqueNogara
HenriqueNogara marked this pull request as ready for review July 29, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Not ready to approve

The new precompiles crate currently has build-blocking visibility/workspace-dependency issues (private sol! module usage and workspace = true dependency usage outside workspace membership).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR splits the Solidity ABI definitions into a new polymesh-precompiles crate and updates the runtime/pallet wiring so the pallet precompile implementation (pallet-precompiles) consumes the generated Alloy call/event types, with runtimes selecting the configured precompiles via a Precompiles type alias.

Changes:

  • Introduces a new precompiles/ crate to host Solidity interfaces and generate Rust bindings via alloy_core::sol!.
  • Renames the precompile pallet crate to pallet-precompiles and updates runtime crates to define type Precompiles = (...).
  • Updates the pallet precompile implementation to use polymesh_precompiles::IFungibleAsset* generated types instead of locally generating bindings.
File summaries
File Description
precompiles/src/lib.rs New crate entrypoint generating/re-exporting Alloy Solidity bindings.
precompiles/src/interfaces/IFungibleAsset.sol Renames Solidity interface to IFungibleAsset.
precompiles/Cargo.toml New crate manifest for polymesh-precompiles.
pallets/runtime/tests/src/storage.rs Adds runtime-level Precompiles type alias for tests runtime.
pallets/runtime/tests/Cargo.toml Switches dependency from old precompiles crate name to pallet-precompiles.
pallets/runtime/testnet/src/runtime.rs Adds runtime-level Precompiles type alias.
pallets/runtime/testnet/Cargo.toml Switches dependency from old precompiles crate name to pallet-precompiles (incl. features).
pallets/runtime/mainnet/src/runtime.rs Adds runtime-level Precompiles type alias.
pallets/runtime/mainnet/Cargo.toml Switches dependency from old precompiles crate name to pallet-precompiles (incl. features).
pallets/runtime/develop/src/runtime.rs Adds runtime-level Precompiles type alias.
pallets/runtime/develop/Cargo.toml Switches dependency from old precompiles crate name to pallet-precompiles (incl. features).
pallets/runtime/common/src/runtime.rs Uses the runtime-provided Precompiles alias for pallet_revive::Config.
pallets/precompiles/src/lib.rs Re-exports the renamed precompile interface type.
pallets/precompiles/src/interface/polymesh_specific.rs Migrates polymesh-specific calls/events to IFungibleAsset generated types.
pallets/precompiles/src/interface/mod.rs Swaps precompile dispatch interface from old generated types to IFungibleAssetCalls.
pallets/precompiles/src/interface/erc20.rs Migrates ERC20 call/event encoding to IFungibleAsset generated types.
pallets/precompiles/Cargo.toml Renames crate to pallet-precompiles and adds dependency on new polymesh-precompiles crate.
Cargo.toml Renames workspace dep polymesh-precompilespallet-precompiles, adds new polymesh-precompiles path dep, adds alloy-core.
Cargo.lock Updates lockfile for new/renamed crates and dependency graph changes.
Review details
  • Files reviewed: 18/19 changed files
  • Comments generated: 2
  • Review effort level: Low

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread precompiles/Cargo.toml
Comment thread precompiles/src/lib.rs
@Neopallium
Neopallium merged commit 6b51d0b into develop Jul 30, 2026
18 checks passed
@Neopallium
Neopallium deleted the polymesh-precompiles branch July 30, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants