Skip to content

Commit

Permalink
add version path
Browse files Browse the repository at this point in the history
  • Loading branch information
godzillaba committed Jan 14, 2025
1 parent 71e2bf1 commit 2466ef6
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions scripts/orbit-versioner/orbitVersioner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ function _checkForPossibleUpgrades(
version: 'v3.0.0',
actionName: 'BOLD UpgradeAction',
},
{
version: 'v2.1.2',
actionName: 'NitroContracts2Point1Point2UpgradeAction',
},
{
version: 'v2.1.0',
actionName: 'NitroContracts2Point1Point0UpgradeAction',
Expand Down Expand Up @@ -215,9 +219,41 @@ function _canBeUpgradedToTargetVersion(
}
if (isFeeTokenChain) {
// cannot upgrade erc20 orbit chains from v1 to v3 right now due to a storage diff
supportedSourceVersionsPerContract.Bridge = ['v2.0.0', 'v2.1.0']
supportedSourceVersionsPerContract.Bridge = ['v2.0.0', 'v2.1.0', 'v2.1.2']
}
} else if (targetVersion === 'v2.1.2') {
// v2.1.2 will upgrade the ERC20Bridge contract to set decimals in storage
// v2.1.2 is only required for custom fee token chains
// only necessary if ERC20Bridge is < v2.0.0
// must have performed v2.1.0 upgrade first
if (!isFeeTokenChain) {
supportedSourceVersionsPerContract = {
Inbox: [],
Outbox: [],
Bridge: [],
RollupEventInbox: [],
RollupProxy: [],
RollupAdminLogic: [],
RollupUserLogic: [],
ChallengeManager: [],
SequencerInbox: [],
}
}

Check failure on line 241 in scripts/orbit-versioner/orbitVersioner.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `⏎···`
} else if (targetVersion === 'v2.1.0') {
else {
supportedSourceVersionsPerContract = {
Inbox: ['v1.1.0', 'v1.1.1', 'v1.2.0', 'v1.2.1', 'v1.3.0'],
Outbox: ['any'],
Bridge: ['v1.1.0', 'v1.1.1', 'v1.2.0', 'v1.2.1', 'v1.3.0'],
RollupEventInbox: ['any'],
RollupProxy: ['any'],
RollupAdminLogic: ['v2.1.0'],
RollupUserLogic: ['v2.1.0'],
ChallengeManager: ['v2.1.0'],
SequencerInbox: ['v1.2.1', 'v1.3.0', 'v2.0.0', 'v2.1.0'],
}
}
}

Check failure on line 255 in scripts/orbit-versioner/orbitVersioner.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `⏎·`
else if (targetVersion === 'v2.1.0') {
// v2.1.0 will upgrade rollup logics and challenge manager
supportedSourceVersionsPerContract = {
Inbox: ['v1.1.0', 'v1.1.1', 'v1.2.0', 'v1.2.1', 'v1.3.0'],
Expand Down

0 comments on commit 2466ef6

Please sign in to comment.