Add assets to Astar Portal
Once a channel is opened between parachains and assets have been registered, developers can create a PR on Astar Portal Github, to have their assets added. Here’s what you need to know about the integration of the XCM assets into Astar Portal.
Define the Parachain Information
-
Add the
Chain name
for the Chain enum. -
Add the
parachain id
for the parachainIds enum. -
Add the
chain metadata
for the xcmChainObj object variable.e.g.
interface XcmChain {
name: Chain;
parachainId: parachainIds;
relayChain: Chain;
subscan: string;
// Note: an image URL address for the chain logo
img: string;
// Note: websocket endpoint for connecting to the parachains API
endpoint: string;
// Note: `true` if ASTR/SDN is listed on the parachains
isAstarNativeToken: boolean;
}
const xcmChainObj = {
[Chain.STATEMINT]: {
name: Chain.STATEMINT,
relayChain: Chain.POLKADOT,
img: 'https://polkadot.js.org/apps/static/statemine.65437936..svg',
parachainId: parachainIds.STATEMINT,
endpoint: 'wss://statemint-rpc.dwellir.com',
subscan: 'https://statemint.subscan.io',
isAstarNativeToken: false,
}