Skip to content

Commit 2466ef6

Browse files
committed
add version path
1 parent 71e2bf1 commit 2466ef6

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

scripts/orbit-versioner/orbitVersioner.ts

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ function _checkForPossibleUpgrades(
146146
version: 'v3.0.0',
147147
actionName: 'BOLD UpgradeAction',
148148
},
149+
{
150+
version: 'v2.1.2',
151+
actionName: 'NitroContracts2Point1Point2UpgradeAction',
152+
},
149153
{
150154
version: 'v2.1.0',
151155
actionName: 'NitroContracts2Point1Point0UpgradeAction',
@@ -215,9 +219,41 @@ function _canBeUpgradedToTargetVersion(
215219
}
216220
if (isFeeTokenChain) {
217221
// cannot upgrade erc20 orbit chains from v1 to v3 right now due to a storage diff
218-
supportedSourceVersionsPerContract.Bridge = ['v2.0.0', 'v2.1.0']
222+
supportedSourceVersionsPerContract.Bridge = ['v2.0.0', 'v2.1.0', 'v2.1.2']
223+
}
224+
} else if (targetVersion === 'v2.1.2') {
225+
// v2.1.2 will upgrade the ERC20Bridge contract to set decimals in storage
226+
// v2.1.2 is only required for custom fee token chains
227+
// only necessary if ERC20Bridge is < v2.0.0
228+
// must have performed v2.1.0 upgrade first
229+
if (!isFeeTokenChain) {
230+
supportedSourceVersionsPerContract = {
231+
Inbox: [],
232+
Outbox: [],
233+
Bridge: [],
234+
RollupEventInbox: [],
235+
RollupProxy: [],
236+
RollupAdminLogic: [],
237+
RollupUserLogic: [],
238+
ChallengeManager: [],
239+
SequencerInbox: [],
240+
}
219241
}
220-
} else if (targetVersion === 'v2.1.0') {
242+
else {
243+
supportedSourceVersionsPerContract = {
244+
Inbox: ['v1.1.0', 'v1.1.1', 'v1.2.0', 'v1.2.1', 'v1.3.0'],
245+
Outbox: ['any'],
246+
Bridge: ['v1.1.0', 'v1.1.1', 'v1.2.0', 'v1.2.1', 'v1.3.0'],
247+
RollupEventInbox: ['any'],
248+
RollupProxy: ['any'],
249+
RollupAdminLogic: ['v2.1.0'],
250+
RollupUserLogic: ['v2.1.0'],
251+
ChallengeManager: ['v2.1.0'],
252+
SequencerInbox: ['v1.2.1', 'v1.3.0', 'v2.0.0', 'v2.1.0'],
253+
}
254+
}
255+
}
256+
else if (targetVersion === 'v2.1.0') {
221257
// v2.1.0 will upgrade rollup logics and challenge manager
222258
supportedSourceVersionsPerContract = {
223259
Inbox: ['v1.1.0', 'v1.1.1', 'v1.2.0', 'v1.2.1', 'v1.3.0'],

0 commit comments

Comments
 (0)