mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-08 00:47:22 +00:00
b3841b6b71
Adding on top of the new builder pattern for creating XCM programs, I'm adding some more APIs: ```rust let paying_fees: Xcm<()> = Xcm::builder() // Only allow paying for fees .withdraw_asset() // First instruction has to load the holding register .buy_execution() // Second instruction has to be `buy_execution` .build(); let paying_fees_invalid: Xcm<()> = Xcm::builder() .withdraw_asset() .build(); // Invalid, need to pay for fees let not_paying_fees: Xcm<()> = Xcm::builder_unpaid() .unpaid_execution() // Needed .withdraw_asset() .deposit_asset() .build(); let all_goes: Xcm<()> = Xcm::builder_unsafe() // You can do anything .withdraw_asset() .deposit_asset() .build(); ``` The invalid bits are because the methods don't even exist on the types that you'd want to call them on. --------- Co-authored-by: command-bot <>
22 lines
423 B
TOML
22 lines
423 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"] }
|
|
xcm = { package = "staging-xcm", path = ".." }
|