mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-06 14:57:27 +00:00
0524aa51d3
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: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: command-bot <>
21 lines
376 B
TOML
21 lines
376 B
TOML
[package]
|
|
name = "xcm-procedural"
|
|
description = "Procedural macros for XCM"
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
version = "1.0.0"
|
|
publish = true
|
|
|
|
[lib]
|
|
proc-macro = true
|
|
|
|
[dependencies]
|
|
proc-macro2 = "1.0.56"
|
|
quote = "1.0.28"
|
|
syn = "2.0.38"
|
|
Inflector = "0.11.4"
|
|
|
|
[dev-dependencies]
|
|
trybuild = { version = "1.0.74", features = ["diff"] }
|