Skip to content
Permalink
Browse files

Merge pull request MyCryptoHQ#2384 from MyCryptoHQ/feature/goerli-net…

…work

Feature/goerli network
  • Loading branch information...
SharonManrique committed Feb 25, 2019
2 parents 4234ef1 + c81386e commit c3387685e4b241905c09a6d90f68323205eef5c8
@@ -14,7 +14,7 @@ import {
import NetworkOption from './NetworkOption';
import './NetworkSelector.scss';

const CORE_NETWORKS = ['ETH', 'ETC', 'Ropsten', 'Kovan', 'Rinkeby'];
const CORE_NETWORKS = ['ETH', 'ETC', 'Ropsten', 'Kovan', 'Rinkeby', 'Goerli'];

interface OwnProps {
openCustomNodeModal(): void;
@@ -0,0 +1 @@
[]
@@ -3,6 +3,7 @@ import ETH from './eth.json';
import EXP from './exp.json';
import Rinkeby from './rinkeby.json';
import Ropsten from './ropsten.json';
import Goerli from './goerli.json';
import RSK from './rsk.json';
import UBQ from './ubq.json';
import ESN from './esn.json';
@@ -15,6 +16,7 @@ export default {
EXP,
Rinkeby,
Ropsten,
Goerli,
RSK,
UBQ,
ESN,
@@ -0,0 +1 @@
[]
@@ -4,6 +4,7 @@ import EXP from './exp.json';
import Kovan from './kovan.json';
import Rinkeby from './rinkeby.json';
import Ropsten from './ropsten.json';
import Goerli from './goerli.json';
import RSK from './rsk.json';
import UBQ from './ubq.json';
import ESN from './esn.json';
@@ -17,6 +18,7 @@ export default {
Kovan,
Rinkeby,
Ropsten,
Goerli,
RSK,
UBQ,
ESN,
@@ -9,7 +9,7 @@ interface PrioritizedNetworkOptions {
secondaryNetworks: any[];
}

export const CORE_NETWORKS = ['ETH', 'ETC', 'Ropsten', 'Kovan', 'Rinkeby'];
export const CORE_NETWORKS = ['ETH', 'ETC', 'Ropsten', 'Kovan', 'Rinkeby', 'Goerli'];

export function generateNetworksToNodes(nodes: NodeConfig[]): NetworkOptions {
return Object.values(nodes).reduce((networksToNodes: NetworkOptions, nextNode) => {
@@ -141,6 +141,28 @@ export const STATIC_NETWORKS_INITIAL_STATE: types.ConfigStaticNetworksState = {
},
gasPriceSettings: testnetDefaultGasPrice
},
Goerli: {
id: 'Goerli',
name: 'Goerli',
unit: 'ETH',
chainId: 5,
isCustom: false,
color: '#adc101',
blockExplorer: makeExplorer({
name: 'Etherscan',
origin: 'https://goerli.etherscan.io/'
}),
tokens: [],
contracts: [],
isTestnet: true,
dPathFormats: {
[SecureWalletName.TREZOR]: ETH_TESTNET,
[SecureWalletName.SAFE_T]: ETH_TESTNET,
[SecureWalletName.LEDGER_NANO_S]: ETH_LEDGER,
[InsecureWalletName.MNEMONIC_PHRASE]: ETH_TESTNET
},
gasPriceSettings: testnetDefaultGasPrice
},
ETC: {
id: 'ETC',
name: 'Ethereum Classic',
@@ -60,6 +60,21 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
}
],

Goerli: [
{
name: makeNodeName('Goerli', 'mycrypto'),
type: 'rpc',
service: 'MyCrypto',
url: 'https://goerli.mycryptoapi.com'
},
{
name: makeNodeName('Goerli', 'etherscan'),
type: 'etherscan',
service: 'Etherscan',
url: 'https://api-goerli.etherscan.io/api'
}
],

Gangnam: [
{
name: makeNodeName('Gangnam', 'progtest'),
@@ -74,7 +74,7 @@ export const makeAutoNodeName = (network: string) => makeNodeName(network, autoN
/**
* Assemble shepherd providers from node configs. Includes pseudo-configs
*/
const WEB3_NETWORKS = ['ETH', 'Ropsten', 'Kovan', 'Rinkeby', 'ETC'];
const WEB3_NETWORKS = ['ETH', 'Ropsten', 'Kovan', 'Rinkeby', 'ETC', 'Goerli'];
Object.entries(NODE_CONFIGS).forEach(([network, nodes]) => {
const nodeProviderConf = makeProviderConfig({ network });
const web3ProviderConf = WEB3_NETWORKS.includes(network)
@@ -5,6 +5,7 @@ type StaticNetworkIds =
| 'Ropsten'
| 'Kovan'
| 'Rinkeby'
| 'Goerli'
| 'Gangnam'
| 'ETC'
| 'UBQ'

0 comments on commit c338768

Please sign in to comment.
You can’t perform that action at this time.