referrerpolicy=no-referrer-when-downgrade

Module IXcm

Source
Expand description

@title XCM Precompile Interface @notice A low-level interface for interacting with pallet_xcm. It forwards calls directly to the corresponding dispatchable functions, providing access to XCM execution and message passing. @dev Documentation: @dev - XCM: https://docs.polkadot.com/develop/interoperability @dev - SCALE codec: https://docs.polkadot.com/polkadot-protocol/parachain-basics/data-encoding @dev - Weights: https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/fees/#transactions-weights-and-fees

interface IXcm {
    struct Weight { uint64 refTime; uint64 proofSize; }
    function execute(bytes calldata message, Weight calldata weight) external;
    function send(bytes calldata destination, bytes calldata message) external;
    function weighMessage(bytes calldata message) external view returns (Weight memory weight);
}

Structs§

Weight
@notice Weight v2 used for measurement for an XCM execution
executeCall
@notice Executes an XCM message locally on the current chain with the caller’s origin. @dev Internally calls pallet_xcm::execute. @param message A SCALE-encoded Versioned XCM message. @param weight The maximum allowed Weight for execution. @dev Call @custom:function weighMessage(message) to ensure sufficient weight allocation. Function with signature execute(bytes,(uint64,uint64)) and selector 0xd3b7e04d.
executeReturn
@notice Executes an XCM message locally on the current chain with the caller’s origin. @dev Internally calls pallet_xcm::execute. @param message A SCALE-encoded Versioned XCM message. @param weight The maximum allowed Weight for execution. @dev Call @custom:function weighMessage(message) to ensure sufficient weight allocation. Container type for the return parameters of the execute(bytes,(uint64,uint64)) function.
sendCall
@notice Sends an XCM message to another parachain or consensus system. @dev Internally calls pallet_xcm::send. @param destination SCALE-encoded destination MultiLocation. @param message SCALE-encoded Versioned XCM message. Function with signature send(bytes,bytes) and selector 0x7f0a3bf9.
sendReturn
@notice Sends an XCM message to another parachain or consensus system. @dev Internally calls pallet_xcm::send. @param destination SCALE-encoded destination MultiLocation. @param message SCALE-encoded Versioned XCM message. Container type for the return parameters of the send(bytes,bytes) function.
weighMessageCall
@notice Estimates the Weight required to execute a given XCM message. @param message SCALE-encoded Versioned XCM message to analyze. @return weight Struct containing estimated refTime and proofSize. Function with signature weighMessage(bytes) and selector 0x47400c23.
weighMessageReturn
@notice Estimates the Weight required to execute a given XCM message. @param message SCALE-encoded Versioned XCM message to analyze. @return weight Struct containing estimated refTime and proofSize. Container type for the return parameters of the weighMessage(bytes) function.

Enums§

IXcmCalls
Container for all the IXcm function calls.