Skip to content
Unverified Commit 0524aa51 authored by Francisco Aguirre's avatar Francisco Aguirre Committed by GitHub
Browse files

XCM builder pattern (#2107)



Added a proc macro to be able to write XCMs using the builder pattern.
This means we go from having to do this:

```rust
let message: Xcm<()> = Xcm(vec![
  WithdrawAsset(assets),
  BuyExecution { fees: asset, weight_limit: Unlimited },
  DepositAsset { assets, beneficiary },
]);
```

to this:

```rust
let message: Xcm<()> = Xcm::builder()
  .withdraw_asset(assets)
  .buy_execution(asset, Unlimited),
  .deposit_asset(assets, beneficiary)
  .build();
```

---------

Co-authored-by: default avatarKeith Yeung <[email protected]>
Co-authored-by: command-bot <>
parent 8ebb5c33
Pipeline #410956 passed with stages
in 52 minutes and 3 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment