77 encodeFunctionData ,
88 http ,
99} from 'viem' ;
10- import { arbitrum , arbitrumSepolia } from 'viem/chains' ;
10+ import { arbitrum , arbitrumSepolia , sepolia } from 'viem/chains' ;
1111import { it , expect , vi , describe } from 'vitest' ;
1212
1313import { gnosisSafeL2ABI } from './contracts/GnosisSafeL2' ;
@@ -26,6 +26,11 @@ const arbitrumSepoliaClient = createPublicClient({
2626 transport : http ( ) ,
2727} ) ;
2828
29+ const sepoliaClient = createPublicClient ( {
30+ chain : sepolia ,
31+ transport : http ( 'https://sepolia.gateway.tenderly.co' ) ,
32+ } ) ;
33+
2934function mockLog ( transactionHash : string ) {
3035 return {
3136 address : '0x193e2887031c148ab54f5e856ea51ae521661200' ,
@@ -186,6 +191,16 @@ it('getBatchPosters returns batch posters for a chain created with RollupCreator
186191 expect ( isAccurate ) . toBeTruthy ( ) ;
187192} ) ;
188193
194+ // https://sepolia.etherscan.io/tx/0xd79a80b7300df1bcb14e2e3ea83521d1ae37e5f171a787fb0f5377ea7f5003ad
195+ it ( 'getBatchPosters returns batch posters for a chain created with RollupCreator v3.1' , async ( ) => {
196+ const { isAccurate, batchPosters } = await getBatchPosters ( sepoliaClient , {
197+ rollup : '0x5D65e18b873dD978EeE4704BC6033436aA253936' ,
198+ sequencerInbox : '0x3fB778EC3e6126aF1d956A7812Eb0a28B9d25017' ,
199+ } ) ;
200+ expect ( batchPosters ) . toEqual ( [ '0x05c82FC99a41e417Ea6ED14e1D3f3b01BBFfba5A' ] ) ;
201+ expect ( isAccurate ) . toBeTruthy ( ) ;
202+ } ) ;
203+
189204describe ( 'createRollupFunctionSelector' , ( ) => {
190205 it ( 'getBatchPosters returns all batch posters with isAccurate flag set to true' , async ( ) => {
191206 const mockTransport = ( ) =>
@@ -489,7 +504,7 @@ describe('safeL2FunctionSelector', () => {
489504} ) ;
490505
491506describe ( 'Detect batch posters added or removed multiple times' , ( ) => {
492- it ( 'when disabling the same batch poster multiple time ' , async ( ) => {
507+ it ( 'when disabling the same batch poster multiple times ' , async ( ) => {
493508 const batchPoster = '0xC0b97e2998edB3Bf5c6369e7f7eFfb49c36fA962' ;
494509 const mockTransport = ( ) =>
495510 createTransport ( {
@@ -527,7 +542,7 @@ describe('Detect batch posters added or removed multiple times', () => {
527542 expect ( batchPosters ) . toEqual ( [ ] ) ;
528543 expect ( isAccurate ) . toBeTruthy ( ) ;
529544 } ) ;
530- it ( 'when enabling the same batch posters multiple time ' , async ( ) => {
545+ it ( 'when enabling the same batch posters multiple times ' , async ( ) => {
531546 const batchPoster = '0xC0b97e2998edB3Bf5c6369e7f7eFfb49c36fA962' ;
532547 const mockTransport = ( ) =>
533548 createTransport ( {
0 commit comments