-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor folders and decorators to be L1 and L2 specific (#40)
* refactor folders and decorators to be L1 and L2 specific * file new functions and fix test
- Loading branch information
1 parent
c481a35
commit 8c06655
Showing
25 changed files
with
98 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/public/getL2HashesForDepositTx.bench.ts → ...ublic/L1/getL2HashesForDepositTx.bench.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ns/public/getL2HashesForDepositTx.test.ts → ...public/L1/getL2HashesForDepositTx.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...actions/public/getL2HashesForDepositTx.ts → ...ions/public/L1/getL2HashesForDepositTx.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ctions/public/getOutputForL2Block.test.ts → ...ons/public/L1/getOutputForL2Block.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...actions/public/simulateDepositETH.test.ts → ...ions/public/L1/simulateDepositETH.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ions/public/getWithdrawalMessages.test.ts → ...s/public/L2/getWithdrawalMessages.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/actions/wallet/writeDepositETH.test.ts → ...actions/wallet/L1/writeDepositETH.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 3 additions & 4 deletions
7
...let/writeUnsafeDepositTransaction.test.ts → .../L1/writeUnsafeDepositTransaction.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Chain, type PublicClient, Transport } from 'viem' | ||
import { | ||
GetWithdrawalMessagesParameters, | ||
GetWithdrawalMessagesReturnType, | ||
getWithdrawalMessages, | ||
} from '../actions/public/L2/getWithdrawalMessages' | ||
import { | ||
getProveWithdrawalTransactionArgsParams, | ||
getProveWithdrawalTransactionArgsReturnType, | ||
getProveWithdrawalTransactionArgs, | ||
} from '../actions/public/L2/getProveWithdrawalTransactionArgs' | ||
|
||
export type PublicL2OpStackActions< | ||
TTransport extends Transport = Transport, | ||
TChain extends Chain | undefined = Chain | undefined, | ||
> = { | ||
getWithdrawalMessages: ( | ||
args: GetWithdrawalMessagesParameters, | ||
) => Promise<GetWithdrawalMessagesReturnType> | ||
getProveWithdrawalTransactionArgs: ( | ||
args: getProveWithdrawalTransactionArgsParams, | ||
) => Promise<getProveWithdrawalTransactionArgsReturnType> | ||
} | ||
|
||
export function publicL2OpStackActions< | ||
TTransport extends Transport = Transport, | ||
TChain extends Chain | undefined = Chain | undefined, | ||
>( | ||
client: PublicClient<TTransport, TChain>, | ||
): PublicL2OpStackActions<TTransport, TChain> { | ||
return { | ||
getWithdrawalMessages: (args) => getWithdrawalMessages(client, args), | ||
getProveWithdrawalTransactionArgs: (args) => | ||
getProveWithdrawalTransactionArgs(client, args), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters