@ -167,6 +167,7 @@ export const NETWORK_TYPES = {
RINKEBY : 'rinkeby' ,
RINKEBY : 'rinkeby' ,
ROPSTEN : 'ropsten' ,
ROPSTEN : 'ropsten' ,
RPC : 'rpc' ,
RPC : 'rpc' ,
SEPOLIA : 'sepolia' ,
} as const ;
} as const ;
/ * *
/ * *
@ -194,6 +195,7 @@ export const NETWORK_IDS = {
GOERLI : '5' ,
GOERLI : '5' ,
KOVAN : '42' ,
KOVAN : '42' ,
LOCALHOST : '1337' ,
LOCALHOST : '1337' ,
SEPOLIA : '6' ,
} as const ;
} as const ;
/ * *
/ * *
@ -217,6 +219,7 @@ export const CHAIN_IDS = {
ARBITRUM : '0xa4b1' ,
ARBITRUM : '0xa4b1' ,
HARMONY : '0x63564c40' ,
HARMONY : '0x63564c40' ,
PALM : '0x2a15c308d' ,
PALM : '0x2a15c308d' ,
SEPOLIA : '0xaa36a7' ,
} as const ;
} as const ;
/ * *
/ * *
@ -230,6 +233,7 @@ export const RINKEBY_DISPLAY_NAME = 'Rinkeby';
export const KOVAN_DISPLAY_NAME = 'Kovan' ;
export const KOVAN_DISPLAY_NAME = 'Kovan' ;
export const MAINNET_DISPLAY_NAME = 'Ethereum Mainnet' ;
export const MAINNET_DISPLAY_NAME = 'Ethereum Mainnet' ;
export const GOERLI_DISPLAY_NAME = 'Goerli' ;
export const GOERLI_DISPLAY_NAME = 'Goerli' ;
export const SEPOLIA_DISPLAY_NAME = 'Sepolia' ;
export const LOCALHOST_DISPLAY_NAME = 'Localhost 8545' ;
export const LOCALHOST_DISPLAY_NAME = 'Localhost 8545' ;
export const BSC_DISPLAY_NAME = 'Binance Smart Chain' ;
export const BSC_DISPLAY_NAME = 'Binance Smart Chain' ;
export const POLYGON_DISPLAY_NAME = 'Polygon' ;
export const POLYGON_DISPLAY_NAME = 'Polygon' ;
@ -263,6 +267,7 @@ export const MAINNET_RPC_URL = getRpcUrl({
network : NETWORK_TYPES.MAINNET ,
network : NETWORK_TYPES.MAINNET ,
} ) ;
} ) ;
export const GOERLI_RPC_URL = getRpcUrl ( { network : NETWORK_TYPES.GOERLI } ) ;
export const GOERLI_RPC_URL = getRpcUrl ( { network : NETWORK_TYPES.GOERLI } ) ;
export const SEPOLIA_RPC_URL = getRpcUrl ( { network : NETWORK_TYPES.SEPOLIA } ) ;
export const LOCALHOST_RPC_URL = 'http://localhost:8545' ;
export const LOCALHOST_RPC_URL = 'http://localhost:8545' ;
/ * *
/ * *
@ -305,6 +310,7 @@ export const INFURA_PROVIDER_TYPES = [
NETWORK_TYPES . KOVAN ,
NETWORK_TYPES . KOVAN ,
NETWORK_TYPES . MAINNET ,
NETWORK_TYPES . MAINNET ,
NETWORK_TYPES . GOERLI ,
NETWORK_TYPES . GOERLI ,
NETWORK_TYPES . SEPOLIA ,
] ;
] ;
export const TEST_CHAINS = [
export const TEST_CHAINS = [
@ -312,6 +318,7 @@ export const TEST_CHAINS = [
CHAIN_IDS . RINKEBY ,
CHAIN_IDS . RINKEBY ,
CHAIN_IDS . GOERLI ,
CHAIN_IDS . GOERLI ,
CHAIN_IDS . KOVAN ,
CHAIN_IDS . KOVAN ,
CHAIN_IDS . SEPOLIA ,
CHAIN_IDS . LOCALHOST ,
CHAIN_IDS . LOCALHOST ,
] ;
] ;
@ -336,6 +343,9 @@ export const TEST_NETWORK_TICKER_MAP: {
[ NETWORK_TYPES . GOERLI ] : ` ${ typedCapitalize ( NETWORK_TYPES . GOERLI ) } ${
[ NETWORK_TYPES . GOERLI ] : ` ${ typedCapitalize ( NETWORK_TYPES . GOERLI ) } ${
CURRENCY_SYMBOLS . ETH
CURRENCY_SYMBOLS . ETH
} ` ,
} ` ,
[ NETWORK_TYPES . SEPOLIA ] : ` ${ typedCapitalize ( NETWORK_TYPES . SEPOLIA ) } ${
CURRENCY_SYMBOLS . ETH
} ` ,
} ;
} ;
/ * *
/ * *
@ -362,6 +372,11 @@ export const BUILT_IN_NETWORKS = {
chainId : CHAIN_IDS.GOERLI ,
chainId : CHAIN_IDS.GOERLI ,
ticker : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . GOERLI ] ,
ticker : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . GOERLI ] ,
} ,
} ,
[ NETWORK_TYPES . SEPOLIA ] : {
networkId : NETWORK_IDS.SEPOLIA ,
chainId : CHAIN_IDS.SEPOLIA ,
ticker : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . SEPOLIA ] ,
} ,
[ NETWORK_TYPES . MAINNET ] : {
[ NETWORK_TYPES . MAINNET ] : {
networkId : NETWORK_IDS.MAINNET ,
networkId : NETWORK_IDS.MAINNET ,
chainId : CHAIN_IDS.MAINNET ,
chainId : CHAIN_IDS.MAINNET ,
@ -378,12 +393,14 @@ export const NETWORK_TO_NAME_MAP = {
[ NETWORK_TYPES . KOVAN ] : KOVAN_DISPLAY_NAME ,
[ NETWORK_TYPES . KOVAN ] : KOVAN_DISPLAY_NAME ,
[ NETWORK_TYPES . MAINNET ] : MAINNET_DISPLAY_NAME ,
[ NETWORK_TYPES . MAINNET ] : MAINNET_DISPLAY_NAME ,
[ NETWORK_TYPES . GOERLI ] : GOERLI_DISPLAY_NAME ,
[ NETWORK_TYPES . GOERLI ] : GOERLI_DISPLAY_NAME ,
[ NETWORK_TYPES . SEPOLIA ] : SEPOLIA_DISPLAY_NAME ,
[ NETWORK_TYPES . LOCALHOST ] : LOCALHOST_DISPLAY_NAME ,
[ NETWORK_TYPES . LOCALHOST ] : LOCALHOST_DISPLAY_NAME ,
[ NETWORK_IDS . ROPSTEN ] : ROPSTEN_DISPLAY_NAME ,
[ NETWORK_IDS . ROPSTEN ] : ROPSTEN_DISPLAY_NAME ,
[ NETWORK_IDS . RINKEBY ] : RINKEBY_DISPLAY_NAME ,
[ NETWORK_IDS . RINKEBY ] : RINKEBY_DISPLAY_NAME ,
[ NETWORK_IDS . KOVAN ] : KOVAN_DISPLAY_NAME ,
[ NETWORK_IDS . KOVAN ] : KOVAN_DISPLAY_NAME ,
[ NETWORK_IDS . GOERLI ] : GOERLI_DISPLAY_NAME ,
[ NETWORK_IDS . GOERLI ] : GOERLI_DISPLAY_NAME ,
[ NETWORK_IDS . SEPOLIA ] : SEPOLIA_DISPLAY_NAME ,
[ NETWORK_IDS . MAINNET ] : MAINNET_DISPLAY_NAME ,
[ NETWORK_IDS . MAINNET ] : MAINNET_DISPLAY_NAME ,
[ NETWORK_IDS . LOCALHOST ] : LOCALHOST_DISPLAY_NAME ,
[ NETWORK_IDS . LOCALHOST ] : LOCALHOST_DISPLAY_NAME ,
@ -391,13 +408,15 @@ export const NETWORK_TO_NAME_MAP = {
[ CHAIN_IDS . RINKEBY ] : RINKEBY_DISPLAY_NAME ,
[ CHAIN_IDS . RINKEBY ] : RINKEBY_DISPLAY_NAME ,
[ CHAIN_IDS . KOVAN ] : KOVAN_DISPLAY_NAME ,
[ CHAIN_IDS . KOVAN ] : KOVAN_DISPLAY_NAME ,
[ CHAIN_IDS . GOERLI ] : GOERLI_DISPLAY_NAME ,
[ CHAIN_IDS . GOERLI ] : GOERLI_DISPLAY_NAME ,
[ CHAIN_IDS . SEPOLIA ] : SEPOLIA_DISPLAY_NAME ,
[ CHAIN_IDS . MAINNET ] : MAINNET_DISPLAY_NAME ,
[ CHAIN_IDS . MAINNET ] : MAINNET_DISPLAY_NAME ,
[ CHAIN_IDS . GOERLI ] : LOCALHOST_DISPLAY_NAME ,
[ CHAIN_IDS . LOCALHOST ] : LOCALHOST_DISPLAY_NAME ,
} as const ;
} as const ;
export const CHAIN_ID_TO_TYPE_MAP = {
export const CHAIN_ID_TO_TYPE_MAP = {
[ CHAIN_IDS . MAINNET ] : NETWORK_TYPES . MAINNET ,
[ CHAIN_IDS . MAINNET ] : NETWORK_TYPES . MAINNET ,
[ CHAIN_IDS . GOERLI ] : NETWORK_TYPES . GOERLI ,
[ CHAIN_IDS . GOERLI ] : NETWORK_TYPES . GOERLI ,
[ CHAIN_IDS . SEPOLIA ] : NETWORK_TYPES . SEPOLIA ,
[ CHAIN_IDS . KOVAN ] : NETWORK_TYPES . KOVAN ,
[ CHAIN_IDS . KOVAN ] : NETWORK_TYPES . KOVAN ,
[ CHAIN_IDS . LOCALHOST ] : NETWORK_TYPES . LOCALHOST ,
[ CHAIN_IDS . LOCALHOST ] : NETWORK_TYPES . LOCALHOST ,
[ CHAIN_IDS . RINKEBY ] : NETWORK_TYPES . RINKEBY ,
[ CHAIN_IDS . RINKEBY ] : NETWORK_TYPES . RINKEBY ,
@ -409,6 +428,7 @@ export const CHAIN_ID_TO_RPC_URL_MAP = {
[ CHAIN_IDS . RINKEBY ] : RINKEBY_RPC_URL ,
[ CHAIN_IDS . RINKEBY ] : RINKEBY_RPC_URL ,
[ CHAIN_IDS . KOVAN ] : KOVAN_RPC_URL ,
[ CHAIN_IDS . KOVAN ] : KOVAN_RPC_URL ,
[ CHAIN_IDS . GOERLI ] : GOERLI_RPC_URL ,
[ CHAIN_IDS . GOERLI ] : GOERLI_RPC_URL ,
[ CHAIN_IDS . SEPOLIA ] : SEPOLIA_RPC_URL ,
[ CHAIN_IDS . MAINNET ] : MAINNET_RPC_URL ,
[ CHAIN_IDS . MAINNET ] : MAINNET_RPC_URL ,
[ CHAIN_IDS . LOCALHOST ] : LOCALHOST_RPC_URL ,
[ CHAIN_IDS . LOCALHOST ] : LOCALHOST_RPC_URL ,
} as const ;
} as const ;
@ -429,12 +449,14 @@ export const NETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP = {
[ NETWORK_IDS . ROPSTEN ] : NETWORK_TYPES . ROPSTEN ,
[ NETWORK_IDS . ROPSTEN ] : NETWORK_TYPES . ROPSTEN ,
[ NETWORK_IDS . RINKEBY ] : NETWORK_TYPES . RINKEBY ,
[ NETWORK_IDS . RINKEBY ] : NETWORK_TYPES . RINKEBY ,
[ NETWORK_IDS . GOERLI ] : NETWORK_TYPES . GOERLI ,
[ NETWORK_IDS . GOERLI ] : NETWORK_TYPES . GOERLI ,
[ NETWORK_IDS . SEPOLIA ] : NETWORK_TYPES . SEPOLIA ,
[ NETWORK_IDS . MAINNET ] : NETWORK_NAMES . HOMESTEAD ,
[ NETWORK_IDS . MAINNET ] : NETWORK_NAMES . HOMESTEAD ,
} as const ;
} as const ;
export const CHAIN_ID_TO_NETWORK_ID_MAP = {
export const CHAIN_ID_TO_NETWORK_ID_MAP = {
[ CHAIN_IDS . MAINNET ] : NETWORK_IDS . MAINNET ,
[ CHAIN_IDS . MAINNET ] : NETWORK_IDS . MAINNET ,
[ CHAIN_IDS . GOERLI ] : NETWORK_IDS . GOERLI ,
[ CHAIN_IDS . GOERLI ] : NETWORK_IDS . GOERLI ,
[ CHAIN_IDS . SEPOLIA ] : NETWORK_IDS . SEPOLIA ,
[ CHAIN_IDS . KOVAN ] : NETWORK_IDS . KOVAN ,
[ CHAIN_IDS . KOVAN ] : NETWORK_IDS . KOVAN ,
[ CHAIN_IDS . LOCALHOST ] : NETWORK_IDS . LOCALHOST ,
[ CHAIN_IDS . LOCALHOST ] : NETWORK_IDS . LOCALHOST ,
[ CHAIN_IDS . RINKEBY ] : NETWORK_IDS . RINKEBY ,
[ CHAIN_IDS . RINKEBY ] : NETWORK_IDS . RINKEBY ,
@ -530,6 +552,10 @@ export const BUYABLE_CHAINS_MAP: {
nativeCurrency : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . GOERLI ] ,
nativeCurrency : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . GOERLI ] ,
network : BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME ,
network : BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME ,
} ,
} ,
[ CHAIN_IDS . SEPOLIA ] : {
nativeCurrency : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . SEPOLIA ] ,
network : BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME ,
} ,
[ CHAIN_IDS . KOVAN ] : {
[ CHAIN_IDS . KOVAN ] : {
nativeCurrency : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . KOVAN ] ,
nativeCurrency : TEST_NETWORK_TICKER_MAP [ NETWORK_TYPES . KOVAN ] ,
network : BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME ,
network : BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME ,