This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bun | |
| const ADDRESS = process.argv[2]; | |
| if (!ADDRESS || !/^0x[0-9a-fA-F]{40}$/.test(ADDRESS)) { | |
| console.error("Usage: bun balances.ts 0x<address>"); | |
| process.exit(1); | |
| } | |
| type Chain = { name: string; rpc: string; symbol: string; cgId?: string; decimals?: number }; | |
| const CHAINS: Chain[] = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/XLabs/portal-bridge-ui/issues/1185 | |
| // The following transactions allegedly don't have valid VAAs and have yet to be redeemed. | |
| // Source: Ethereum | |
| // import { | |
| // CONTRACTS, | |
| // getIsTransferCompletedSolana, | |
| // } from "@certusone/wormhole-sdk"; | |
| // import { Connection } from "@solana/web3.js"; | |
| import { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Dependencies | |
| // $ npm i axios ora | |
| // Ethereum mainnet localhost example - WETH totalSupply() | |
| // $ RPC="http://localhost:8545" BLOCKS=1024 TO="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" DATA="0x18160ddd" npx tsx historyCheck.ts | |
| // Optimism mainnet public node example - WETH totalSupply() | |
| // $ RPC="https://optimism.publicnode.com" BLOCKS=1024 TO="0x4200000000000000000000000000000000000006" DATA="0x18160ddd" npx tsx historyCheck.ts | |
| // Base mainnet public node example - WETH totalSupply() | |
| // $ RPC="https://base.publicnode.com" BLOCKS=1024 TO="0x4200000000000000000000000000000000000006" DATA="0x18160ddd" npx tsx historyCheck.ts | |
| import axios from "axios"; |