File tree Expand file tree Collapse file tree 6 files changed +39
-51
lines changed Expand file tree Collapse file tree 6 files changed +39
-51
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,12 @@ import {
7
7
encodeFunctionData ,
8
8
} from 'viem' ;
9
9
import { rollupAdminLogic } from '../contracts' ;
10
- import { ActionParameters , WithAccount } from '../types/Actions' ;
10
+ import { WithAccount , WithContractAddress } from '../types/Actions' ;
11
11
import { Prettify } from '../types/utils' ;
12
+ import { getRollupAddress } from '../getRollupAddress' ;
12
13
13
14
export type SetConfirmPeriodBlocksParameters < Curried extends boolean = false > = Prettify <
14
- WithAccount <
15
- ActionParameters <
16
- {
17
- newPeriod : bigint ;
18
- } ,
19
- 'rollupAdminLogic' ,
20
- Curried
21
- >
22
- >
15
+ WithAccount < WithContractAddress < { newPeriod : bigint } , 'rollupAdminLogic' , Curried > >
23
16
> ;
24
17
25
18
export type SetConfirmPeriodBlocksReturnType = PrepareTransactionRequestReturnType ;
@@ -37,9 +30,9 @@ export async function setConfirmPeriodBlocks<TChain extends Chain | undefined>(
37
30
args : SetConfirmPeriodBlocksParameters ,
38
31
) : Promise < SetConfirmPeriodBlocksReturnType > {
39
32
const data = rollupAdminLogicFunctionData ( args ) ;
40
-
33
+ const rollupAdminLogicAddresss = await getRollupAddress ( client , args ) ;
41
34
return client . prepareTransactionRequest ( {
42
- to : args . rollupAdminLogic ,
35
+ to : rollupAdminLogicAddresss ,
43
36
value : BigInt ( 0 ) ,
44
37
chain : client . chain ,
45
38
data,
Original file line number Diff line number Diff line change @@ -7,19 +7,12 @@ import {
7
7
encodeFunctionData ,
8
8
} from 'viem' ;
9
9
import { rollupAdminLogic } from '../contracts' ;
10
- import { ActionParameters , WithAccount } from '../types/Actions' ;
10
+ import { WithAccount , WithContractAddress } from '../types/Actions' ;
11
11
import { Prettify } from '../types/utils' ;
12
+ import { getRollupAddress } from '../getRollupAddress' ;
12
13
13
14
export type SetExtraChallengeTimeBlocksParameters < Curried extends boolean = false > = Prettify <
14
- WithAccount <
15
- ActionParameters <
16
- {
17
- newExtraTimeBlocks : bigint ;
18
- } ,
19
- 'rollupAdminLogic' ,
20
- Curried
21
- >
22
- >
15
+ WithAccount < WithContractAddress < { newExtraTimeBlocks : bigint } , 'rollupAdminLogic' , Curried > >
23
16
> ;
24
17
25
18
export type SetExtraChallengeTimeBlocksReturnType = PrepareTransactionRequestReturnType ;
@@ -39,9 +32,9 @@ export async function setExtraChallengeTimeBlocks<TChain extends Chain | undefin
39
32
args : SetExtraChallengeTimeBlocksParameters ,
40
33
) : Promise < SetExtraChallengeTimeBlocksReturnType > {
41
34
const data = rollupAdminLogicFunctionData ( args ) ;
42
-
35
+ const rollupAdminLogicAddresss = await getRollupAddress ( client , args ) ;
43
36
return client . prepareTransactionRequest ( {
44
- to : args . rollupAdminLogic ,
37
+ to : rollupAdminLogicAddresss ,
45
38
value : BigInt ( 0 ) ,
46
39
chain : client . chain ,
47
40
data,
Original file line number Diff line number Diff line change @@ -7,19 +7,12 @@ import {
7
7
encodeFunctionData ,
8
8
} from 'viem' ;
9
9
import { rollupAdminLogic } from '../contracts' ;
10
- import { ActionParameters , WithAccount } from '../types/Actions' ;
10
+ import { WithAccount , WithContractAddress } from '../types/Actions' ;
11
11
import { Prettify } from '../types/utils' ;
12
+ import { getRollupAddress } from '../getRollupAddress' ;
12
13
13
14
export type SetMinimumAssertionPeriodParameters < Curried extends boolean = false > = Prettify <
14
- WithAccount <
15
- ActionParameters <
16
- {
17
- newPeriod : bigint ;
18
- } ,
19
- 'rollupAdminLogic' ,
20
- Curried
21
- >
22
- >
15
+ WithAccount < WithContractAddress < { newPeriod : bigint } , 'rollupAdminLogic' , Curried > >
23
16
> ;
24
17
25
18
export type SetMinimumAssertionPeriodReturnType = PrepareTransactionRequestReturnType ;
@@ -37,9 +30,9 @@ export async function setMinimumAssertionPeriod<TChain extends Chain | undefined
37
30
args : SetMinimumAssertionPeriodParameters ,
38
31
) : Promise < SetMinimumAssertionPeriodReturnType > {
39
32
const data = rollupAdminLogicFunctionData ( args ) ;
40
-
33
+ const rollupAdminLogicAddresss = await getRollupAddress ( client , args ) ;
41
34
return client . prepareTransactionRequest ( {
42
- to : args . rollupAdminLogic ,
35
+ to : rollupAdminLogicAddresss ,
43
36
value : BigInt ( 0 ) ,
44
37
chain : client . chain ,
45
38
data,
Original file line number Diff line number Diff line change @@ -8,16 +8,21 @@ import {
8
8
encodeFunctionData ,
9
9
} from 'viem' ;
10
10
import { rollupAdminLogic } from '../contracts' ;
11
- import { ActionParameters , WithAccount } from '../types/Actions' ;
11
+ import { WithAccount , WithContractAddress } from '../types/Actions' ;
12
12
import { Prettify } from '../types/utils' ;
13
-
14
- type Args = {
15
- add : Address [ ] ;
16
- remove : Address [ ] ;
17
- } ;
13
+ import { getRollupAddress } from '../getRollupAddress' ;
18
14
19
15
export type SetIsValidatorParameters < Curried extends boolean = false > = Prettify <
20
- WithAccount < ActionParameters < Args , 'rollupAdminLogic' , Curried > >
16
+ WithAccount <
17
+ WithContractAddress <
18
+ {
19
+ add : Address [ ] ;
20
+ remove : Address [ ] ;
21
+ } ,
22
+ 'rollupAdminLogic' ,
23
+ Curried
24
+ >
25
+ >
21
26
> ;
22
27
23
28
export type SetIsValidatorReturnType = PrepareTransactionRequestReturnType ;
@@ -37,8 +42,9 @@ export async function setValidators<TChain extends Chain | undefined>(
37
42
args : SetIsValidatorParameters ,
38
43
) : Promise < SetIsValidatorReturnType > {
39
44
const data = rollupAdminLogicFunctionData ( args ) ;
45
+ const rollupAdminLogicAddresss = await getRollupAddress ( client , args ) ;
40
46
return client . prepareTransactionRequest ( {
41
- to : args . rollupAdminLogic ,
47
+ to : rollupAdminLogicAddresss ,
42
48
value : BigInt ( 0 ) ,
43
49
chain : client . chain ,
44
50
data,
Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ import {
7
7
encodeFunctionData ,
8
8
} from 'viem' ;
9
9
import { rollupAdminLogic } from '../contracts' ;
10
- import { ActionParameters , WithAccount } from '../types/Actions' ;
10
+ import { WithAccount , WithContractAddress } from '../types/Actions' ;
11
11
import { Prettify } from '../types/utils' ;
12
+ import { getRollupAddress } from '../getRollupAddress' ;
12
13
13
14
export type SetValidatorWhitelistDisabledParameters < Curried extends boolean = false > = Prettify <
14
- WithAccount < ActionParameters < { } , 'rollupAdminLogic' , Curried > >
15
+ WithAccount < WithContractAddress < { } , 'rollupAdminLogic' , Curried > >
15
16
> ;
16
17
17
18
export type SetValidatorWhitelistDisabledReturnType = PrepareTransactionRequestReturnType ;
@@ -31,8 +32,9 @@ async function setValidatorWhitelistDisabled<TChain extends Chain | undefined>(
31
32
args : SetValidatorWhitelistDisabledParameters & { enable : boolean } ,
32
33
) : Promise < SetValidatorWhitelistDisabledReturnType > {
33
34
const data = rollupAdminLogicFunctionData ( args ) ;
35
+ const rollupAdminLogicAddresss = await getRollupAddress ( client , args ) ;
34
36
return client . prepareTransactionRequest ( {
35
- to : args . rollupAdminLogic ,
37
+ to : rollupAdminLogicAddresss ,
36
38
value : BigInt ( 0 ) ,
37
39
chain : client . chain ,
38
40
data,
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ import {
8
8
encodeFunctionData ,
9
9
} from 'viem' ;
10
10
import { rollupAdminLogic } from '../contracts' ;
11
- import { ActionParameters , WithAccount } from '../types/Actions' ;
11
+ import { WithAccount , WithContractAddress } from '../types/Actions' ;
12
12
import { Prettify } from '../types/utils' ;
13
+ import { getRollupAddress } from '../getRollupAddress' ;
13
14
14
15
export type SetWasmModuleRootParameters < Curried extends boolean = false > = Prettify <
15
16
WithAccount <
16
- ActionParameters <
17
+ WithContractAddress <
17
18
{
18
19
newWasmModuleRoot : Hex ;
19
20
} ,
@@ -38,9 +39,9 @@ export async function setWasmModuleRoot<TChain extends Chain | undefined>(
38
39
args : SetWasmModuleRootParameters ,
39
40
) : Promise < SetWasmModuleRootReturnType > {
40
41
const data = rollupAdminLogicFunctionData ( args ) ;
41
-
42
+ const rollupAdminLogicAddresss = await getRollupAddress ( client , args ) ;
42
43
return client . prepareTransactionRequest ( {
43
- to : args . rollupAdminLogic ,
44
+ to : rollupAdminLogicAddresss ,
44
45
value : BigInt ( 0 ) ,
45
46
chain : client . chain ,
46
47
data,
You can’t perform that action at this time.
0 commit comments