Skip to content

Commit

Permalink
add fee description and other fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gitofdeepanshu committed Oct 4, 2023
1 parent 20893c8 commit 3447d5f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion precompiles/xcm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "pallet-evm-precompile-xcm"
description = "Basic XCM support for EVM."
version = "0.9.1"
version = "0.10.0"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions precompiles/xcm/XCM_v2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ interface XCM {
/// @dev The token transfer burns/transfers the corresponding amount before sending
/// @param currencyAddress The ERC20 address of the currency we want to transfer
/// @param amount The amount of tokens we want to transfer
/// @param fee The amount to be spent to pay for execution in destination chain
/// @param destination The Multilocation to which we want to send the tokens
/// @param weight The weight we want to buy in the destination chain, to set the
/// weightlimit to Unlimited, you should use the value 0 for ref_time
Expand Down Expand Up @@ -82,6 +83,7 @@ interface XCM {
/// @param asset The asset we want to transfer, defined by its multilocation.
/// Currently only Concrete Fungible assets
/// @param amount The amount of tokens we want to transfer
/// @param fee The amount to be spent to pay for execution in destination chain
/// @param destination The Multilocation to which we want to send the tokens
/// @param weight The weight we want to buy in the destination chain, to set the
/// weightlimit to Unlimited, you should use the value 0 for ref_time
Expand Down
14 changes: 7 additions & 7 deletions precompiles/xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ where

fn send_xcm(handle: &mut impl PrecompileHandle) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(3)?;
input.expect_arguments(2)?;

// Raw call arguments
let dest: MultiLocation = input.read::<MultiLocation>()?;
Expand Down Expand Up @@ -475,7 +475,7 @@ where

fn transfer(handle: &mut impl PrecompileHandle) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(5)?;
input.expect_arguments(4)?;

// Read call arguments
let currency_address = input.read::<Address>()?;
Expand Down Expand Up @@ -518,7 +518,7 @@ where

fn transfer_with_fee(handle: &mut impl PrecompileHandle) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(6)?;
input.expect_arguments(5)?;

// Read call arguments
let currency_address = input.read::<Address>()?;
Expand Down Expand Up @@ -567,7 +567,7 @@ where

fn transfer_multiasset(handle: &mut impl PrecompileHandle) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(5)?;
input.expect_arguments(4)?;

// Read call arguments
let asset_location = input.read::<MultiLocation>()?;
Expand Down Expand Up @@ -611,7 +611,7 @@ where
handle: &mut impl PrecompileHandle,
) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(6)?;
input.expect_arguments(5)?;

// Read call arguments
let asset_location = input.read::<MultiLocation>()?;
Expand Down Expand Up @@ -660,7 +660,7 @@ where
handle: &mut impl PrecompileHandle,
) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(5)?;
input.expect_arguments(4)?;

let currencies: Vec<_> = input
.read::<BoundedVec<Currency, GetMaxAssets<Runtime>>>()?
Expand Down Expand Up @@ -716,7 +716,7 @@ where

fn transfer_multi_assets(handle: &mut impl PrecompileHandle) -> EvmResult<PrecompileOutput> {
let mut input = handle.read_input()?;
input.expect_arguments(5)?;
input.expect_arguments(4)?;

let assets: Vec<_> = input
.read::<BoundedVec<EvmMultiAsset, GetMaxAssets<Runtime>>>()?
Expand Down

0 comments on commit 3447d5f

Please sign in to comment.