diff --git a/packages/mrl/src/getTransferData/getRedeemData.ts b/packages/mrl/src/getTransferData/getRedeemData.ts index b19ae3ef..7194d0b5 100644 --- a/packages/mrl/src/getTransferData/getRedeemData.ts +++ b/packages/mrl/src/getTransferData/getRedeemData.ts @@ -1,6 +1,7 @@ import { type ContractConfig, MrlBuilder } from '@moonbeam-network/xcm-builder'; import { EvmService, type EvmSigner } from '@moonbeam-network/xcm-sdk'; import type { EvmChain, EvmParachain } from '@moonbeam-network/xcm-types'; +import type { RedeemData } from '../mrl.interfaces'; import { WormholeService } from '../services/wormhole'; export interface WormholeRedeemParams { @@ -8,7 +9,10 @@ export interface WormholeRedeemParams { chain: EvmChain | EvmParachain; } -export async function getRedeemData({ txId, chain }: WormholeRedeemParams) { +export async function getRedeemData({ + txId, + chain, +}: WormholeRedeemParams): Promise { // TODO this is just for wormhole const wh = WormholeService.create(chain); diff --git a/packages/mrl/src/mrl.interfaces.ts b/packages/mrl/src/mrl.interfaces.ts index ac80beb0..441d6dfe 100644 --- a/packages/mrl/src/mrl.interfaces.ts +++ b/packages/mrl/src/mrl.interfaces.ts @@ -54,8 +54,8 @@ export interface ChainTransferData { } // TODO this is just for Wormhole -export type RedeemData = { +export interface RedeemData { vaa: TokenTransfer.VAA; tokenTransfer: TokenTransfer; - transfer(signer: EvmSigner): Promise; -}; + redeem(signer: EvmSigner): Promise; +} diff --git a/packages/types/src/chain/parachain/EvmParachain.ts b/packages/types/src/chain/parachain/EvmParachain.ts index 00c1e421..60ef2789 100644 --- a/packages/types/src/chain/parachain/EvmParachain.ts +++ b/packages/types/src/chain/parachain/EvmParachain.ts @@ -1,6 +1,7 @@ import type { Address } from 'viem'; import type { Chain } from 'viem/chains'; import { getViemChain } from '../Chain.utils'; +import { EvmChain } from '../EvmChain'; import { Parachain, type ParachainConstructorParams } from './Parachain'; export interface EvmParachainConstructorParams @@ -34,6 +35,10 @@ export class EvmParachain extends Parachain { return obj instanceof EvmParachain || obj instanceof Parachain; } + static isAnyEvmChain(obj: unknown): obj is EvmParachain | EvmChain { + return obj instanceof EvmParachain || obj instanceof EvmChain; + } + constructor({ id, rpc,