Socket
Socket
Sign inDemoInstall

etherscan-link

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

6

account-link.js
const prefixForNetwork = require('./prefix-for-network')
module.exports = function (hash, network) {
module.exports = function (address, network) {
const net = parseInt(network)
const prefix = prefixForNetwork(network)
return `http://${prefix}etherscan.io/tx/${hash}`
return `http://${prefix}etherscan.io/address/${address}`
}

@@ -1,27 +0,8 @@

module.exports = function (address, network) {
const net = parseInt(network)
let link
switch (net) {
case 1: // main net
link = `https://etherscan.io/address/${address}`
break
case 2: // morden test net
link = `https://morden.etherscan.io/address/${address}`
break
case 3: // ropsten test net
link = `https://ropsten.etherscan.io/address/${address}`
break
case 4: // rinkeby test net
link = `https://rinkeby.etherscan.io/address/${address}`
break
case 42: // kovan test net
link = `https://kovan.etherscan.io/address/${address}`
break
default:
link = ''
break
}
const createExplorerLink = require('./explorer-link')
const createAccountLink = require('./account-link')
return link
module.exports = {
createExplorerLink,
createAccountLink,
}
{
"name": "etherscan-link",
"version": "1.0.1",
"version": "1.0.2",
"description": "A library for generating etherscan links.",
"main": "index.js",
"scripts": {
"test": "node test"
"test": "mocha"
},

@@ -9,0 +9,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc