Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulsechain Network Addition #12948

Closed
wants to merge 10 commits into from
34 changes: 18 additions & 16 deletions packages/networks/src/networks/index.ts
Original file line number Diff line number Diff line change
@@ -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'
50 changes: 50 additions & 0 deletions packages/networks/src/networks/pulsechain.ts
Original file line number Diff line number Diff line change
@@ -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: '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TK

maxFreeClaimCost: 0,
multisig: '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TK

IT looks like Gnosis Safe does not support this chain... can you please confirm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct they have not included pulsechain on the UI, however this network is one of the biggest users of gnosis safes via
https://staker.app/ which is the UI used on pulsechain and ethereum.

The liquid loans team have deployed a cut down version of gnosis on both testnet and mainnet at the below URLs.
https://pulsechainsafe.com/
https://testnet.pulsechainsafe.com/

Let me know if you need more information on these.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point we don't want to add more work to our team to maintain non standards setup.

name: 'pulsechain',
nativeCurrency: {
coingecko: 'pulsechain',
decimals: 18,
name: 'PLS',
symbol: 'PLS',
},
previousDeploys: [],
provider: 'https://rpc.unlock-protocol.com/369',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to deploy a provider for this.

publicLockVersionToDeploy: 13,
publicProvider: 'https://rpc.pulsechain.com',
startBlock: 2247300,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TK

// Graph can be found at https://graph.pulsechain.com/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not a standard https://thegraph.com/ setup you need to send us docs on how to set it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try and get some more info for you on this side of things. Is this a nice to have or required?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for the frontend to work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so there is a community graph node that can be used. I have spoken to the team running this and they have advised while there is no end-user UI at present if you are able to provide the subgraph code you want hosted they will run this up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this is too complex for us to maintain so until there is a proper graph deployment we won't merge this PR.

subgraph: {
endpoint:
'',
endpointV2:
'',
networkName: 'pulsechain',
studioEndpoint: 'unlock-protocol-pulsechain',
},
unlockAddress: '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TK

url: '',
}

export default pulsechain
48 changes: 48 additions & 0 deletions packages/networks/src/networks/pulsechainTestnetV4.ts
Original file line number Diff line number Diff line change
@@ -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
50 changes: 26 additions & 24 deletions provider/src/supportedNetworks.ts
Original file line number Diff line number Diff line change
@@ -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
38 changes: 20 additions & 18 deletions provider/src/types.ts
Original file line number Diff line number Diff line change
@@ -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
}
Loading