diff --git a/docs/supportedNodes.md b/docs/supportedNodes.md index 8e4dfebd..50712d54 100644 --- a/docs/supportedNodes.md +++ b/docs/supportedNodes.md @@ -9,58 +9,57 @@ ## Polkadot Parachains -| Node name | Website | Github | Polkadot.js | Node id | Supported XCM Pallet | Current latest XCM Version | -| ----------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------- | -------------------- | -------------------------- | -| PolkadotAssetHub | [Website](https://www.parity.io/) | [Github](https://github.com/paritytech/cumulus) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemint.api.onfinality.io%2Fpublic-ws#/explorer) | 1000 | polkadotXCM | XCM V3 | -| Acala | [Website](https://acala.network/) | [Github](https://github.com/AcalaNetwork/Acala) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F1rpc.io%2Faca#/explorer) | 2000 | xTokens | XCM V3 | -| Astar | [Website](https://astar.network/) | [Github](https://github.com/AstarNetwork/Astar) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fastar-rpc.dwellir.com#/explorer) | 2006 | polkadotXCM | XCM V3 | -| BifrostPolkadot | [Website](https://thebifrost.io/) | [Github](https://github.com/bifrost-finance/bifrost) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fhk.p.bifrost-rpc.liebi.com%2Fws#/explorer) | 2030 | xTokens | XCM V3 | -| Centrifuge | [Website](https://centrifuge.io/) | [Github](https://github.com/centrifuge/centrifuge-chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcentrifuge-parachain.api.onfinality.io%2Fpublic-ws#/explorer) | 2031 | xTokens | XCM V3 | -| Clover | [Website](https://clv.org/) | [Github](https://github.com/clover-network/clover) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-para.clover.finance#/explorer) | 2002 | xTokens | XCM V1 | -| ComposableFinance | [Website](https://www.composable.finance/) | [Github](https://github.com/ComposableFi/) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.composable.finance#/explorer) | 2019 | xTokens | XCM V3 | -| Crust | [Website](https://crust.network/?ref=parachains-info) | [Github](https://github.com/crustio/crust) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcrust-parachain.crustapps.net#/explorer) | 2008 | xTokens | XCM V1 | -| Darwinia | [Website](https://darwinia.network/) | [Github](https://github.com/darwinia-network/darwinia) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.darwinia.network#/explorer) | 2046 | polkadotXCM | XCM V3 | -| Equilibrium | [Website](https://equilibrium.io/?ref=parachains-info) | [Github](https://github.com/equilibrium-eosdt/equilibrium-substrate-chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fequilibrium-rpc.dwellir.com#/explorer) | 2011 | polkadotXcm | XCM V3 | -| HydraDX | [Website](https://hydradx.io/) | [Github](https://github.com/galacticcouncil/HydraDX-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.hydradx.cloud#/explorer) | 2034 | xTokens | XCM V3 | -| Interlay | [Website](https://interlay.io/) | [Github](https://github.com/interlay/interbtc) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fapi.interlay.io%2Fparachain#/explorer) | 2032 | xTokens | XCM V3 | -| Kylin | [Website](https://www.kylin.network/) | [Github](https://github.com/Kylin-Network/kylin-collator) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.kylin-node.co.uk#/explorer) | 2052 | ormlXTokens | XCM V1 | -| Litentry | [Website](https://litentry.com/) | [Github](https://github.com/litentry/litentry-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Flitentry-rpc.dwellir.com#/explorer) | 2013 | xTokens | XCM V3 | -| Manta | [Website](https://manta.network/) | [Github](https://github.com/Manta-Network/Manta) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.manta.systems#/explorer) | 2104 | xTokens | XCM V1 | -| Moonbeam | [Website](https://moonbeam.network/) | [Github](https://github.com/PureStake/moonbeam) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmoonbeam.api.onfinality.io%2Fpublic-ws#/explorer) | 2004 | xTokens | XCM V3 | -| Nodle | [Website](https://www.nodle.com) | [Github](https://github.com/NodleCode/chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fnodle-parachain.api.onfinality.io%2Fpublic-ws#/explorer) | 2026 | xTokens | XCM V3 | -| OriginTrail | [Website](https://parachain.origintrail.io/) | [Github](https://github.com/OriginTrail/origintrail-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.origin-trail.network#/explorer) | 2043 | polkadotXCM | XCM V3 | -| Pendulum | [Website](https://pendulumchain.org/) | [Github](https://github.com/pendulum-chain/pendulum-prototype) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-pendulum.prd.pendulumchain.tech#/explorer) | 2094 | xTokens | XCM V1 | -| Polkadex | [Website](https://polkadex.trade/) | [Github](https://github.com/Polkadex-Substrate/Polkadex) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadex-parachain.public.curie.radiumblock.co%2Fws#/explorer) | 2040 | xTokens | XCM V3 | -| Parallel | [Website](https://parallel.fi/) | [Github](https://github.com/parallel-finance/parallel) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparallel.api.onfinality.io%2Fpublic-ws#/explorer) | 2012 | xTokens | XCM V3 | -| Unique | [Website](https://unique.network/?ref=parachains-info) | [Github](https://github.com/usetech-llc/polkadot_api_dotnet) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Feu-ws.unique.network%2F#/explorer) | 2037 | xTokens | XCM V3 | -| Zeitgeist | [Website](https://zeitgeist.pm/) | [Github](https://github.com/zeitgeistpm/zeitgeist) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmain.rpc.zeitgeist.pm%2Fws#/explorer) | 2092 | xTokens | XCM V3 | +| Node name | Website | Github | Polkadot.js | Node id | Supported XCM Pallet | Current latest XCM Version | +| ----------------- | ------------------------------------------------------ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------- | -------------------- | -------------------------- | +| PolkadotAssetHub | [Website](https://www.parity.io/) | [Github](https://github.com/paritytech/cumulus) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemint.api.onfinality.io%2Fpublic-ws#/explorer) | 1000 | polkadotXCM | XCM V3 | +| Acala | [Website](https://acala.network/) | [Github](https://github.com/AcalaNetwork/Acala) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F1rpc.io%2Faca#/explorer) | 2000 | xTokens | XCM V3 | +| Astar | [Website](https://astar.network/) | [Github](https://github.com/AstarNetwork/Astar) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fastar-rpc.dwellir.com#/explorer) | 2006 | polkadotXCM | XCM V3 | +| BifrostPolkadot | [Website](https://thebifrost.io/) | [Github](https://github.com/bifrost-finance/bifrost) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fhk.p.bifrost-rpc.liebi.com%2Fws#/explorer) | 2030 | xTokens | XCM V3 | +| Centrifuge | [Website](https://centrifuge.io/) | [Github](https://github.com/centrifuge/centrifuge-chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcentrifuge-parachain.api.onfinality.io%2Fpublic-ws#/explorer) | 2031 | xTokens | XCM V3 | +| Clover | [Website](https://clv.org/) | [Github](https://github.com/clover-network/clover) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-para.clover.finance#/explorer) | 2002 | xTokens | XCM V1 | +| ComposableFinance | [Website](https://www.composable.finance/) | [Github](https://github.com/ComposableFi/) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.composable.finance#/explorer) | 2019 | xTokens | XCM V3 | +| Crust | [Website](https://crust.network/?ref=parachains-info) | [Github](https://github.com/crustio/crust) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcrust-parachain.crustapps.net#/explorer) | 2008 | xTokens | XCM V1 | +| Darwinia | [Website](https://darwinia.network/) | [Github](https://github.com/darwinia-network/darwinia) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.darwinia.network#/explorer) | 2046 | polkadotXCM | XCM V3 | +| Equilibrium | [Website](https://equilibrium.io/?ref=parachains-info) | [Github](https://github.com/equilibrium-eosdt/equilibrium-substrate-chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fequilibrium-rpc.dwellir.com#/explorer) | 2011 | polkadotXcm | XCM V3 | +| HydraDX | [Website](https://hydradx.io/) | [Github](https://github.com/galacticcouncil/HydraDX-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.hydradx.cloud#/explorer) | 2034 | xTokens | XCM V3 | +| Interlay | [Website](https://interlay.io/) | [Github](https://github.com/interlay/interbtc) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fapi.interlay.io%2Fparachain#/explorer) | 2032 | xTokens | XCM V3 | +| Litentry | [Website](https://litentry.com/) | [Github](https://github.com/litentry/litentry-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Flitentry-rpc.dwellir.com#/explorer) | 2013 | xTokens | XCM V3 | +| Manta | [Website](https://manta.network/) | [Github](https://github.com/Manta-Network/Manta) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.manta.systems#/explorer) | 2104 | xTokens | XCM V1 | +| Moonbeam | [Website](https://moonbeam.network/) | [Github](https://github.com/PureStake/moonbeam) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmoonbeam.api.onfinality.io%2Fpublic-ws#/explorer) | 2004 | xTokens | XCM V3 | +| Nodle | [Website](https://www.nodle.com) | [Github](https://github.com/NodleCode/chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fnodle-parachain.api.onfinality.io%2Fpublic-ws#/explorer) | 2026 | xTokens | XCM V3 | +| OriginTrail | [Website](https://parachain.origintrail.io/) | [Github](https://github.com/OriginTrail/origintrail-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.origin-trail.network#/explorer) | 2043 | polkadotXCM | XCM V3 | +| Pendulum | [Website](https://pendulumchain.org/) | [Github](https://github.com/pendulum-chain/pendulum-prototype) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-pendulum.prd.pendulumchain.tech#/explorer) | 2094 | xTokens | XCM V1 | +| Polkadex | [Website](https://polkadex.trade/) | [Github](https://github.com/Polkadex-Substrate/Polkadex) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadex-parachain.public.curie.radiumblock.co%2Fws#/explorer) | 2040 | xTokens | XCM V3 | +| Parallel | [Website](https://parallel.fi/) | [Github](https://github.com/parallel-finance/parallel) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparallel.api.onfinality.io%2Fpublic-ws#/explorer) | 2012 | xTokens | XCM V3 | +| Unique | [Website](https://unique.network/?ref=parachains-info) | [Github](https://github.com/usetech-llc/polkadot_api_dotnet) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Feu-ws.unique.network%2F#/explorer) | 2037 | xTokens | XCM V3 | +| Zeitgeist | [Website](https://zeitgeist.pm/) | [Github](https://github.com/zeitgeistpm/zeitgeist) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmain.rpc.zeitgeist.pm%2Fws#/explorer) | 2092 | xTokens | XCM V3 | ## Kusama Parachains -| Node name | Website | Github | Polkadot.js | Node id | Supported XCM Pallet | Current latest XCM Version | -| ------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- | -------------------- | -------------------------- | -| KusamaAssetHub | [Website](https://www.parity.io/) | [Github](https://github.com/paritytech/cumulus) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemine-rpc.dwellir.com#/explorer) | 1000 | polkadotXCM | XCM V3 | -| Encointer | [Website](https://encointer.org/) | [Github](https://github.com/encointer/encointer-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.api.encointer.org#/explorer) | 1001 | polkadotXCM | XCM V3 | -| Altair | [Website](https://centrifuge.io/altair/) | [Github](https://github.com/centrifuge/centrifuge-chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Faltair.api.onfinality.io%2Fpublic-ws#/explorer) | 2088 | xTokens | XCM V1 | -| Amplitude | [Website](https://pendulumchain.org/amplitude?utm_source=parachains_info&utm_medium=referral&utm_campaign=parachains_info) | [Github](https://github.com/pendulum-chain/pendulum) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-amplitude.pendulumchain.tech#/explorer) | 2124 | xTokens | XCM V3 | -| Basilisk | [Website](https://bsx.fi/) | [Github](https://github.com/galacticcouncil/Basilisk-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.basilisk.cloud#/explorer) | 2090 | xTokens | XCM V3 | -| BifrostKusama | [Website](https://thebifrost.io/) | [Github](https://github.com/bifrost-finance/bifrost) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbifrost-parachain.api.onfinality.io%2Fpublic-ws#/explorer) | 2001 | xTokens | XCM V3 | -| Pioneer | [Website](https://bit.country/) | [Github](https://github.com/bit-country/Metaverse-Network) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpioneer.api.onfinality.io%2Fpublic-ws#/explorer) | 2096 | xTokens | XCM V1 | -| Calamari | [Website](https://calamari.network/) | [Github](https://github.com/Manta-Network/Manta) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.calamari.systems%2F#/accounts) | 2084 | xTokens | XCM V1 | -| CrustShadow | [Website](https://crust.network/) | [Github](https://github.com/crustio/crust-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-shadow.crust.network%2F#/explorer) | 2012 | xTokens | XCM V1 | -| Crab | [Website](https://crab.network/) | [Github](https://github.com/darwinia-network/darwinia/tree/main/runtime/crab) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcrab-parachain-rpc.darwinia.network%2F#/explorer) | 2105 | polkadotXCM | XCM V3 | -| Genshiro | [Website](https://genshiro.io) | [Github](https://github.com/equilibrium-eosdt) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fnode.ksm.genshiro.io#/explorer) | 2024 | polkadotXCM | XCM V3 | -| Imbue | [Website](https://www.imbue.network/) | [Github](https://github.com/ImbueNetwork/imbue) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fimbue-kusama.imbue.network#/explorer) | 2121 | xTokens | XCM V3 | -| Integritee | [Website](https://integritee.network/) | [Github](https://github.com/integritee-network/integritee-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fintegritee-kusama.api.onfinality.io%2Fpublic-ws#/explorer) | 2015 | xTokens | XCM V3 | -| InvArchTinker | [Website](https://invarch.network/tinkernet) | [Github](https://github.com/InvArch/InvArch-Node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Finvarch-tinkernet.api.onfinality.io%2Fpublic-ws#/explorer) | 2125 | xTokens | XCM V3 | -| Karura | [Website](https://acala.network/karura) | [Github](https://github.com/AcalaNetwork/Acala) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-2.aca-api.network%2Fws#/explorer) | 2000 | xTokens | XCM V3 | -| Kintsugi | [Website](https://kintsugi.interlay.io/bridge?tab=issue) | [Github](https://github.com/interlay/interbtc-ui) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fapi-kusama.interlay.io%2Fparachain#/explorer) | 2092 | xTokens | XCM V3 | -| Litmus | [Website](https://litentry.com/) | [Github](https://github.com/litentry/litentry-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.litmus-parachain.litentry.io#/explorer) | 2106 | xTokens | XCM V1 | -| Mangata | [Website](https://www.mangata.finance/) | [Github](https://github.com/mangata-finance/mangata-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-archive.mangata.online#/explorer) | 2110 | xTokens | XCM V3 | -| Moonriver | [Website](https://moonbeam.network/networks/moonriver/) | [Github](https://github.com/PureStake/moonbeam) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmoonriver.api.onfinality.io%2Fpublic-ws#/explorer) | 2023 | xTokens | XCM V3 | -| ParallelHeiko | [Website](https://parallel.fi/) | [Github](https://github.com/parallel-finance/parallel) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fheiko-rpc.parallel.fi#/explorer) | 2085 | xTokens | XCM V3 | -| Picasso | [Website](https://picasso.xyz/) | [Github](https://github.com/ComposableFi/composable) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpicasso-rpc.composable.finance#/explorer) | 2087 | xTokens | XCM V3 | -| Quartz | [Website](https://unique.network/quartz/) | [Github](https://github.com/usetech-llc/polkadot_api_dotnet) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fus-ws-quartz.unique.network#/explorer) | 2095 | xTokens | XCM V3 | -| Robonomics | [Website](https://robonomics.network/) | [Github](https://github.com/airalab/robonomics) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frobonomics.api.onfinality.io%2Fpublic-ws#/robotomics) | 2048 | polkadotXCM | XCM V1 | -| Shiden | [Website](https://shiden.astar.network/) | [Github](https://github.com/AstarNetwork/Astar) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fshiden.api.onfinality.io%2Fpublic-ws#/explorer) | 2007 | polkadotXCM | XCM V3 | -| Turing | [Website](https://oak.tech/turing/home/) | [Github](https://github.com/OAK-Foundation/OAK-blockchain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fturing-rpc.dwellir.com#/explorer) | 2114 | xTokens | XCM V3 | +| Node name | Website | Github | Polkadot.js | Node id | Supported XCM Pallet | Current latest XCM Version | +| -------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- | -------------------- | -------------------------- | +| KusamaAssetHub | [Website](https://www.parity.io/) | [Github](https://github.com/paritytech/cumulus) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemine-rpc.dwellir.com#/explorer) | 1000 | polkadotXCM | XCM V3 | +| Encointer | [Website](https://encointer.org/) | [Github](https://github.com/encointer/encointer-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.api.encointer.org#/explorer) | 1001 | polkadotXCM | XCM V3 | +| Altair | [Website](https://centrifuge.io/altair/) | [Github](https://github.com/centrifuge/centrifuge-chain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Faltair.api.onfinality.io%2Fpublic-ws#/explorer) | 2088 | xTokens | XCM V1 | +| Amplitude | [Website](https://pendulumchain.org/amplitude?utm_source=parachains_info&utm_medium=referral&utm_campaign=parachains_info) | [Github](https://github.com/pendulum-chain/pendulum) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-amplitude.pendulumchain.tech#/explorer) | 2124 | xTokens | XCM V3 | +| Basilisk | [Website](https://bsx.fi/) | [Github](https://github.com/galacticcouncil/Basilisk-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.basilisk.cloud#/explorer) | 2090 | xTokens | XCM V3 | +| BifrostKusama | [Website](https://thebifrost.io/) | [Github](https://github.com/bifrost-finance/bifrost) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbifrost-parachain.api.onfinality.io%2Fpublic-ws#/explorer) | 2001 | xTokens | XCM V3 | +| Pioneer | [Website](https://bit.country/) | [Github](https://github.com/bit-country/Metaverse-Network) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpioneer.api.onfinality.io%2Fpublic-ws#/explorer) | 2096 | xTokens | XCM V1 | +| Calamari | [Website](https://calamari.network/) | [Github](https://github.com/Manta-Network/Manta) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.calamari.systems%2F#/accounts) | 2084 | xTokens | XCM V1 | +| CrustShadow | [Website](https://crust.network/) | [Github](https://github.com/crustio/crust-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-shadow.crust.network%2F#/explorer) | 2012 | xTokens | XCM V1 | +| Crab | [Website](https://crab.network/) | [Github](https://github.com/darwinia-network/darwinia/tree/main/runtime/crab) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcrab-parachain-rpc.darwinia.network%2F#/explorer) | 2105 | polkadotXCM | XCM V3 | +| Genshiro | [Website](https://genshiro.io) | [Github](https://github.com/equilibrium-eosdt) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fnode.ksm.genshiro.io#/explorer) | 2024 | polkadotXCM | XCM V3 | +| Imbue | [Website](https://www.imbue.network/) | [Github](https://github.com/ImbueNetwork/imbue) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fimbue-kusama.imbue.network#/explorer) | 2121 | xTokens | XCM V3 | +| Integritee | [Website](https://integritee.network/) | [Github](https://github.com/integritee-network/integritee-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fintegritee-kusama.api.onfinality.io%2Fpublic-ws#/explorer) | 2015 | xTokens | XCM V3 | +| InvArchTinker | [Website](https://invarch.network/tinkernet) | [Github](https://github.com/InvArch/InvArch-Node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Finvarch-tinkernet.api.onfinality.io%2Fpublic-ws#/explorer) | 2125 | xTokens | XCM V3 | +| Karura | [Website](https://acala.network/karura) | [Github](https://github.com/AcalaNetwork/Acala) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-2.aca-api.network%2Fws#/explorer) | 2000 | xTokens | XCM V3 | +| Kintsugi | [Website](https://kintsugi.interlay.io/bridge?tab=issue) | [Github](https://github.com/interlay/interbtc-ui) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fapi-kusama.interlay.io%2Fparachain#/explorer) | 2092 | xTokens | XCM V3 | +| Litmus | [Website](https://litentry.com/) | [Github](https://github.com/litentry/litentry-parachain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.litmus-parachain.litentry.io#/explorer) | 2106 | xTokens | XCM V1 | +| Mangata | [Website](https://www.mangata.finance/) | [Github](https://github.com/mangata-finance/mangata-node) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-archive.mangata.online#/explorer) | 2110 | xTokens | XCM V3 | +| Moonriver | [Website](https://moonbeam.network/networks/moonriver/) | [Github](https://github.com/PureStake/moonbeam) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmoonriver.api.onfinality.io%2Fpublic-ws#/explorer) | 2023 | xTokens | XCM V3 | +| ParallelHeiko | [Website](https://parallel.fi/) | [Github](https://github.com/parallel-finance/parallel) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fheiko-rpc.parallel.fi#/explorer) | 2085 | xTokens | XCM V3 | +| Picasso | [Website](https://picasso.xyz/) | [Github](https://github.com/ComposableFi/composable) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpicasso-rpc.composable.finance#/explorer) | 2087 | xTokens | XCM V3 | +| Quartz | [Website](https://unique.network/quartz/) | [Github](https://github.com/usetech-llc/polkadot_api_dotnet) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fus-ws-quartz.unique.network#/explorer) | 2095 | xTokens | XCM V3 | +| Robonomics | [Website](https://robonomics.network/) | [Github](https://github.com/airalab/robonomics) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frobonomics.api.onfinality.io%2Fpublic-ws#/robotomics) | 2048 | polkadotXCM | XCM V1 | +| Shiden | [Website](https://shiden.astar.network/) | [Github](https://github.com/AstarNetwork/Astar) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fshiden.api.onfinality.io%2Fpublic-ws#/explorer) | 2007 | polkadotXCM | XCM V3 | +| Turing | [Website](https://oak.tech/turing/home/) | [Github](https://github.com/OAK-Foundation/OAK-blockchain) | [Polkadot.js](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fturing-rpc.dwellir.com#/explorer) | 2114 | xTokens | XCM V3 | diff --git a/package.json b/package.json index 5de565b8..237415bd 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ } }, "dependencies": { - "@mangata-finance/sdk": "^2.1.1", + "@mangata-finance/type-definitions": "^2.1.2", "ethers": "^5.7.1" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6f019253..7cc2b532 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,9 @@ lockfileVersion: '6.0' dependencies: - '@mangata-finance/sdk': - specifier: ^2.1.1 - version: 2.1.1(@polkadot/api@10.9.1)(@polkadot/types@10.9.1) + '@mangata-finance/type-definitions': + specifier: ^2.1.2 + version: 2.1.2(@polkadot/types@10.9.1) '@polkadot/api': specifier: ^10.6.1 version: 10.9.1 @@ -2031,20 +2031,6 @@ packages: - utf-8-validate dev: false - /@mangata-finance/sdk@2.1.1(@polkadot/api@10.9.1)(@polkadot/types@10.9.1): - resolution: {integrity: sha512-Sbge0swlR2oFTi4QR6my2RjZ0T01SbKICYO2NOgT2ipUcva3gbpt0B+O/FJ7WfckrAYVsiTUmBmQc76euAgxxA==} - engines: {node: '>=18.0.0'} - peerDependencies: - '@polkadot/api': 10.9.1 - dependencies: - '@mangata-finance/type-definitions': 2.0.0(@polkadot/types@10.9.1) - '@polkadot/api': 10.9.1 - big.js: 6.2.1 - tslog: 4.8.2 - transitivePeerDependencies: - - '@polkadot/types' - dev: false - /@mangata-finance/type-definitions@2.0.0(@polkadot/types@10.11.1): resolution: {integrity: sha512-N8o0PgeSjTsb5MLfdsZD/DsD1BldBqrvRZ/KaanPY1ESFAAEu+B9BebSUZm/XFDm9GzQpOZqNg9KaZsghx4E5A==} engines: {node: '>=18.0.0'} @@ -2054,11 +2040,11 @@ packages: '@polkadot/types': 10.11.1 dev: false - /@mangata-finance/type-definitions@2.0.0(@polkadot/types@10.9.1): - resolution: {integrity: sha512-N8o0PgeSjTsb5MLfdsZD/DsD1BldBqrvRZ/KaanPY1ESFAAEu+B9BebSUZm/XFDm9GzQpOZqNg9KaZsghx4E5A==} + /@mangata-finance/type-definitions@2.1.2(@polkadot/types@10.9.1): + resolution: {integrity: sha512-kr4mVMuQ6DqZ0H72z0YI8tcdlk4XD4vUgRVYYfTJdXFJhRsfS4YRxfs/iiQPNzWKgoQZKcDqsbQD3xz9T1gELw==} engines: {node: '>=18.0.0'} peerDependencies: - '@polkadot/types': 10.9.1 + '@polkadot/types': ^10.9.1 dependencies: '@polkadot/types': 10.9.1 dev: false @@ -5044,10 +5030,6 @@ packages: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} dev: false - /big.js@6.2.1: - resolution: {integrity: sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==} - dev: false - /blakejs@1.2.1: resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} dev: false @@ -8363,11 +8345,6 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tslog@4.8.2: - resolution: {integrity: sha512-eAKIRjxfSKYLs06r1wT7oou6Uv9VN6NW9g0JPidBlqQwPBBl5+84dm7r8zSOPVq1kyfEw1P6B3/FLSpZCorAgA==} - engines: {node: '>=16'} - dev: false - /tweetnacl@1.0.3: resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} dev: false diff --git a/scripts/updateAssets.ts b/scripts/updateAssets.ts index a628979f..67242cfa 100644 --- a/scripts/updateAssets.ts +++ b/scripts/updateAssets.ts @@ -25,7 +25,6 @@ const nodeToQuery: NodeToAssetModuleMap = { Darwinia: null, // No assets metadata query HydraDX: 'assetRegistry.assetMetadataMap', Interlay: 'assetRegistry.metadata', - Kylin: 'assets.metadata', Litentry: null, // Assets query returns empty array Moonbeam: 'assets.metadata', Parallel: 'assets.metadata', diff --git a/src/maps/assets.json b/src/maps/assets.json index 994711c3..6b5d798e 100644 --- a/src/maps/assets.json +++ b/src/maps/assets.json @@ -906,23 +906,6 @@ } ] }, - "Kylin": { - "paraId": 2052, - "relayChainAssetSymbol": "DOT", - "nativeAssets": [ - { - "symbol": "KYL", - "decimals": 18 - } - ], - "otherAssets": [ - { - "assetId": "1", - "symbol": "DOT", - "decimals": 0 - } - ] - }, "Litentry": { "paraId": 2013, "relayChainAssetSymbol": "DOT", diff --git a/src/maps/consts.ts b/src/maps/consts.ts index 1cda3439..f40b4e99 100644 --- a/src/maps/consts.ts +++ b/src/maps/consts.ts @@ -12,7 +12,6 @@ import Clover from '../nodes/supported/Clover' import ComposableFinance from '../nodes/supported/ComposableFinance' import HydraDX from '../nodes/supported/HydraDX' import Interlay from '../nodes/supported/Interlay' -import Kylin from '../nodes/supported/Kylin' import Litentry from '../nodes/supported/Litentry' import Moonbeam from '../nodes/supported/Moonbeam' import Parallel from '../nodes/supported/Parallel' @@ -65,7 +64,6 @@ export const NODE_NAMES = [ 'Darwinia', 'HydraDX', 'Interlay', - 'Kylin', 'Litentry', 'Moonbeam', 'Parallel', @@ -123,7 +121,6 @@ export const nodes: Record = { Darwinia: new Darwinia(), HydraDX: new HydraDX(), Interlay: new Interlay(), - Kylin: new Kylin(), Litentry: new Litentry(), Moonbeam: new Moonbeam(), Parallel: new Parallel(), diff --git a/src/maps/pallets.json b/src/maps/pallets.json index 008e89b7..bc91f246 100644 --- a/src/maps/pallets.json +++ b/src/maps/pallets.json @@ -43,10 +43,6 @@ "defaultPallet": "XTokens", "supportedPallets": ["PolkadotXcm", "XTokens"] }, - "Kylin": { - "defaultPallet": "OrmlXTokens", - "supportedPallets": ["PolkadotXcm", "OrmlXTokens"] - }, "Litentry": { "defaultPallet": "XTokens", "supportedPallets": ["PolkadotXcm", "XTokens"] diff --git a/src/nodes/ParachainNode.ts b/src/nodes/ParachainNode.ts index 4eff5e04..29bbdebf 100644 --- a/src/nodes/ParachainNode.ts +++ b/src/nodes/ParachainNode.ts @@ -24,11 +24,11 @@ import { } from '../utils' import { constructRelayToParaParameters } from '../pallets/xcmPallet/utils' -const supportsXTokens = (obj: any): obj is IXTokensTransfer => { +export const supportsXTokens = (obj: any): obj is IXTokensTransfer => { return 'transferXTokens' in obj } -const supportsPolkadotXCM = (obj: any): obj is IPolkadotXCMTransfer => { +export const supportsPolkadotXCM = (obj: any): obj is IPolkadotXCMTransfer => { return 'transferPolkadotXCM' in obj } diff --git a/src/nodes/supported/Astar.ts b/src/nodes/supported/Astar.ts index 8cb8b358..91463016 100644 --- a/src/nodes/supported/Astar.ts +++ b/src/nodes/supported/Astar.ts @@ -1,16 +1,30 @@ // Contains detailed structure of XCM call construction for Astar Parachain +import { type ApiPromise } from '@polkadot/api' +import { NoXCMSupportImplementedError } from '../../errors' +import { getParaId } from '../../pallets/assets' import { type IPolkadotXCMTransfer, type PolkadotXCMTransferInput, Version, type Extrinsic, - type TSerializedApiCall + type TSerializedApiCall, + type TNode, + type TScenario, + type IXTokensTransfer, + type XTokensTransferInput } from '../../types' -import ParachainNode from '../ParachainNode' +import { + generateAddressPayload, + getFees, + createHeaderPolkadotXCM, + createCurrencySpecification +} from '../../utils' +import ParachainNode, { supportsPolkadotXCM, supportsXTokens } from '../ParachainNode' import PolkadotXCMTransferImpl from '../PolkadotXCMTransferImpl' +import XTokensTransferImpl from '../XTokensTransferImpl' -class Astar extends ParachainNode implements IPolkadotXCMTransfer { +class Astar extends ParachainNode implements IPolkadotXCMTransfer, IXTokensTransfer { constructor() { super('Astar', 'astar', 'polkadot', Version.V3) } @@ -21,6 +35,67 @@ class Astar extends ParachainNode implements IPolkadotXCMTransfer { input.scenario === 'ParaToPara' ? 'reserveTransferAssets' : 'reserveWithdrawAssets' return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method) } + + transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall { + return XTokensTransferImpl.transferXTokens(input, input.currencyID) + } + + transfer( + api: ApiPromise, + currencySymbol: string | undefined, + currencyId: string | undefined, + amount: string, + to: string, + destination?: TNode, + serializedApiCallEnabled = false + ): Extrinsic | TSerializedApiCall { + const scenario: TScenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay' + const paraId = destination !== undefined ? getParaId(destination) : undefined + const node = this.node + if (supportsXTokens(this) && currencySymbol !== 'ASTR') { + return this.transferXTokens({ + api, + currency: currencySymbol, + currencyID: currencyId, + amount, + addressSelection: generateAddressPayload( + api, + scenario, + 'XTokens', + to, + this.version, + paraId + ), + fees: getFees(scenario), + scenario, + serializedApiCallEnabled + }) + } else if (supportsPolkadotXCM(this)) { + return this.transferPolkadotXCM({ + api, + header: createHeaderPolkadotXCM(scenario, this.version, paraId), + addressSelection: generateAddressPayload( + api, + scenario, + 'PolkadotXcm', + to, + this.version, + paraId + ), + currencySelection: createCurrencySpecification( + amount, + scenario, + this.version, + node, + currencyId + ), + scenario, + currencySymbol, + serializedApiCallEnabled + }) + } + throw new NoXCMSupportImplementedError(node) + } } export default Astar diff --git a/src/nodes/supported/Darwinia.ts b/src/nodes/supported/Darwinia.ts index 12bdb508..ddbc4f1b 100644 --- a/src/nodes/supported/Darwinia.ts +++ b/src/nodes/supported/Darwinia.ts @@ -1,28 +1,26 @@ // Contains detailed structure of XCM call construction for Darwinia Parachain import { - type IPolkadotXCMTransfer, - type PolkadotXCMTransferInput, Version, type Extrinsic, - type TSerializedApiCall + type TSerializedApiCall, + type IXTokensTransfer, + type XTokensTransferInput } from '../../types' -import { ScenarioNotSupportedError } from '../../errors/ScenarioNotSupportedError' import ParachainNode from '../ParachainNode' -import PolkadotXCMTransferImpl from '../PolkadotXCMTransferImpl' import { NodeNotSupportedError } from '../../errors' +import XTokensTransferImpl from '../XTokensTransferImpl' -class Darwinia extends ParachainNode implements IPolkadotXCMTransfer { +class Darwinia extends ParachainNode implements IXTokensTransfer { constructor() { super('Darwinia', 'darwinia', 'polkadot', Version.V3) } - transferPolkadotXCM(input: PolkadotXCMTransferInput): Extrinsic | TSerializedApiCall { - // TESTED https://polkadot.subscan.io/xcm_message/polkadot-55c5c36c8fe8794c8cfbea725c9f8bc5984c6b05 - if (input.scenario === 'ParaToPara') { - return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'reserveTransferAssets') - } - throw new ScenarioNotSupportedError(this.node, input.scenario) + transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall { + return XTokensTransferImpl.transferXTokens( + input, + input.currency === 'RING' ? 'SelfReserve' : { ForeignAsset: input.currencyID } + ) } transferRelayToPara(): TSerializedApiCall { diff --git a/src/nodes/supported/Kylin.ts b/src/nodes/supported/Kylin.ts deleted file mode 100644 index 839d3483..00000000 --- a/src/nodes/supported/Kylin.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Contains detailed structure of XCM call construction for Kylin Parachain - -import { - type IXTokensTransfer, - Version, - type XTokensTransferInput, - type Extrinsic, - type TSerializedApiCall -} from '../../types' -import ParachainNode from '../ParachainNode' -import XTokensTransferImpl from '../XTokensTransferImpl' - -class Kylin extends ParachainNode implements IXTokensTransfer { - constructor() { - super('Kylin', 'kylin', 'polkadot', Version.V1) - } - - transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall { - const { currency, fees } = input - return XTokensTransferImpl.transferXTokens(input, currency, fees, 'OrmlXTokens') - } -} - -export default Kylin diff --git a/src/nodes/supported/Mangata.ts b/src/nodes/supported/Mangata.ts index 65a268f9..ad72d6b0 100644 --- a/src/nodes/supported/Mangata.ts +++ b/src/nodes/supported/Mangata.ts @@ -1,6 +1,6 @@ // Contains detailed structure of XCM call construction for Mangata Parachain -import { type ApiPromise } from '@polkadot/api' +import { WsProvider, ApiPromise } from '@polkadot/api' import { type IXTokensTransfer, Version, @@ -10,6 +10,20 @@ import { } from '../../types' import ParachainNode from '../ParachainNode' import XTokensTransferImpl from '../XTokensTransferImpl' +import { type ApiOptions } from '@polkadot/api/types' +import { mTypes, mRpc } from '@mangata-finance/type-definitions' + +const options = ({ types = {}, rpc = {}, ...otherOptions }: ApiOptions = {}): ApiOptions => ({ + types: { + ...mTypes, + ...types + }, + rpc: { + ...mRpc, + ...rpc + }, + ...otherOptions +}) class Mangata extends ParachainNode implements IXTokensTransfer { constructor() { @@ -21,9 +35,15 @@ class Mangata extends ParachainNode implements IXTokensTransfer { } async createApiInstance(): Promise { - const MangataSDK = await import('@mangata-finance/sdk') - const instance = MangataSDK.Mangata.instance([this.getProvider()]) - return await instance.api() + const provider = new WsProvider(this.getProvider()) + return await ApiPromise.create( + options({ + provider, + throwOnConnect: true, + throwOnUnknown: true, + noInitWarn: true + }) + ) } } diff --git a/src/nodes/supported/Pendulum.ts b/src/nodes/supported/Pendulum.ts index 1e79a45f..b56ca017 100644 --- a/src/nodes/supported/Pendulum.ts +++ b/src/nodes/supported/Pendulum.ts @@ -17,7 +17,7 @@ import XTokensTransferImpl from '../XTokensTransferImpl' class Pendulum extends ParachainNode implements IXTokensTransfer { constructor() { - super('Pendulum', 'pendulum', 'polkadot', Version.V1) + super('Pendulum', 'pendulum', 'polkadot', Version.V3) } transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall { diff --git a/src/nodes/supported/Shiden.ts b/src/nodes/supported/Shiden.ts index 2d1f6e35..13d172c9 100644 --- a/src/nodes/supported/Shiden.ts +++ b/src/nodes/supported/Shiden.ts @@ -1,16 +1,30 @@ // Contains detailed structure of XCM call construction for Shiden Parachain +import { type ApiPromise } from '@polkadot/api' import { type IPolkadotXCMTransfer, type PolkadotXCMTransferInput, Version, type Extrinsic, - type TSerializedApiCall + type TSerializedApiCall, + type IXTokensTransfer, + type XTokensTransferInput, + type TNode, + type TScenario } from '../../types' -import ParachainNode from '../ParachainNode' +import { + createCurrencySpecification, + createHeaderPolkadotXCM, + generateAddressPayload, + getFees +} from '../../utils' +import ParachainNode, { supportsPolkadotXCM, supportsXTokens } from '../ParachainNode' import PolkadotXCMTransferImpl from '../PolkadotXCMTransferImpl' +import XTokensTransferImpl from '../XTokensTransferImpl' +import { getParaId } from '../../pallets/assets' +import { NoXCMSupportImplementedError } from '../../errors' -class Shiden extends ParachainNode implements IPolkadotXCMTransfer { +class Shiden extends ParachainNode implements IPolkadotXCMTransfer, IXTokensTransfer { constructor() { super('Shiden', 'shiden', 'kusama', Version.V3) } @@ -22,6 +36,67 @@ class Shiden extends ParachainNode implements IPolkadotXCMTransfer { input.scenario === 'ParaToPara' ? 'reserveTransferAssets' : 'reserveWithdrawAssets' return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method) } + + transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall { + return XTokensTransferImpl.transferXTokens(input, input.currencyID) + } + + transfer( + api: ApiPromise, + currencySymbol: string | undefined, + currencyId: string | undefined, + amount: string, + to: string, + destination?: TNode, + serializedApiCallEnabled = false + ): Extrinsic | TSerializedApiCall { + const scenario: TScenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay' + const paraId = destination !== undefined ? getParaId(destination) : undefined + const node = this.node + if (supportsXTokens(this) && currencySymbol !== 'SDN') { + return this.transferXTokens({ + api, + currency: currencySymbol, + currencyID: currencyId, + amount, + addressSelection: generateAddressPayload( + api, + scenario, + 'XTokens', + to, + this.version, + paraId + ), + fees: getFees(scenario), + scenario, + serializedApiCallEnabled + }) + } else if (supportsPolkadotXCM(this)) { + return this.transferPolkadotXCM({ + api, + header: createHeaderPolkadotXCM(scenario, this.version, paraId), + addressSelection: generateAddressPayload( + api, + scenario, + 'PolkadotXcm', + to, + this.version, + paraId + ), + currencySelection: createCurrencySpecification( + amount, + scenario, + this.version, + node, + currencyId + ), + scenario, + currencySymbol, + serializedApiCallEnabled + }) + } + throw new NoXCMSupportImplementedError(node) + } } export default Shiden diff --git a/src/utils.ts b/src/utils.ts index f5ad9da8..49a4580b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -278,18 +278,6 @@ export const getNode = (node: TNode): ParachainNode => { export const getNodeEndpointOption = (node: TNode): any => { const { type, name } = getNode(node) const { linked } = type === 'polkadot' ? prodRelayPolkadot : prodRelayKusama - - // TMP Fix because some nodes don't have providers in endpoint options - if (node === 'Kylin') { - return { - info: 'kylin', - paraId: 2052, - providers: { - 'Kylin Network': 'wss://polkadot.kylin-node.co.uk' - } - } - } - return linked !== undefined ? linked.find((o: any) => o.info === name) : undefined }