From 379ea27741f5fb7309c8b3ea70c18e67923459a6 Mon Sep 17 00:00:00 2001 From: Deepanshu Hooda Date: Sun, 1 Oct 2023 16:39:58 +0530 Subject: [PATCH] typo fix and refactor --- precompiles/utils/src/data.rs | 7 +------ precompiles/xcm/XCM_v2.sol | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/precompiles/utils/src/data.rs b/precompiles/utils/src/data.rs index ed80a99c0d..3d4c1242cd 100644 --- a/precompiles/utils/src/data.rs +++ b/precompiles/utils/src/data.rs @@ -175,11 +175,6 @@ impl<'a> EvmDataReader<'a> { }) } - /// Return Option<&[u8]> from a given range for EvmDataReader - pub fn get_input_from_range(&self, range: Range) -> Option<&[u8]> { - self.input.get(range) - } - /// Read remaining bytes pub fn read_till_end(&mut self) -> EvmResult<&[u8]> { let range = self.move_cursor(self.input.len() - self.cursor)?; @@ -195,7 +190,7 @@ impl<'a> EvmDataReader<'a> { /// Move the reading cursor with provided length, and return a range from the previous cursor /// location to the new one. /// Checks cursor overflows. - pub fn move_cursor(&mut self, len: usize) -> EvmResult> { + fn move_cursor(&mut self, len: usize) -> EvmResult> { let start = self.cursor; let end = self .cursor diff --git a/precompiles/xcm/XCM_v2.sol b/precompiles/xcm/XCM_v2.sol index 9f83747e58..a87ebfa554 100644 --- a/precompiles/xcm/XCM_v2.sol +++ b/precompiles/xcm/XCM_v2.sol @@ -39,7 +39,7 @@ interface XCM { /** * @dev Execute a transaction on a remote chain. * @param destination - Multilocation of destination chain - * @param payment_asset_id - ETH address of the local asset derivate used to pay for execution in the destination chain + * @param payment_asset_id - Address of the local asset derivate used to pay for execution in the destination chain * @param payment_amount - amount of payment asset to use for execution payment - should cover cost of XCM instructions + Transact call weight. * @param call - encoded call data (must be decodable by remote chain) * @param transact_weight - max weight that the encoded call is allowed to consume in the destination chain