diff --git a/packages/networks/src/networks/index.ts b/packages/networks/src/networks/index.ts index 41d37c9b040..d1612c42785 100644 --- a/packages/networks/src/networks/index.ts +++ b/packages/networks/src/networks/index.ts @@ -1,16 +1,18 @@ -export * from './localhost' -export * from './mainnet' -export * from './gnosis' -export * from './polygon' -export * from './bsc' -export * from './optimism' -export * from './mumbai' -export * from './goerli' -export * from './celo' -export * from './arbitrum' -export * from './avalanche' -export * from './palm' -export * from './base-goerli' -export * from './base' -export * from './linea' -export * from './sepolia' +export * from './localhost' +export * from './mainnet' +export * from './gnosis' +export * from './polygon' +export * from './bsc' +export * from './optimism' +export * from './mumbai' +export * from './goerli' +export * from './celo' +export * from './arbitrum' +export * from './avalanche' +export * from './palm' +export * from './base-goerli' +export * from './base' +export * from './linea' +export * from './sepolia' +export * from './pulsechain' +export * from './pulsechainTestnetV4' diff --git a/packages/networks/src/networks/pulsechain.ts b/packages/networks/src/networks/pulsechain.ts new file mode 100644 index 00000000000..e64136ae841 --- /dev/null +++ b/packages/networks/src/networks/pulsechain.ts @@ -0,0 +1,50 @@ +import { NetworkConfig } from '@unlock-protocol/types' + +export const pulsechain: NetworkConfig = { + chain: 'pulsechain', + description: 'Pulsechain is a full system state fork of Ethereum mainnet and maintains upstream compatliblity with the Ethereum code base. It provides lower gas costs and 10s block times and is supported by a community that places importance on permissionless protocols.', + explorer: { + name: 'Pulsechain', + urls: { + address: (address: string) => + `https://scan.pulsechain.com/address/${address}`, + base: `https://scan.pulsechain.com/`, + token: (address: string, holder: string) => + `https://scan.pulsechain.com/token/${address}?a=${holder}`, + transaction: (hash: string) => `https://scan.pulsechain.com/tx/${hash}`, + }, + }, + featured: false, + + fullySubsidizedGas: false, + id: 369, + isTestNetwork: false, + keyManagerAddress: '', + maxFreeClaimCost: 0, + multisig: '', + name: 'pulsechain', + nativeCurrency: { + coingecko: 'pulsechain', + decimals: 18, + name: 'PLS', + symbol: 'PLS', + }, + previousDeploys: [], + provider: 'https://rpc.unlock-protocol.com/369', + publicLockVersionToDeploy: 13, + publicProvider: 'https://rpc.pulsechain.com', + startBlock: 2247300, + // Graph can be found at https://graph.pulsechain.com/ + subgraph: { + endpoint: + '', + endpointV2: + '', + networkName: 'pulsechain', + studioEndpoint: 'unlock-protocol-pulsechain', + }, + unlockAddress: '', + url: '', +} + +export default pulsechain diff --git a/packages/networks/src/networks/pulsechainTestnetV4.ts b/packages/networks/src/networks/pulsechainTestnetV4.ts new file mode 100644 index 00000000000..38fcc465392 --- /dev/null +++ b/packages/networks/src/networks/pulsechainTestnetV4.ts @@ -0,0 +1,48 @@ +import { NetworkConfig } from '@unlock-protocol/types' + +export const pulsechainTestnetV4: NetworkConfig = { + chain: 'pulsechainTestnetV4', + description: 'Pulsechain Testnetv4 is the test ground for Pulsechain which is a full system state fork of Ethereum mainnet and maintains upstream compatliblity with the Ethereum code base. It provides lower gas costs and 10s block times and is supported by a community that places importance on permissionless protocols.', + explorer: { + name: 'pulsechainTestnetV4', + urls: { + address: (address: string) => + `https://scan.v4.testnet.pulsechain.com/address/${address}`, + base: `https://scan.v4.testnet.pulsechain.com/`, + token: (address: string, holder: string) => + `https://scan.v4.testnet.pulsechain.com/token/${address}?a=${holder}`, + transaction: (hash: string) => `https://scan.v4.testnet.pulsechain.com/tx/${hash}`, + }, + }, + featured: false, + fullySubsidizedGas: false, + id: 943, + isTestNetwork: false, + keyManagerAddress: '', + maxFreeClaimCost: 10000, + multisig: '', + name: 'pulsechainTestnetV4', + nativeCurrency: { + decimals: 18, + name: 'tPLS', + symbol: 'tPLS', + }, + previousDeploys: [], + provider: 'https://rpc.unlock-protocol.com/369', + publicLockVersionToDeploy: 13, + publicProvider: 'https://rpc.v4.testnet.pulsechain.com', + startBlock: 2247300, + // Graph can be found at https://scan.v4.testnet.pulsechain.com/graphiql/ + subgraph: { + endpoint: + '', + endpointV2: + '', + networkName: 'pulsechainTestnetV4', + studioEndpoint: 'unlock-protocol-pulsechainTestnetV4', + }, + unlockAddress: '', + url: '', +} + +export default pulsechainTestnetV4 diff --git a/provider/src/supportedNetworks.ts b/provider/src/supportedNetworks.ts index 5b091ffa7bb..df97cbf2af5 100644 --- a/provider/src/supportedNetworks.ts +++ b/provider/src/supportedNetworks.ts @@ -1,24 +1,26 @@ -import { Env } from './types' - -// This is the list of networks currently supported -const supportedNetworks = (env: Env, networkId: string): string | undefined => { - return { - '1': env.MAINNET_PROVIDER, - '5': env.GOERLI_PROVIDER, - '10': env.OPTIMISM_PROVIDER, - '56': env.BSC_PROVIDER, - '100': env.GNOSIS_PROVIDER, - '137': env.POLYGON_PROVIDER, - '42161': env.ARBITRUM_PROVIDER, - '42220': env.CELO_PROVIDER, - '43114': env.AVALANCHE_PROVIDER, - '80001': env.MUMBAI_PROVIDER, - '11297108109': env.PALM_PROVIDER, - '84531': env.BASE_GOERLI_PROVIDER, - '8453': env.BASE_PROVIDER, - '11155111': env.SEPOLIA_PROVIDER, - '59144': env.LINEA_PROVIDER, - }[networkId] -} - -export default supportedNetworks +import { Env } from './types' + +// This is the list of networks currently supported +const supportedNetworks = (env: Env, networkId: string): string | undefined => { + return { + '1': env.MAINNET_PROVIDER, + '5': env.GOERLI_PROVIDER, + '10': env.OPTIMISM_PROVIDER, + '56': env.BSC_PROVIDER, + '100': env.GNOSIS_PROVIDER, + '137': env.POLYGON_PROVIDER, + '42161': env.ARBITRUM_PROVIDER, + '42220': env.CELO_PROVIDER, + '43114': env.AVALANCHE_PROVIDER, + '80001': env.MUMBAI_PROVIDER, + '11297108109': env.PALM_PROVIDER, + '84531': env.BASE_GOERLI_PROVIDER, + '8453': env.BASE_PROVIDER, + '369': env.PULSECHAIN_PROVIDER, + '943': env.PULSECHAIN_TESTNETV4_PROVIDER, + '11155111': env.SEPOLIA_PROVIDER, + '59144': env.LINEA_PROVIDER, + }[networkId] +} + +export default supportedNetworks diff --git a/provider/src/types.ts b/provider/src/types.ts index 844f20c6763..323ce884877 100644 --- a/provider/src/types.ts +++ b/provider/src/types.ts @@ -1,18 +1,20 @@ -export interface Env { - SENTRY_DSN: string - ARBITRUM_PROVIDER: string - AVALANCHE_PROVIDER: string - BSC_PROVIDER: string - CELO_PROVIDER: string - GNOSIS_PROVIDER: string - GOERLI_PROVIDER: string - MAINNET_PROVIDER: string - MUMBAI_PROVIDER: string - OPTIMISM_PROVIDER: string - POLYGON_PROVIDER: string - PALM_PROVIDER: string - BASE_GOERLI_PROVIDER: string - BASE_PROVIDER: string - SEPOLIA_PROVIDER: string - LINEA_PROVIDER: string -} +export interface Env { + SENTRY_DSN: string + ARBITRUM_PROVIDER: string + AVALANCHE_PROVIDER: string + BSC_PROVIDER: string + CELO_PROVIDER: string + GNOSIS_PROVIDER: string + GOERLI_PROVIDER: string + MAINNET_PROVIDER: string + MUMBAI_PROVIDER: string + OPTIMISM_PROVIDER: string + POLYGON_PROVIDER: string + PALM_PROVIDER: string + BASE_GOERLI_PROVIDER: string + BASE_PROVIDER: string + PULSECHAIN_PROVIDER: string + PULSECHAIN_TESTNETV4_PROVIDER: string + SEPOLIA_PROVIDER: string + LINEA_PROVIDER: string +}