Files
proxmox/scripts/test-thirdweb-bridge-widget.js
Devin AI 7aa5162c5b
Some checks failed
AI Code Review / claude-review (pull_request) Failing after 31s
docs(chain-138): normalize chain name to DeFi Oracle Meta Mainnet across docs + pr-ready assets
Per maintainer decision, the canonical chain-name spelling is `DeFi Oracle Meta Mainnet`
(capital F) — matching what the live SDK + token-aggregation service emit on
`https://explorer.d-bis.org/api/config/networks`. Docs + `pr-ready/` JSONs had drifted
to `Defi Oracle Meta Mainnet`; this PR realigns them.

Scope:
- `docs/04-configuration/pr-ready/*.json` (eip155-138 + trust-wallet registry + packaged copies + manifests)
- `docs/04-configuration/pr-ready/**/README.md`
- `docs/04-configuration/metamask/METAMASK_NETWORK_CONFIG.json`
- 10+ narrative docs under `docs/04-configuration/`, `docs/11-references/`, `docs/01-getting-started/`, `docs/00-meta/`, `docs/09-troubleshooting/`, `docs/archive/`
- `docs/04-configuration/coingecko/COINGECKO_SUBMISSION_{GUIDE,CUSDT,CUSDC}.md`, `COINGECKO_API_NO_PUSH_LIQUIDITY.md`
- `reports/DEFI_ORACLE_MAINNET_CONNECTION_GUIDE.md`
- `scripts/test-thirdweb-bridge-widget.js`

45 files; 92 lines changed. Submodules untouched.

Verification:
- `grep -rln 'Defi Oracle Meta Mainnet' docs/ reports/ scripts/` returns 0 hits post-change.
- JSON files pass `python3 -m json.tool` lint.
- Services (`smom-dbis-138/sdk`, `services/token-aggregation`) already use the capital-F form and are not touched.

Remaining drift (not in scope):
- PR #7's `COINGECKO_CHAIN138_SUBMISSION_ATTACHMENT.md` still uses `Defi`; will be fixed on that branch separately.
- User's local normalized versions of 5 CoinGecko docs are still pending attachment; companion PR will pick up this rename naturally since it's already applied on master.

No submodule pointers changed. No secrets touched.
2026-04-19 19:52:47 +00:00

71 lines
3.2 KiB
JavaScript
Executable File

#!/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");