{"id":28425187,"url":"https://github.com/metamask/etherscan-link","last_synced_at":"2025-06-28T04:31:24.084Z","repository":{"id":25918988,"uuid":"106891999","full_name":"MetaMask/etherscan-link","owner":"MetaMask","description":"A library for generating Etherscan links","archived":false,"fork":false,"pushed_at":"2025-03-28T16:14:32.000Z","size":1021,"stargazers_count":43,"open_issues_count":5,"forks_count":44,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-06-01T22:12:33.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MetaMask.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":"metamask","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-10-14T02:38:17.000Z","updated_at":"2025-05-25T12:14:26.000Z","dependencies_parsed_at":"2024-01-11T01:01:25.863Z","dependency_job_id":"cdb19deb-eb76-43de-a0f2-17b130e0af31","html_url":"https://github.com/MetaMask/etherscan-link","commit_stats":{"total_commits":51,"total_committers":16,"mean_commits":3.1875,"dds":0.8235294117647058,"last_synced_commit":"8d6e517f8921d6c11ff1fcd0bd239a7c49772983"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/MetaMask/etherscan-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetaMask%2Fetherscan-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetaMask%2Fetherscan-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetaMask%2Fetherscan-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetaMask%2Fetherscan-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetaMask","download_url":"https://codeload.github.com/MetaMask/etherscan-link/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetaMask%2Fetherscan-link/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262375669,"owners_count":23301335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T10:36:30.749Z","updated_at":"2025-06-28T04:31:24.073Z","avatar_url":"https://github.com/MetaMask.png","language":"JavaScript","readme":"# Etherscan Link Generator\n\n## Installation\n\n`npm install '@metamask/etherscan-link' -S`\n\n## Usage\n\n```javascript\nconst etherscanLink = require('@metamask/etherscan-link')\nconst networkId = '1'\nconst chainId = '0x1'\nconst account = '0xFDEa65C8e26263F6d9A1B5de9555D2931A33b825'\nconst accountLink = etherscanLink.createAccountLink(account, networkId)\nconst accountLinkForChain = etherscanLink.createAccountLinkForChain(account, chainId)\n\nconst hash = '0xa7540793de6b6ca7d3c948a8cc0a163bf107f5535a69353162ea9dec7ee7beca'\nconst txLink = etherscanLink.createExplorerLink(hash, networkId)\nconst txtLinkForChain = etherscanLink.createExplorerLinkForChain(hash, chainId)\n\nconst token = '0xdac17f958d2ee523a2206206994597c13d831ec7'\nconst tokenTrackerLink = etherscanLink.createTokenTrackerLink(token, networkId)\n// You can also track token balances by account\nconst accountTokenTrackerLink = etherscanLink.createTokenTrackerLink(token, networkId, account)\n\nconst accountTokenTrackerLinkForChain = etherscanLink.createTokenTrackerLinkForChain(token, chainId, account)\n\n// Create urls for interacting with custom networks\nconst customNetworkUrl = 'https://customnetwork.com/'\n\nconst customTokenTrackerLink = etherscanLink.createCustomTokenTrackerLink(token, customNetworkUrl)\n\nconst customAccountLink = etherscanLink.createCustomAccountLink(account, customNetworkUrl)\n\nconst customExplorerLink = etherscanLink.createCustomExplorerLink(hash, customNetworkUrl)\n\n// Generate custom or native block explorer link based on rcpPrefs\nconst blockExplorerLink = etherscanLink.getBlockExplorerLink(transaction, rcpPrefs)\n\n// Generate account link for custom or native network \nconst getAccountLink = etherscanLink.getAccountLink(address, chainId, rpcPrefs, networkId)\n\n// Generate token tracker link for custom or native network \nconst tokenTrackerLink = etherscanLink.getTokenTrackerLink(tokenAddress, chainId, networkId, holderAddress, rpcPrefs)\n```\n\n## Running tests\n\n```bash\nyarn test\n```\n","funding_links":["https://opencollective.com/metamask"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetamask%2Fetherscan-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetamask%2Fetherscan-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetamask%2Fetherscan-link/lists"}