@@ -2,10 +2,10 @@ import type { Address } from 'viem';
22
33import { runChainVersioner } from '@arbitrum/chain-actions' ;
44
5- import { DEFAULT_ORBIT_ACTIONS_IMAGE } from './constants' ;
5+ import { DEFAULT_CHAIN_ACTIONS_IMAGE } from './constants' ;
66import { runDockerCommand } from './runDockerCommand' ;
77
8- export type GetOrbitChainContractVersionsResult = {
8+ export type GetChainContractVersionsResult = {
99 versions : Record < string , string | null > ;
1010 upgradeRecommendation : unknown ;
1111} ;
@@ -30,9 +30,9 @@ function getDockerNetworkConfig(parentChainRpc: string): {
3030 } ;
3131}
3232
33- function parseOrbitChainContractVersionsResult (
34- result : string | GetOrbitChainContractVersionsResult ,
35- ) : GetOrbitChainContractVersionsResult {
33+ function parseChainContractVersionsResult (
34+ result : string | GetChainContractVersionsResult ,
35+ ) : GetChainContractVersionsResult {
3636 const parsed =
3737 typeof result === 'string'
3838 ? ( ( ) => {
@@ -53,14 +53,14 @@ function parseOrbitChainContractVersionsResult(
5353 throw new Error ( 'Failed to parse Orbit chain contract versions' ) ;
5454 }
5555
56- return parsed as GetOrbitChainContractVersionsResult ;
56+ return parsed as GetChainContractVersionsResult ;
5757}
5858
59- async function getOrbitChainContractVersionsWithDocker (
59+ async function getChainContractVersionsWithDocker (
6060 inboxAddress : Address ,
6161 parentChainRpc : string ,
6262 image : string ,
63- ) : Promise < GetOrbitChainContractVersionsResult > {
63+ ) : Promise < GetChainContractVersionsResult > {
6464 const dockerConfig = getDockerNetworkConfig ( parentChainRpc ) ;
6565
6666 const { stdout } = await runDockerCommand ( {
@@ -75,27 +75,27 @@ async function getOrbitChainContractVersionsWithDocker(
7575 } ,
7676 } ) ;
7777
78- return parseOrbitChainContractVersionsResult ( stdout ) ;
78+ return parseChainContractVersionsResult ( stdout ) ;
7979}
8080
81- async function getOrbitChainContractVersionsWithNative (
81+ async function getChainContractVersionsWithNative (
8282 inboxAddress : Address ,
8383 parentChainRpc : string ,
84- ) : Promise < GetOrbitChainContractVersionsResult > {
84+ ) : Promise < GetChainContractVersionsResult > {
8585 const result = await runChainVersioner ( inboxAddress , parentChainRpc , true ) ;
8686
87- return parseOrbitChainContractVersionsResult ( result ) ;
87+ return parseChainContractVersionsResult ( result ) ;
8888}
8989
90- export async function getOrbitChainContractVersions (
90+ export async function getChainContractVersions (
9191 inboxAddress : Address ,
9292 parentChainRpc : string ,
9393 executionMode = 'native' ,
94- image = DEFAULT_ORBIT_ACTIONS_IMAGE ,
95- ) : Promise < GetOrbitChainContractVersionsResult > {
94+ image = DEFAULT_CHAIN_ACTIONS_IMAGE ,
95+ ) : Promise < GetChainContractVersionsResult > {
9696 if ( executionMode . toLowerCase ( ) === 'docker' ) {
97- return getOrbitChainContractVersionsWithDocker ( inboxAddress , parentChainRpc , image ) ;
97+ return getChainContractVersionsWithDocker ( inboxAddress , parentChainRpc , image ) ;
9898 }
9999
100- return getOrbitChainContractVersionsWithNative ( inboxAddress , parentChainRpc ) ;
100+ return getChainContractVersionsWithNative ( inboxAddress , parentChainRpc ) ;
101101}
0 commit comments