Skip to content

Commit

Permalink
Add PulseChain network
Browse files Browse the repository at this point in the history
  • Loading branch information
bretep committed Aug 15, 2024
1 parent a3fbf6d commit 5171503
Show file tree
Hide file tree
Showing 18 changed files with 180 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/cli/src/live-common-setup-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ setSupportedCurrencies([
"klaytn",
"polygon_zk_evm",
"polygon_zk_evm_testnet",
"pulsechain",
"pulsechain_testnet",
"base",
"base_sepolia",
"stacks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ setSupportedCurrencies([
"klaytn",
"polygon_zk_evm",
"polygon_zk_evm_testnet",
"pulsechain",
"pulsechain_testnet",
"base",
"base_sepolia",
"stacks",
Expand Down
2 changes: 2 additions & 0 deletions apps/ledger-live-mobile/src/live-common-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ setSupportedCurrencies([
"klaytn",
"polygon_zk_evm",
"polygon_zk_evm_testnet",
"pulsechain",
"pulsechain_testnet",
"base",
"base_sepolia",
"stacks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export const mocks: AppManifest[] = [
"klaytn",
"polygon_zk_evm",
"polygon_zk_evm_testnet",
"pulsechain",
"pulsechain_testnet",
"base",
"base_goerli",
"base_sepolia",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) {
const coreum = useFeature("currencyCoreum");
const polygonZkEvm = useFeature("currencyPolygonZkEvm");
const polygonZkEvmTestnet = useFeature("currencyPolygonZkEvmTestnet");
const pulseChain = useFeature("currencyPulseChain");
const pulseChainTestnet = useFeature("currencyPulseChainTestnet");
const base = useFeature("currencyBase");
const baseSepolia = useFeature("currencyBaseSepolia");
const klaytn = useFeature("currencyKlaytn");
Expand Down Expand Up @@ -136,6 +138,8 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) {
coreum,
polygon_zk_evm: polygonZkEvm,
polygon_zk_evm_testnet: polygonZkEvmTestnet,
pulsechain: pulseChain,
pulsechain_testnet: pulseChainTestnet,
base,
base_sepolia: baseSepolia,
klaytn,
Expand Down Expand Up @@ -184,6 +188,8 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) {
coreum,
polygonZkEvm,
polygonZkEvmTestnet,
pulseChain,
pulseChainTestnet,
base,
baseSepolia,
klaytn,
Expand Down
32 changes: 32 additions & 0 deletions libs/ledger-live-common/src/families/evm/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,22 @@ const evmConfig: CurrencyLiveConfigDefinition = {
},
},
},
config_currency_pulsechain: {
type: "object",
default: {
status: {
type: "active",
},
node: {
type: "external",
uri: "https://rpc.pulsechain.com",
},
explorer: {
type: "blockscout",
uri: "https://api.scan.pulsechain.com/api",
},
},
},
config_currency_base: {
type: "object",
default: {
Expand Down Expand Up @@ -669,6 +685,22 @@ const evmConfig: CurrencyLiveConfigDefinition = {
explorer: { type: "etherscan", uri: "https://api-testnet-zkevm.polygonscan.com/api" },
},
},
config_currency_pulsechain_testnet: {
type: "object",
default: {
status: {
type: "active",
},
node: {
type: "external",
uri: "https://rpc.v4.testnet.pulsechain.com",
},
explorer: {
type: "blockscout",
uri: "https://api.scan.v4.testnet.pulsechain.com/api",
},
},
},
config_currency_base_sepolia: {
type: "object",
default: {
Expand Down
2 changes: 2 additions & 0 deletions libs/ledger-live-common/src/featureFlags/defaultFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export const CURRENCY_DEFAULT_FEATURES = {
currencyPersistence: DEFAULT_FEATURE,
currencyPolygonZkEvm: DEFAULT_FEATURE,
currencyPolygonZkEvmTestnet: DEFAULT_FEATURE,
currencyPulseChain: DEFAULT_FEATURE,
currencyPulseChainTestnet: DEFAULT_FEATURE,
currencyQuicksilver: DEFAULT_FEATURE,
currencyRsk: DEFAULT_FEATURE,
currencySecretNetwork: DEFAULT_FEATURE,
Expand Down
2 changes: 2 additions & 0 deletions libs/ledgerjs/packages/cryptoassets/src/abandonseed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const abandonSeedAddresses: Partial<Record<CryptoCurrency["id"], string>> = {
klaytn: EVM_DEAD_ADDRESS,
polygon_zk_evm: EVM_DEAD_ADDRESS,
polygon_zk_evm_testnet: EVM_DEAD_ADDRESS,
pulsechain: EVM_DEAD_ADDRESS,
pulsechain_testnet: EVM_DEAD_ADDRESS,
base: EVM_DEAD_ADDRESS,
base_sepolia: EVM_DEAD_ADDRESS,
stacks: "SP3KS7VMY2ZNE6SB88PHR4SKRK2EEPHS8N8MCCBR9",
Expand Down
83 changes: 83 additions & 0 deletions libs/ledgerjs/packages/cryptoassets/src/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4003,6 +4003,89 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
},
],
},
pulsechain: {
type: "CryptoCurrency",
id: "pulsechain",
coinType: CoinType.ETH,
name: "PulseChain",
managerAppName: "Ethereum",
ticker: "PLS",
scheme: "pulsechain",
color: "#a928ff",
family: "evm",
blockAvgTime: 10,
ethereumLikeInfo: {
chainId: 369,
},
units: [
{
name: "Pulse",
code: "PLS",
magnitude: 18,
},
{
name: "beat",
code: "beat",
magnitude: 9,
},
{
name: "impulse",
code: "impulse",
magnitude: 0,
},
],
explorerViews: [
{
tx: "https://scan.pulsechain.com/tx/$hash",
address: "https://scan.pulsechain.com/address/$address",
token: "https://scan.pulsechain.com/token/$contractAddress",
},
],
keywords: ["pulse", "pls", "pulsechain", "pulse chain"],
explorerId: "pls",
},
pulsechain_testnet: {
type: "CryptoCurrency",
id: "pulsechain_testnet",
coinType: CoinType.ETH,
name: "PulseChain Testnet",
managerAppName: "Ethereum",
ticker: "tPLS",
scheme: "pulsechain_testnet",
color: "#2894ff",
family: "evm",
blockAvgTime: 10,
isTestnetFor: "pulsechain",
ethereumLikeInfo: {
chainId: 943,
},
units: [
{
name: "Test Pulse",
code: "tPLS",
magnitude: 18,
},
{
name: "beat",
code: "beat",
magnitude: 9,
},
{
name: "impulse",
code: "impulse",
magnitude: 0,
},
],
explorerViews: [
{
tx: "https://scan.v4.testnet.pulsechain.com/#/tx/$hash",
address: "https://scan.v4.testnet.pulsechain.com/#/address/$address",
token: "https://scan.v4.testnet.pulsechain.com/#/token/$contractAddress",
},
],
keywords: ["pulse", "pls", "pulsechain", "pulse chain", "tpls", "test pulse"],
explorerId: "pls",
},
base: {
type: "CryptoCurrency",
id: "base",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
4 changes: 4 additions & 0 deletions libs/ledgerjs/packages/cryptoassets/src/data/evm/369/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as tokens } from "./erc20.json";
export { default as signatures } from "./erc20-signatures.json";
export { default as hash } from "./erc20-hash.json";
export { default as signaturesHash } from "./erc20-signatures-hash.json";
3 changes: 3 additions & 0 deletions libs/ledgerjs/packages/types-cryptoassets/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export type CryptoCurrencyId =
| "polkadot"
| "polygon"
| "poswallet"
| "pulsechain"
| "pulsechain_testnet"
| "qrl"
| "qtum"
| "quicksilver"
Expand Down Expand Up @@ -180,6 +182,7 @@ export type LedgerExplorerId =
| "ltc"
| "pivx"
| "posw"
| "pls"
| "qtum"
| "strat"
| "zec"
Expand Down
2 changes: 2 additions & 0 deletions libs/ledgerjs/packages/types-live/src/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export type CurrencyFeatures = {
currencyCoreum: DefaultFeature;
currencyPolygonZkEvm: DefaultFeature;
currencyPolygonZkEvmTestnet: DefaultFeature;
currencyPulseChain: DefaultFeature;
currencyPulseChainTestnet: DefaultFeature;
currencyBase: DefaultFeature;
currencyBaseSepolia: DefaultFeature;
currencyKlaytn: DefaultFeature;
Expand Down
17 changes: 17 additions & 0 deletions libs/ui/packages/crypto-icons/src/svg/PLS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions libs/ui/packages/crypto-icons/src/svg/TPLS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5171503

Please sign in to comment.