Skip to content

Commit

Permalink
Update export
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstph-dvx committed Aug 19, 2024
1 parent 370bfca commit e8786b0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export * from './getMaxTimeVariation';
export * from './isBatchPoster';
export * from './isValidKeysetHash';
export * from './invalidateKeysetHash';
export * from './setIsbatchPoster';
export * from './setKeyset';
export * from './setMaxTimeVariation';
4 changes: 2 additions & 2 deletions src/actions/invalidateKeysetHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Transport,
encodeFunctionData,
} from 'viem';
import { sequencerInbox } from '../contracts';
import { sequencerInboxABI } from '../contracts/SequencerInbox';
import { ActionParameters, WithAccount } from '../types/Actions';
import { Prettify } from '../types/utils';

Expand All @@ -27,7 +27,7 @@ export type InvalidateKeysetHashReturnType = PrepareTransactionRequestReturnType

function sequencerInboxFunctionData({ keysetHash }: InvalidateKeysetHashParameters) {
return encodeFunctionData({
abi: sequencerInbox.abi,
abi: sequencerInboxABI,
functionName: 'invalidateKeysetHash',
args: [keysetHash],
});
Expand Down
4 changes: 2 additions & 2 deletions src/actions/setIsbatchPoster.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Address, Chain, PrepareTransactionRequestParameters, PublicClient, Transport } from 'viem';
import { sequencerInbox } from '../contracts';
import { sequencerInboxABI } from '../contracts/SequencerInbox';
import {
ActionParameters,
PrepareTransactionRequestReturnTypeWithChainId,
Expand Down Expand Up @@ -34,7 +34,7 @@ async function setIsBatchPoster<TChain extends Chain | undefined>(
to: sequencerInboxAddress,
upgradeExecutor,
args: [args.batchPoster, args.enable],
abi: sequencerInbox.abi,
abi: sequencerInboxABI,
functionName: 'setIsBatchPoster',
}),
} satisfies PrepareTransactionRequestParameters);
Expand Down
4 changes: 2 additions & 2 deletions src/actions/setKeyset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Chain, Hex, PrepareTransactionRequestParameters, PublicClient, Transport } from 'viem';
import { sequencerInbox } from '../contracts';
import { sequencerInboxABI } from '../contracts/SequencerInbox';
import {
ActionParameters,
PrepareTransactionRequestReturnTypeWithChainId,
Expand Down Expand Up @@ -40,7 +40,7 @@ export async function setKeyset<TChain extends Chain | undefined>(
to: sequencerInboxAddress,
upgradeExecutor,
args: [args.keyset],
abi: sequencerInbox.abi,
abi: sequencerInboxABI,
functionName: 'setValidKeyset',
}),
} satisfies PrepareTransactionRequestParameters);
Expand Down
4 changes: 2 additions & 2 deletions src/actions/setMaxTimeVariation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Chain, PrepareTransactionRequestParameters, PublicClient, Transport } from 'viem';
import { sequencerInbox } from '../contracts';
import { sequencerInboxABI } from '../contracts/SequencerInbox';
import {
ActionParameters,
PrepareTransactionRequestReturnTypeWithChainId,
Expand Down Expand Up @@ -36,7 +36,7 @@ export async function setMaxTimeVariation<TChain extends Chain | undefined>(
to: sequencerInboxAddress,
upgradeExecutor,
args: [args],
abi: sequencerInbox.abi,
abi: sequencerInboxABI,
functionName: 'setMaxTimeVariation',
}),
} satisfies PrepareTransactionRequestParameters);
Expand Down
5 changes: 3 additions & 2 deletions src/withUpgradeExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {
EncodeFunctionDataParameters as ViemEncodeFunctionDataParameters,
} from 'viem';
import { GetFunctionName } from './types/utils';
import { arbOwner, sequencerInbox } from './contracts';
import { sequencerInboxABI } from './contracts/SequencerInbox';
import { arbOwnerABI } from './contracts/ArbOwner';
import { upgradeExecutorEncodeFunctionData } from './upgradeExecutorEncodeFunctionData';

type ABIs = typeof sequencerInbox.abi | typeof arbOwner.abi;
type ABIs = typeof sequencerInboxABI | typeof arbOwnerABI;
type FunctionName<TAbi extends ABIs> = GetFunctionName<TAbi>;

type EncodeFunctionDataParameters<
Expand Down

0 comments on commit e8786b0

Please sign in to comment.