#!/usr/bin/env node
/**
 * Test thirdweb Bridge Widget for ChainID 138
 * Information script about using thirdweb Bridge widget
 */

// Configuration
const CHAIN138_RPC = process.env.RPC_URL_138 || "https://rpc-http-pub.d-bis.org";
const THIRDWEB_CLIENT_ID = process.env.THIRDWEB_CLIENT_ID || "542981292d51ec610388ba8985f027d7";
const WETH_CANONICAL = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
const USDT_MAINNET = "0xdAC17F958D2ee523a2206206994597C13D831ec7";

console.log("\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
console.log("thirdweb Bridge Widget Test");
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");

console.log("Configuration:");
console.log(`  Client ID: ${THIRDWEB_CLIENT_ID}`);
console.log(`  ChainID 138 RPC: ${CHAIN138_RPC}`);
console.log(`  WETH Address: ${WETH_CANONICAL}`);
console.log(`  USDT Address: ${USDT_MAINNET}`);
console.log("");

console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
console.log("ChainID 138 IS Supported!");
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");

console.log("According to thirdweb chainlist:");
console.log("  ✅ ChainID 138: Defi Oracle Meta Mainnet");
console.log("  ✅ Bridge service available");
console.log("  ✅ RPC: https://138.rpc.thirdweb.com");
console.log("");

console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
console.log("Recommended: Use Bridge Widget");
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");

console.log("Install dependencies:");
console.log("  npm install @thirdweb-dev/react @thirdweb-dev/sdk");
console.log("");

console.log("React Component Example:");
console.log(`
import { Bridge } from "@thirdweb-dev/react";

<Bridge
  clientId="${THIRDWEB_CLIENT_ID}"
  fromChain={138}
  toChain={1}
  fromToken="${WETH_CANONICAL}"
  toToken="${USDT_MAINNET}"
/>
`);

console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
console.log("Next Steps");
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");

console.log("1. Test Bridge Widget in your application");
console.log("2. Check if WETH token is recognized");
console.log("3. If not recognized, request token support:");
console.log("   - Dashboard → Bridge → Settings");
console.log("   - 'Don't see your token listed?'");
console.log("   - Submit chain and token address");
console.log("   - Wait 20-40 minutes");
console.log("");

console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
console.log("Status: ✅ ChainID 138 Supported - Ready to Test Widget");
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");
