Skip to content

Commit

Permalink
move EV5 submitter/transformer types into ethersV5 dir
Browse files Browse the repository at this point in the history
  • Loading branch information
nbayindirli committed May 10, 2024
1 parent 5fdaf9a commit 2806734
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 28 deletions.
10 changes: 4 additions & 6 deletions typescript/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,21 +304,19 @@ export {
protocolToDefaultProviderBuilder,
} from './providers/providerBuilders.js';
export { TxSubmitterInterface } from './providers/transactions/submitter/TxSubmitterInterface.js';
export { TxSubmitterType } from './providers/transactions/submitter/TxSubmitterTypes.js';
export {
TxSubmitterType,
EV5GnosisSafeTxSubmitterProps,
EV5ImpersonatedAccountTxSubmitterProps,
} from './providers/transactions/submitter/TxSubmitterTypes.js';
} from './providers/transactions/submitter/ethersV5/EV5TxSubmitterTypes.js';
export { TxSubmitterBuilder } from './providers/transactions/submitter/builder/TxSubmitterBuilder.js';
export { EV5GnosisSafeTxSubmitter } from './providers/transactions/submitter/ethersV5/EV5GnosisSafeTxSubmitter.js';
export { EV5ImpersonatedAccountTxSubmitter } from './providers/transactions/submitter/ethersV5/EV5ImpersonatedAccountTxSubmitter.js';
export { EV5JsonRpcTxSubmitter } from './providers/transactions/submitter/ethersV5/EV5JsonRpcTxSubmitter.js';
export { EV5TxSubmitterInterface } from './providers/transactions/submitter/ethersV5/EV5TxSubmitterInterface.js';
export { TxTransformerInterface } from './providers/transactions/transformer/TxTransformerInterface.js';
export {
TxTransformerType,
EV5InterchainAccountTxTransformerProps,
} from './providers/transactions/transformer/TxTransformerTypes.js';
export { TxTransformerType } from './providers/transactions/transformer/TxTransformerTypes.js';
export { EV5InterchainAccountTxTransformerProps } from './providers/transactions/transformer/ethersV5/EV5TxTransformerTypes.js';
export { EV5InterchainAccountTxTransformer } from './providers/transactions/transformer/ethersV5/EV5InterchainAccountTxTransformer.js';
export { EV5TxTransformerInterface } from './providers/transactions/transformer/ethersV5/EV5TxTransformerInterface.js';
export { GasRouterDeployer } from './router/GasRouterDeployer.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
import { Address } from '@hyperlane-xyz/utils';

import { ChainName } from '../../../types.js';

export enum TxSubmitterType {
JSON_RPC = 'JSON RPC',
IMPERSONATED_ACCOUNT = 'Impersonated Account',
GNOSIS_SAFE = 'Gnosis Safe',
}

export interface EV5GnosisSafeTxSubmitterProps {
chain: ChainName;
safeAddress: Address;
}

export interface EV5ImpersonatedAccountTxSubmitterProps {
chain: ChainName;
userAddress: Address;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import { Address, assert, rootLogger } from '@hyperlane-xyz/utils';
// @ts-ignore
import { getSafe, getSafeService } from '../../../../utils/gnosisSafe.js';
import { MultiProvider } from '../../../MultiProvider.js';
import {
EV5GnosisSafeTxSubmitterProps,
TxSubmitterType,
} from '../TxSubmitterTypes.js';
import { TxSubmitterType } from '../TxSubmitterTypes.js';

import { EV5TxSubmitterInterface } from './EV5TxSubmitterInterface.js';
import { EV5GnosisSafeTxSubmitterProps } from './EV5TxSubmitterTypes.js';

export class EV5GnosisSafeTxSubmitter implements EV5TxSubmitterInterface {
public readonly txSubmitterType: TxSubmitterType =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import { rootLogger } from '@hyperlane-xyz/utils';

import { impersonateAccount } from '../../../../utils/fork.js';
import { MultiProvider } from '../../../MultiProvider.js';
import {
EV5ImpersonatedAccountTxSubmitterProps,
TxSubmitterType,
} from '../TxSubmitterTypes.js';
import { TxSubmitterType } from '../TxSubmitterTypes.js';

import { EV5JsonRpcTxSubmitter } from './EV5JsonRpcTxSubmitter.js';
import { EV5ImpersonatedAccountTxSubmitterProps } from './EV5TxSubmitterTypes.js';

export class EV5ImpersonatedAccountTxSubmitter extends EV5JsonRpcTxSubmitter {
public readonly txSubmitterType: TxSubmitterType =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Address } from '@hyperlane-xyz/utils';

import { ChainName } from '../../../../types.js';

export interface EV5GnosisSafeTxSubmitterProps {
chain: ChainName;
safeAddress: Address;
}

export interface EV5ImpersonatedAccountTxSubmitterProps {
chain: ChainName;
userAddress: Address;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { InterchainAccount } from '../../../../middleware/account/InterchainAccount.js';
import { AccountConfig } from '../../../../middleware/account/types.js';
import { ChainName } from '../../../../types.js';

export interface EV5InterchainAccountTxTransformerProps {
chain: ChainName;
interchainAccount: InterchainAccount;
accountConfig: AccountConfig;
hookMetadata?: string;
}

0 comments on commit 2806734

Please sign in to comment.