feat: expand non-evm relay and route planning support
This commit is contained in:
@@ -4,27 +4,59 @@
|
||||
const LIFI_URL = 'https://li.quest/v1/chains';
|
||||
const CCIP_URL = 'https://docs.chain.link/ccip/supported-networks';
|
||||
|
||||
async function fetchText(url) {
|
||||
const res = await fetch(url, {
|
||||
headers: {
|
||||
'user-agent': 'proxmox-operator-support-check/1.0',
|
||||
accept: 'text/html,application/json;q=0.9,*/*;q=0.8',
|
||||
},
|
||||
});
|
||||
if (!res.ok) throw new Error(`${url} returned ${res.status}`);
|
||||
return res.text();
|
||||
}
|
||||
|
||||
async function fetchJson(url) {
|
||||
const res = await fetch(url, {
|
||||
headers: {
|
||||
'user-agent': 'proxmox-operator-support-check/1.0',
|
||||
accept: 'application/json',
|
||||
},
|
||||
});
|
||||
if (!res.ok) throw new Error(`${url} returned ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
async function main() {
|
||||
console.log('Tezos/Etherlink support check\n');
|
||||
try {
|
||||
const lifiRes = await fetch(LIFI_URL);
|
||||
const lifi = await lifiRes.json();
|
||||
const ids = (lifi.chains || []).map((c) => c.id || c.chainId).filter(Boolean);
|
||||
const lifi = await fetchJson(LIFI_URL);
|
||||
const chains = lifi.chains || [];
|
||||
const ids = chains.map((c) => c.id || c.chainId).filter(Boolean);
|
||||
const etherlink = chains.find((c) => (c.id || c.chainId) === 42793);
|
||||
console.log('LiFi chains include 138:', ids.includes(138));
|
||||
console.log('LiFi chains include 42793:', ids.includes(42793));
|
||||
console.log('LiFi chains include 651940:', ids.includes(651940));
|
||||
if (etherlink) {
|
||||
console.log('LiFi Etherlink entry:', JSON.stringify({
|
||||
id: etherlink.id || etherlink.chainId,
|
||||
key: etherlink.key,
|
||||
name: etherlink.name,
|
||||
coin: etherlink.coin,
|
||||
mainnet: etherlink.mainnet,
|
||||
}));
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('LiFi error:', e.message);
|
||||
}
|
||||
try {
|
||||
const ccipRes = await fetch(CCIP_URL);
|
||||
const html = await ccipRes.text();
|
||||
console.log('\nCCIP page mentions 42793:', html.includes('42793') || html.toLowerCase().includes('etherlink'));
|
||||
console.log('CCIP page mentions 138:', html.includes('138'));
|
||||
const html = await fetchText(CCIP_URL);
|
||||
const hasEtherlinkMention = html.includes('42793') || html.toLowerCase().includes('etherlink');
|
||||
console.log('\nCCIP page mentions 42793/Etherlink:', hasEtherlinkMention);
|
||||
console.log('CCIP page mention is not treated as support without selector/router confirmation.');
|
||||
} catch (e) {
|
||||
console.log('CCIP error:', e.message);
|
||||
}
|
||||
console.log('\nJumper: verify manually; see docs/07-ccip/TEZOS_JUMPER_SUPPORT_MATRIX.md');
|
||||
console.log('\nJumper: still verify manually; see docs/07-ccip/TEZOS_JUMPER_SUPPORT_MATRIX.md');
|
||||
}
|
||||
|
||||
main().catch((e) => { console.error(e); process.exit(1); });
|
||||
|
||||
Reference in New Issue
Block a user