From 03867bcaffbb248aea9e3bffe37da3209c543d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bego=C3=B1a=20=C3=81lvarez=20de=20la=20Cruz?= Date: Tue, 4 Jun 2024 06:08:53 -0600 Subject: [PATCH] feat: add support for the IOTA EVM (#8293) * feat: add support for the IOTA EVM * feat: add iota evm chain data * chore: rename IOTAEVM to IOTA EVM --- .../desktop/components/modals/AccountActionsMenu.svelte | 2 +- .../lib/core/layer-2/enums/destination-network.enum.ts | 1 + .../constants/default-chain-configurations.constant.ts | 9 +++++++++ packages/shared/lib/core/network/enums/chain-id.enum.ts | 1 + .../profile/actions/profiles/checkAndMigrateProfiles.ts | 9 ++++++++- .../core/profile/constants/profile-version.constant.ts | 2 +- 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/desktop/components/modals/AccountActionsMenu.svelte b/packages/desktop/components/modals/AccountActionsMenu.svelte index 8a698474e5e..ed713602119 100644 --- a/packages/desktop/components/modals/AccountActionsMenu.svelte +++ b/packages/desktop/components/modals/AccountActionsMenu.svelte @@ -84,7 +84,7 @@ onClick={onViewAddressHistoryClick} /> {/if} - {#if $activeProfile?.network?.id === NetworkId.Shimmer || $activeProfile?.network?.id === NetworkId.ShimmerTestnet || $activeProfile?.network?.id === NetworkId.IotaTestnet} + {#if $activeProfile?.network?.id === NetworkId.Shimmer || $activeProfile?.network?.id === NetworkId.ShimmerTestnet || $activeProfile?.network?.id === NetworkId.IotaTestnet || $activeProfile?.network?.id === NetworkId.Iota} {/if} diff --git a/packages/shared/lib/core/layer-2/enums/destination-network.enum.ts b/packages/shared/lib/core/layer-2/enums/destination-network.enum.ts index d038d7745f2..c65ffcdc0de 100644 --- a/packages/shared/lib/core/layer-2/enums/destination-network.enum.ts +++ b/packages/shared/lib/core/layer-2/enums/destination-network.enum.ts @@ -3,4 +3,5 @@ export enum DestinationNetwork { Shimmer = 'Shimmer', ShimmerEvm = 'ShimmerEVM', ShimmerEvmTestnet = 'ShimmerEVM Testnet', + IOTAEVM = 'IOTA EVM', } diff --git a/packages/shared/lib/core/network/constants/default-chain-configurations.constant.ts b/packages/shared/lib/core/network/constants/default-chain-configurations.constant.ts index 6adfb636f6a..49088438576 100644 --- a/packages/shared/lib/core/network/constants/default-chain-configurations.constant.ts +++ b/packages/shared/lib/core/network/constants/default-chain-configurations.constant.ts @@ -22,6 +22,15 @@ export const DEFAULT_CHAIN_CONFIGURATIONS: Readonly<{ [id in NetworkId]?: ChainM 'https://api.evm.testnet.shimmer.network/v1/chains/rms1ppp00k5mmd2m8my8ukkp58nd3rskw6rx8l09aj35984k74uuc5u2cywn3ex', archiveEndpoint: 'https://archive.evm.testnet.shimmer.network', }, + [NetworkId.Iota]: { + type: ChainType.Iscp, + name: DestinationNetwork.IOTAEVM, + chainId: ChainId.IOTAEVM, + aliasAddress: 'iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5', + iscpEndpoint: + 'https://api.evm.iotaledger.net/v1/chains/iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5', + archiveEndpoint: 'https://archive.evm.iotaledger.net', + }, [NetworkId.IotaTestnet]: { type: ChainType.Iscp, name: DestinationNetwork.IotaEvmTestnet, diff --git a/packages/shared/lib/core/network/enums/chain-id.enum.ts b/packages/shared/lib/core/network/enums/chain-id.enum.ts index 23d91da4b5b..3de22bcc19e 100644 --- a/packages/shared/lib/core/network/enums/chain-id.enum.ts +++ b/packages/shared/lib/core/network/enums/chain-id.enum.ts @@ -2,5 +2,6 @@ export enum ChainId { Layer1 = 0, ShimmerEVM = 148, ShimmerEVMTestnet = 1073, + IOTAEVM = 8822, IotaEVMTestnet = 1075, } diff --git a/packages/shared/lib/core/profile/actions/profiles/checkAndMigrateProfiles.ts b/packages/shared/lib/core/profile/actions/profiles/checkAndMigrateProfiles.ts index 8dcbdbae95f..e34742543ac 100644 --- a/packages/shared/lib/core/profile/actions/profiles/checkAndMigrateProfiles.ts +++ b/packages/shared/lib/core/profile/actions/profiles/checkAndMigrateProfiles.ts @@ -74,6 +74,7 @@ const persistedProfileMigrationsMap: Record