ETH props for Callisto
This commit is contained in:
parent
94431f07e7
commit
cdf4b7ff91
|
@ -10,8 +10,9 @@ const networkIDs = {
|
|||
XDAI_CODE: 100,
|
||||
RSK_CODE: 30,
|
||||
RSK_TESTNET_CODE: 31,
|
||||
CALLISTO_NETWORK_CODE: 820
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
networkIDs
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,13 @@ const {
|
|||
RSK_CODE,
|
||||
RSK_TESTNET_CODE,
|
||||
CLASSIC_CODE,
|
||||
CALLISTO_NETWORK_CODE
|
||||
} = networkIDs
|
||||
|
||||
const blockScoutLink = (net, prefix) => `https://blockscout.com/${net}/${prefix}`
|
||||
const etherscanLink = (prefix) => `https://${prefix}.etherscan.io`
|
||||
const rskTestnetExplorerLink = 'https://explorer.testnet.rsk.co'
|
||||
const cloExplorerLink = 'https://explorer2.callisto.network'
|
||||
|
||||
const explorerLink = (networkCode, net, prefix) => {
|
||||
switch (networkCode) {
|
||||
|
@ -28,6 +30,8 @@ const explorerLink = (networkCode, net, prefix) => {
|
|||
return blockScoutLink(net, prefix)
|
||||
case RSK_TESTNET_CODE: // RSK testnet
|
||||
return rskTestnetExplorerLink
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
return cloExplorerLink
|
||||
case ROPSTEN_CODE: // ropsten testnet
|
||||
case RINKEBY_CODE: // rinkeby testnet
|
||||
case KOVAN_CODE: // kovan testnet
|
||||
|
@ -42,6 +46,7 @@ const tokenLink = (networkCode, chain, prefix, tokenAddress, holderAddress) => {
|
|||
const blockscoutLinkStr = `${blockScoutLink(chain, prefix)}/address/${holderAddress}/tokens/${tokenAddress}/token_transfers`
|
||||
const etherscanLinkStr = `${etherscanLink(prefix)}/token/${tokenAddress}?a=${holderAddress}`
|
||||
const rskTestnetExplorerLinkStr = `${rskTestnetExplorerLink}/address/${tokenAddress}`
|
||||
const cloExplorerLinkStr = `${cloExplorerLink}/addr/${tokenAddress}`
|
||||
switch (networkCode) {
|
||||
case MAINNET_CODE: // main net
|
||||
case SOKOL_CODE: // POA Sokol testnet
|
||||
|
@ -52,6 +57,8 @@ const tokenLink = (networkCode, chain, prefix, tokenAddress, holderAddress) => {
|
|||
return blockscoutLinkStr
|
||||
case RSK_TESTNET_CODE: // RSK testnet
|
||||
return rskTestnetExplorerLinkStr
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
return cloExplorerLinkStr
|
||||
case ROPSTEN_CODE: // ropsten testnet
|
||||
case RINKEBY_CODE: // rinkeby testnet
|
||||
case KOVAN_CODE: // kovan testnet
|
||||
|
@ -99,6 +106,9 @@ function getExplorerChain (networkCode) {
|
|||
case CLASSIC_CODE: // ETC mainnet
|
||||
chain = 'etc'
|
||||
break
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
chain = 'clo'
|
||||
break
|
||||
case RSK_CODE: // RSK mainnet
|
||||
chain = 'rsk'
|
||||
break
|
||||
|
|
|
@ -11,6 +11,7 @@ const {
|
|||
RSK_CODE,
|
||||
RSK_TESTNET_CODE,
|
||||
CLASSIC_CODE,
|
||||
CALLISTO_NETWORK_CODE
|
||||
} = networkIDs
|
||||
|
||||
function getNetworkDisplayName(network) {
|
||||
|
@ -38,6 +39,8 @@ function getNetworkDisplayName(network) {
|
|||
return 'RSK Testnet'
|
||||
case CLASSIC_CODE:
|
||||
return 'Ethereum Classic'
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
return 'Callisto Network'
|
||||
default:
|
||||
return 'Unknown Private Network'
|
||||
}
|
||||
|
@ -58,6 +61,8 @@ function getNetworkCoinName(network) {
|
|||
return 'GöETH'
|
||||
case CLASSIC_CODE:
|
||||
return 'ETC'
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
return 'CLO'
|
||||
default:
|
||||
return 'ETH'
|
||||
}
|
||||
|
@ -71,6 +76,7 @@ function isTestnet(network) {
|
|||
case XDAI_CODE:
|
||||
case RSK_CODE:
|
||||
case CLASSIC_CODE:
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
return false
|
||||
default:
|
||||
return true
|
||||
|
@ -81,4 +87,4 @@ module.exports = {
|
|||
getNetworkDisplayName,
|
||||
getNetworkCoinName,
|
||||
isTestnet
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ const {
|
|||
RSK_CODE,
|
||||
RSK_TESTNET_CODE,
|
||||
CLASSIC_CODE,
|
||||
CALLISTO_NETWORK_CODE
|
||||
} = networkIDs
|
||||
|
||||
function getRPCEndpoints(network) {
|
||||
|
@ -38,6 +39,8 @@ function getRPCEndpoints(network) {
|
|||
return ['https://public-node.testnet.rsk.co']
|
||||
case CLASSIC_CODE:
|
||||
return ['https://www.ethercluster.com/etc']
|
||||
case CALLISTO_NETWORK_CODE:
|
||||
return ['https://clo-geth.0xinfra.com']
|
||||
default:
|
||||
return []
|
||||
}
|
||||
|
@ -45,4 +48,4 @@ function getRPCEndpoints(network) {
|
|||
|
||||
module.exports = {
|
||||
getRPCEndpoints
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue