[XCM Precompile] Rename functions and improve docs in the Solidity interface#9023
Merged
[XCM Precompile] Rename functions and improve docs in the Solidity interface#9023
Conversation
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
Contributor
Author
|
/cmd prdoc --audience runtime_user --bump minor |
…time_user --bump minor'
sphamjoli
requested changes
Jun 30, 2025
sphamjoli
reviewed
Jul 1, 2025
sphamjoli
reviewed
Jul 1, 2025
sphamjoli
reviewed
Jul 1, 2025
sphamjoli
approved these changes
Jul 1, 2025
acatangiu
approved these changes
Jul 2, 2025
ordian
added a commit
that referenced
this pull request
Jul 24, 2025
* master: (91 commits) Add extra information to the harmless error logs during validate_transaction (#9047) `sp-tracing`: Remove `test-utils` feature (#9063) add try-state check for staking roles -- staker cannot be nominator a… (#9034) net/discovery: File persistence for `AddrCache` (#8839) dispute-coordinator: handle race with offchain disabling (#9050) Align parameters for `EventEmitter::emit_sent_event` (#9057) Fetch parent block `api_version` (#9059) [XCM Precompile] Rename functions and improve docs in the Solidity interface (#9023) Cleanup and improvements for `ControlledValidatorIndices` (#8896) reenable 0001-parachains-pvf (#9046) Add optional auto-rebag within on-idle (#8684) Fix flaxy 0003-block-building-warp-sync test - one more approach (#8974) [Staking] [AHM] Fixes insufficient slashing of nominators (and some other small issues). (#8937) chore: Bump bounded-collections dep (#9004) XCMP and DMP improvements (#8860) EPMB/unsigned: fixed multi-page winner computation (#8987) Always send full parent header, not only hash, part of collation response (#8939) revive: Precompiles should return dummy code when queried (#9001) Fix confusing log messages in network protocol behaviour (#8819) Fix pallet_migrations benchmark when FailedMigrationHandler emits events (#8694) ...
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
…terface (#9023) This PR changes the function names on the XCM Precompile from `xcmExecute` and `xcmSend` to `execute` and `send`, respectively. This is a breaking change because it modifies the ABI-encoded function selectors, which are calculated using `bytes4(keccak256(FUNCTION_SIGNATURE))`. `bytes4(keccak256("xcmSend(bytes,bytes)"))` -> `0xc0addb55` is going to be now `bytes4(keccak256("send(bytes,bytes)"))` -> `0x7f0a3bf9` `bytes4(keccak256("xcmExecute(bytes,(uint64,uint64)))"))` => `0x377df829` is going to be now `bytes4(keccak256("execute(bytes,(uint64,uint64)))"))` => `0xd3b7e04d` It also adds new documentation to the precompile, directing developers to the official Polkadot XCM documentation. Additionally, it explicitly sets return values for both functions to clarify that the return value matches what is returned by `pallet_xcm::send()` and `pallet_xcm::execute()`. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Siphamandla Mjoli <brianm445@yahoo.com>
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.
This PR changes the function names on the XCM Precompile from
xcmExecuteandxcmSendtoexecuteandsend, respectively. This is a breaking change because it modifies the ABI-encoded function selectors, which are calculated usingbytes4(keccak256(FUNCTION_SIGNATURE)).bytes4(keccak256("xcmSend(bytes,bytes)"))->0xc0addb55is going to be now
bytes4(keccak256("send(bytes,bytes)"))->0x7f0a3bf9bytes4(keccak256("xcmExecute(bytes,(uint64,uint64)))"))=>0x377df829is going to be now
bytes4(keccak256("execute(bytes,(uint64,uint64)))"))=>0xd3b7e04dIt also adds new documentation to the precompile, directing developers to the official Polkadot XCM documentation. Additionally, it explicitly sets return values for both functions to clarify that the return value matches what is returned by
pallet_xcm::send()andpallet_xcm::execute().