Skip to content

test(asset-registry): register xcFOON from Taifoon - #1485

Closed
yawningmonsoon wants to merge 1 commit into
galacticcouncil:masterfrom
yawningmonsoon:add-taifoon-xcfoon-test
Closed

test(asset-registry): register xcFOON from Taifoon#1485
yawningmonsoon wants to merge 1 commit into
galacticcouncil:masterfrom
yawningmonsoon:add-taifoon-xcfoon-test

Conversation

@yawningmonsoon

Copy link
Copy Markdown

Summary

Adds an integration test for accepting xcFOON — the native currency of Taifoon (a Polkadot parachain, Moonbeam fork) — into Hydration's asset registry.

Draft. Taifoon is not yet registered on Polkadot, so TAIFOON_PARA_ID is a placeholder (3369) pending its real reserved para id. In production the actual integration is not a code change — it's an on-chain assetRegistry.register submitted via a GeneralAdmin OpenGov referendum. This PR adds the test that mirrors that call so the round-trip is covered in CI.

The multilocation (the load-bearing detail)

Taifoon is a Moonbeam fork, so xcFOON uses the Moonbeam-family shape — PalletInstance(10) (Balances/native, 18 decimals), not GeneralIndex:

AssetLocation(Location {
    parents: 1,
    interior: [Parachain(TAIFOON_PARA_ID), PalletInstance(10)].into(),
})

Changes

  • integration-tests/src/polkadot_test_net.rs: TAIFOON_PARA_ID const (placeholder).
  • integration-tests/src/asset_registry.rs: root_should_register_xcfoon_from_taifoon — registers xcFOON via AssetRegistry::register (18 decimals, AssetType::Token) and asserts location_assets / locations round-trip. Mirrors the existing root_should_update_location_when_asset_exists pattern and the AssetType usage in evm.rs.

Also required for full integration (relay-chain governance, not this repo): bidirectional HRMP Taifoon↔Hydration via hrmp.hrmpInitOpenChannel/hrmpAcceptOpenChannel.

…ive asset)

Adds an integration test for accepting Taifoon's native currency (xcFOON) on
Hydration. Taifoon is a Moonbeam fork, so xcFOON uses the Moonbeam-family
multilocation shape { parents:1, X2(Parachain(TAIFOON_PARA_ID), PalletInstance(10)) }
(PalletInstance 10 = Balances / native token, 18 decimals) — not GeneralIndex.

The test asserts the assetRegistry.register → location↔asset round-trip, mirroring
root_should_update_location_when_asset_exists. In production this same register call
is submitted via a GeneralAdmin OpenGov referendum (no runtime change needed).

TAIFOON_PARA_ID is a placeholder (3369) until Taifoon reserves its real Polkadot para id.
@yawningmonsoon

Copy link
Copy Markdown
Author

Closing to complete internal review first — Taifoon's para id isn't reserved yet (the test uses a placeholder). Will reopen when the real para id + HRMP are in place. Apologies for the premature draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant