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

feat: add support for the IOTA EVM #8293

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
onClick={onViewAddressHistoryClick}
/>
{/if}
{#if $activeProfile?.network?.id === NetworkId.Shimmer || $activeProfile?.network?.id === NetworkId.Testnet}
{#if $activeProfile?.network?.id !== NetworkId.IotaAlphanet}
<MenuItem icon={Icon.Transfer} title={localize('actions.withdrawFromL2')} onClick={onWithdrawFromL2Click} />
{/if}
<MenuItem icon={Icon.Customize} title={localize('actions.customizeAcount')} onClick={onCustomiseAccountClick} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export enum DestinationNetwork {
Shimmer = 'Shimmer',
ShimmerEvm = 'ShimmerEVM',
ShimmerEvmTestnet = 'ShimmerEVM Testnet',
IOTAEvm = 'IOTAEVM',
begonaalvarezd marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@ 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,
// TODO: update with final values
aliasAddress: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
iscpEndpoint: 'https://api.evm.example.org/v1/chains/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
archiveEndpoint: 'https://archive.evm.example.org',
// --
},
}
1 change: 1 addition & 0 deletions packages/shared/lib/core/network/enums/chain-id.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export enum ChainId {
Layer1 = 0,
ShimmerEVM = 148,
ShimmerEVMTestnet = 1073,
IOTAEvm = 1073, // TODO: update with final value
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const persistedProfileMigrationsMap: Record<number, (existingProfile: unknown) =
14: persistedProfileMigrationToV15,
15: persistedProfileMigrationToV16,
16: persistedProfileMigrationToV17,
17: persistedProfileMigrationToV18,
}

function persistedProfileMigrationToV4(existingProfile: unknown): void {
Expand Down Expand Up @@ -331,3 +332,10 @@ function persistedProfileMigrationToV17(existingProfile: IPersistedProfile): voi
existingProfile.network.chains = newChains
saveProfile(existingProfile)
}

function persistedProfileMigrationToV18(existingProfile: IPersistedProfile): void {
const defaultChainConfig = DEFAULT_CHAIN_CONFIGURATIONS[existingProfile.network.id]
const newChains: IIscpChainMetadata[] = defaultChainConfig ? [defaultChainConfig] : []
existingProfile.network.chains = newChains
saveProfile(existingProfile)
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PROFILE_VERSION = 17
export const PROFILE_VERSION = 18
Loading