Skip to content

Commit b59171e

Browse files
mattheworrisenddynayn
authored andcommitted
feat(bridging): Add pallet-assets (#2354)
In order to **teleport Frequency tokens to AssetHub**, we need a way to pay the execution fee on **AssetHub otherwise it will reject the request** and treat the tokens as **trapped assets**. Since **AssetHub does not accept Frequency** as payment for execution fees, we must also include DOT in the message to cover those fees. To support this, Frequency must be able to handle DOT as an asset — both to receive DOT from AssetHub and to **send DOT back out**. issue-2354
1 parent 2379aea commit b59171e

File tree

11 files changed

+1147
-31
lines changed

11 files changed

+1147
-31
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt
7878
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false }
7979
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false }
8080

81+
# Bridging Pallets
82+
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false }
83+
8184
# polkadot
8285
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" }
8386
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false }

Makefile

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ all: build
88
clean:
99
cargo clean
1010

11-
.PHONY: start start-frequency start-frequency-docker start-manual start-interval start-interval-short start-with-offchain start-frequency-with-offchain start-manual-with-offchain start-interval-with-offchain
11+
.PHONY: start start-bridging start-bridging-westend start-frequency start-frequency-docker start-manual start-interval start-interval-short start-with-offchain start-frequency-with-offchain start-manual-with-offchain start-interval-with-offchain
1212
start:
1313
./scripts/init.sh start-frequency-instant
1414

15+
start-bridging:
16+
./scripts/init.sh start-frequency-instant-bridging
17+
18+
start-bridging-westend:
19+
./scripts/init.sh start-frequency-westend-bridging
20+
1521
start-paseo-relay:
1622
./scripts/init.sh start-paseo-relay-chain
1723

@@ -90,7 +96,7 @@ register:
9096
onboard:
9197
./scripts/init.sh onboard-frequency-paseo-local
9298

93-
.PHONY: onboard-res-local
99+
.PHONY: onboard-debug
94100
onboard-debug:
95101
./scripts/init.sh onboard-res-local
96102

@@ -244,7 +250,11 @@ docs:
244250
docker-prune:
245251
./scripts/prune_all.sh
246252

247-
.PHONY: check check-no-relay check-local check-testnet check-mainnet
253+
.PHONY: check check-no-relay check-local check-testnet check-mainnet check-bridging
254+
# Add a target to run all checks to check that all existing features work with the addition of 'frequency-bridging'
255+
# which is an add-on feature and not mutually exclusive with the other features.
256+
check-all: check check-no-relay check-local check-testnet check-mainnet check-bridging
257+
248258
check:
249259
SKIP_WASM_BUILD= cargo check --features runtime-benchmarks,frequency-lint-check
250260

@@ -260,11 +270,20 @@ check-testnet:
260270
check-mainnet:
261271
SKIP_WASM_BUILD= cargo check --features frequency
262272

273+
check-bridging:
274+
SKIP_WASM_BUILD= cargo check --features frequency,frequency-bridging
275+
SKIP_WASM_BUILD= cargo check --features frequency-testnet,frequency-bridging
276+
SKIP_WASM_BUILD= cargo check --features frequency-local,frequency-bridging
277+
278+
263279
.PHONY: js
264280
js:
265281
./scripts/generate_js_definitions.sh
266282

267-
.PHONY: build build-benchmarks build-no-relay build-local build-testnet build-mainnet build-testnet-release build-mainnet-release
283+
.PHONY: build build-benchmarks build-no-relay build-local build-testnet build-mainnet build-testnet-release build-mainnet-release build-bridging-mainnet build-bridging-westend build-all
284+
285+
build-all: build build-benchmarks build-no-relay build-local build-testnet build-mainnet build-testnet-release build-mainnet-release build-bridging-mainnet build-bridging-westend
286+
268287
build:
269288
cargo build --features frequency-no-relay
270289

@@ -289,6 +308,12 @@ build-testnet-release:
289308
build-mainnet-release:
290309
cargo build --locked --features frequency --release
291310

311+
build-bridging-mainnet:
312+
cargo build --features frequency,frequency-bridging
313+
314+
build-bridging-westend:
315+
cargo build --features frequency-local,frequency-bridging
316+
292317
.PHONY: test e2e-tests e2e-tests-serial e2e-tests-only e2e-tests-load e2e-tests-load-only e2e-tests-testnet-paseo e2e-tests-paseo-local
293318
test:
294319
cargo test --workspace --features runtime-benchmarks,frequency-lint-check

runtime/common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ frequency-testnet = []
5050
frequency-local = []
5151
frequency-no-relay = []
5252
runtime-benchmarks = ["pallet-collective/runtime-benchmarks"]
53+
frequency-bridging = []
5354
std = [
5455
"frame-support/std",
5556
"frame-system/std",

0 commit comments

Comments
 (0)