Refactor: Move all precompiles into crates/{pallet}/precompiles/ folder#307
Open
danielbui12 wants to merge 3 commits into
Open
Refactor: Move all precompiles into crates/{pallet}/precompiles/ folder#307danielbui12 wants to merge 3 commits into
crates/{pallet}/precompiles/ folder#307danielbui12 wants to merge 3 commits into
Conversation
danielbui12
commented
Jul 22, 2026
Member
- Move the three pallet_revive precompile crates under crates/precompiles/, dropping the redundant -precompile directory suffix (package names unchanged)
- Update workspace members and path dependencies in the root Cargo.toml
- Move the three pallet_revive precompile crates under crates/precompiles/, dropping the redundant -precompile directory suffix (package names unchanged) - Update workspace members and path dependencies in the root Cargo.toml - Update license-header globs and path references in CONTRIBUTING.md, CLAUDE.md, docs/design/smart-contracts.md, and examples/contracts/README.md
bkontur
requested changes
Jul 22, 2026
bkontur
left a comment
Collaborator
There was a problem hiding this comment.
@danielbui12 I am checking, how we did precompiles in Polkadot SDK, and I would like to keep the same pattern here and align those:
- Keep precompiles next to their pallet — in polkadot-sdk each precompile crate sits in a precompiles/ folder right beside the pallet it wraps (frame/assets/precompiles, frame/vesting/precompiles, xcm/pallet-xcm/precompiles), rather than all bundled in one central spot. If these belong to a specific pallet, popping them next to it keeps us consistent. (If they're genuinely standalone, a shared crates/precompiles/ is totally fine — just flagging the upstream habit.)
- .sol location — upstream keeps the interface either at the crate root or in src/interface/ (like pallet-xcm/precompiles/src/interface/IXcm.sol). We're putting it straight in src/, so maybe move it to src/interface/I*.sol to match?
wdyt?
Everything else already matches nicely (package names, the lib.rs/mock.rs/tests.rs layout, etc).
Member
Author
|
@bkontur I'm okay with it, let's follow polkadot-sdk pattern |
- Relocate the three precompile crates from crates/precompiles/* to crates/pallets/*/precompiles/ - Move Solidity interface files into a src/interface/ subfolder and update the alloy::sol! paths - Update workspace members and dependency paths in the root Cargo.toml - Update directory references in CLAUDE.md, CONTRIBUTING.md, docs/design/smart-contracts.md, and examples/contracts/README.md - Adjust licenserc.apache.toml include patterns for the new layout
crates/precompiles/ foldercrates/{pallet}/precompiles/ folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.