1- async  function  migrateBase  ( {  arcVersion,  web3,  spinner,  confirm,  opts,  logTx,  previousMigration } )  { 
1+ async  function  migrateBase  ( {  arcVersion,  web3,  spinner,  confirm,  opts,  logTx,  previousMigration,  getArcVersionNumber  } )  { 
22  if  ( ! ( await  confirm ( 'About to migrate base contracts. Continue?' ) ) )  { 
33    return 
44  } 
@@ -98,7 +98,7 @@ async function migrateBase ({ arcVersion, web3, spinner, confirm, opts, logTx, p
9898      [ ] , 
9999      web3 . eth . accounts . wallet [ 0 ] . address 
100100    ) 
101-     if  ( Number ( arcVersion . slice ( - 2 ) )  >=  29 )  { 
101+     if  ( getArcVersionNumber ( arcVersion )  >=  29 )  { 
102102      DAOTracker  =  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
103103    } 
104104  }  else  { 
@@ -109,7 +109,7 @@ async function migrateBase ({ arcVersion, web3, spinner, confirm, opts, logTx, p
109109        [ ] , 
110110        '0x85e7fa550b534656d04d143b9a23a11e05077da3'  // DAOstack's controlled account 
111111      ) 
112-       if  ( Number ( arcVersion . slice ( - 2 ) )  >=  29 )  { 
112+       if  ( getArcVersionNumber ( arcVersion )  >=  29 )  { 
113113        DAOTracker  =  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
114114        const  daoTracker  =  new  web3 . eth . Contract ( 
115115          require ( `./contracts/${ arcVersion }  ) . abi , 
@@ -128,7 +128,7 @@ async function migrateBase ({ arcVersion, web3, spinner, confirm, opts, logTx, p
128128        [ ] , 
129129        '0x73Db6408abbea97C5DB8A2234C4027C315094936' 
130130      ) 
131-       if  ( Number ( arcVersion . slice ( - 2 ) )  >=  29 )  { 
131+       if  ( getArcVersionNumber ( arcVersion )  >=  29 )  { 
132132        DAOTracker  =  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
133133        const  daoTracker  =  new  web3 . eth . Contract ( 
134134          require ( `./contracts/${ arcVersion }  ) . abi , 
@@ -146,7 +146,7 @@ async function migrateBase ({ arcVersion, web3, spinner, confirm, opts, logTx, p
146146
147147  const  ControllerCreator  =  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
148148
149-   if  ( Number ( arcVersion . slice ( - 2 ) )  >=  29 )  { 
149+   if  ( getArcVersionNumber ( arcVersion )  >=  29 )  { 
150150    await  deploy ( 
151151      require ( `./contracts/${ arcVersion }  ) , 
152152      [ 'ControllerCreator' ,  'DAOTracker' ] , 
@@ -177,10 +177,10 @@ async function migrateBase ({ arcVersion, web3, spinner, confirm, opts, logTx, p
177177  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
178178  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
179179  await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
180-   if  ( Number ( arcVersion . slice ( - 2 ) )  >=  22 )  { 
180+   if  ( getArcVersionNumber ( arcVersion )  >=  22 )  { 
181181    await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
182182  } 
183-   if  ( Number ( arcVersion . slice ( - 2 ) )  >=  24 )  { 
183+   if  ( getArcVersionNumber ( arcVersion )  >=  24 )  { 
184184    await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
185185  }  else  { 
186186    await  deploy ( require ( `./contracts/${ arcVersion }  ) ) 
0 commit comments