From cdeaf253efaf4ab817ed82caea8e23c369d9b05a Mon Sep 17 00:00:00 2001 From: Nuno Alexandre Date: Mon, 16 Sep 2024 16:51:16 +0200 Subject: [PATCH 1/2] wip: Drop Rococo in favour of Paseo --- app/src/__tests__/Transfer.test.tsx | 2 +- app/src/config/registry.ts | 45 +++++++++++------------------ app/src/context/snowbridge.tsx | 2 +- app/src/store/environmentStore.ts | 2 +- app/src/utils/transfer.ts | 4 +-- 5 files changed, 22 insertions(+), 33 deletions(-) diff --git a/app/src/__tests__/Transfer.test.tsx b/app/src/__tests__/Transfer.test.tsx index d768abcb..f7e10257 100644 --- a/app/src/__tests__/Transfer.test.tsx +++ b/app/src/__tests__/Transfer.test.tsx @@ -49,7 +49,7 @@ describe('Transfer', () => { // Polkadot-native chains should result in a basic chain id expect(getDestChainId(Mainnet.AssetHub)).toBe(Mainnet.AssetHub.chainId.toString()) expect(getDestChainId(Mainnet.Mythos)).toBe(Mainnet.Mythos.chainId.toString()) - expect(getDestChainId(Testnet.RococoAssetHub)).toBe(Testnet.RococoAssetHub.chainId.toString()) + expect(getDestChainId(Testnet.PaseoAssetHub)).toBe(Testnet.PaseoAssetHub.chainId.toString()) }) it('convert amount to string', () => { diff --git a/app/src/config/registry.ts b/app/src/config/registry.ts index 765c8cbd..c7caf416 100644 --- a/app/src/config/registry.ts +++ b/app/src/config/registry.ts @@ -217,7 +217,7 @@ export namespace Mainnet { } } -/* Testnet :: Rococo - Sepolia */ +/* Testnet :: Paseo - Sepolia */ export namespace Testnet { // Chains export const Sepolia: Chain = { @@ -230,15 +230,15 @@ export namespace Testnet { supportedAddressTypes: ['evm'], } - export const RococoAssetHub: Chain = { - uid: 'rococo-assethub', - name: 'Rococo Asset Hub', - logoURI: 'https://cnews24.ru/uploads/d41/d419a4c7028eaf6864f972e554d761e7b10e5d06.png', + export const PaseoAssetHub: Chain = { + uid: 'paseo-assethub', + name: 'Paseo Asset Hub', + logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/6636.png', chainId: 1000, network: Network.Polkadot, supportedAddressTypes: ['ss58'], - rpcConnection: 'wss://rococo-asset-hub-rpc.polkadot.io', - specName: 'asset-hub-rococo', + rpcConnection: 'wss://asset-hub-paseo-rpc.dwellir.com', + specName: 'asset-hub-paseo', } // Tokens @@ -253,17 +253,6 @@ export namespace Testnet { '{"parents":"2","interior":{"X2":[{"GlobalConsensus":{"Ethereum":{"chainId":"11155111"}}},{"AccountKey20":{"network":null,"key":"0xfff9976782d46cc05630d1f6ebab18b2324d6b14"}}]}}', } - export const VETH: Token = { - id: 'veth', - name: 'Venus ETH', - symbol: 'vETH', - logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/7963.png', - decimals: 18, - address: '0xc3d088842dcf02c13699f936bb83dfbbc6f721ab', - multilocation: - '{"parents":"2","interior":{"X2":[{"GlobalConsensus":{"Ethereum":{"chainId":"11155111"}}},{"AccountKey20":{"network":null,"key":"0xc3d088842dcf02c13699f936bb83dfbbc6f721ab"}}]}}', - } - export const ETH: Token = { id: 'seth', name: 'Sepolia Ether', @@ -275,12 +264,12 @@ export namespace Testnet { multilocation: '', } - export const ROC: Token = { - id: 'roc', - name: 'Rococo', - logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/6636.png', - symbol: 'ROC', - decimals: 12, + export const PAS: Token = { + id: 'pas', + name: 'Paseo', + logoURI: 'https://imgur.com/MhQMspt', + symbol: 'PAS', + decimals: 10, address: '', multilocation: '{"V2":{"parents":"1","interior":"Here"}}', } @@ -362,17 +351,17 @@ export const mainnetRegistry: Registry = { } export const testnetRegistry: Registry = { - chains: [Testnet.Sepolia, Testnet.RococoAssetHub], + chains: [Testnet.Sepolia, Testnet.PaseoAssetHub], tokens: [Testnet.WETH, Testnet.VETH], routes: [ { from: Testnet.Sepolia.uid, - to: Testnet.RococoAssetHub.uid, + to: Testnet.PaseoAssetHub.uid, tokens: [Testnet.WETH.id, Testnet.VETH.id], sdk: 'SnowbridgeApi', }, { - from: Testnet.RococoAssetHub.uid, + from: Testnet.PaseoAssetHub.uid, to: Testnet.Sepolia.uid, tokens: [Testnet.WETH.id, Testnet.VETH.id], sdk: 'AssetTransferApi', @@ -387,7 +376,7 @@ export const REGISTRY = { export function getNativeToken(chain: Chain): Token { switch (chain.uid) { - case 'rococo-assethub': + case 'paseo-assethub': return Testnet.ROC case 'sepolia': return Testnet.ETH diff --git a/app/src/context/snowbridge.tsx b/app/src/context/snowbridge.tsx index bfb90f9c..9684fd41 100644 --- a/app/src/context/snowbridge.tsx +++ b/app/src/context/snowbridge.tsx @@ -66,7 +66,7 @@ export function toSnowbridgeNetwork(env: Environment): string { case Environment.Mainnet: return 'polkadot_mainnet' case Environment.Testnet: - return 'rococo_sepolia' + return 'paseo_sepolia' } } diff --git a/app/src/store/environmentStore.ts b/app/src/store/environmentStore.ts index 1a10ff03..1a8e63e0 100644 --- a/app/src/store/environmentStore.ts +++ b/app/src/store/environmentStore.ts @@ -4,7 +4,7 @@ import { create } from 'zustand' export enum Environment { /* Polkadot - Ethereum */ Mainnet = 'mainnet', - /* Rococo - Sepolia */ + /* Paseo - Sepolia */ Testnet = 'testnet', } interface State { diff --git a/app/src/utils/transfer.ts b/app/src/utils/transfer.ts index 909a6ef0..c848147b 100644 --- a/app/src/utils/transfer.ts +++ b/app/src/utils/transfer.ts @@ -99,8 +99,8 @@ export const removeURLSlash = (url: string) => { const EXPLORERS: { [environment in Environment]: { [explorerName: string]: string } } = { [Environment.Testnet]: { etherscan: 'https://sepolia.etherscan.io/', - subscan_assethub: 'https://assethub-rococo.subscan.io/', - subscan_brigehub: 'https://bridgehub-rococo.subscan.io/', + subscan_assethub: 'https://assethub-paseo.subscan.io/', + subscan_brigehub: 'https://bridgehub-paseo.subscan.io/', }, [Environment.Mainnet]: { etherscan: 'https://etherscan.io/', From 8c45e336a68641d2baa1c9b8cc171dcc8072f427 Mon Sep 17 00:00:00 2001 From: Nuno Alexandre Date: Mon, 16 Sep 2024 17:04:32 +0200 Subject: [PATCH 2/2] fixup --- app/src/config/registry.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/config/registry.ts b/app/src/config/registry.ts index c7caf416..b3bb1f4d 100644 --- a/app/src/config/registry.ts +++ b/app/src/config/registry.ts @@ -352,18 +352,18 @@ export const mainnetRegistry: Registry = { export const testnetRegistry: Registry = { chains: [Testnet.Sepolia, Testnet.PaseoAssetHub], - tokens: [Testnet.WETH, Testnet.VETH], + tokens: [Testnet.WETH], routes: [ { from: Testnet.Sepolia.uid, to: Testnet.PaseoAssetHub.uid, - tokens: [Testnet.WETH.id, Testnet.VETH.id], + tokens: [Testnet.WETH.id], sdk: 'SnowbridgeApi', }, { from: Testnet.PaseoAssetHub.uid, to: Testnet.Sepolia.uid, - tokens: [Testnet.WETH.id, Testnet.VETH.id], + tokens: [Testnet.WETH.id], sdk: 'AssetTransferApi', }, ], @@ -377,7 +377,7 @@ export const REGISTRY = { export function getNativeToken(chain: Chain): Token { switch (chain.uid) { case 'paseo-assethub': - return Testnet.ROC + return Testnet.PAS case 'sepolia': return Testnet.ETH case 'polkadot-assethub':