This repository was archived by the owner on Feb 5, 2025. It is now read-only.
File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
import config from "./config" ;
2
2
import { ApiError , ConfigError } from "./errors" ;
3
- import { NETWORKS } from "./networks" ;
3
+ import { NETWORKS , getNetworkConfigFromName } from "./networks" ;
4
4
import { reset } from "./reset" ;
5
5
import { rollOut } from "./rollout" ;
6
6
import { updateAutotask , updateSentinel } from "./update" ;
@@ -29,6 +29,18 @@ const setup = async () => {
29
29
const oldAutoTasks = await autotaskClient . list ( ) ;
30
30
const oldSentinels = await sentinelClient . list ( ) ;
31
31
32
+ const networksDeployed = oldAutoTasks . items
33
+ . map ( ( task ) => getNetworkConfigFromName ( task . name ) . chainId )
34
+ . filter ( ( value , index , array ) => array . indexOf ( value ) === index ) ;
35
+
36
+ const missingNetworks = networks . filter (
37
+ ( network ) => ! networksDeployed . includes ( network . chainId ) ,
38
+ ) ;
39
+
40
+ if ( missingNetworks . length > 0 ) {
41
+ await rollOut ( missingNetworks ) ;
42
+ }
43
+
32
44
let updates = false ;
33
45
34
46
if ( oldAutoTasks . items . length > 0 ) {
Original file line number Diff line number Diff line change 16
16
"address" : " 0xa16DFb32Eb140a6f3F2AC68f41dAd8c7e83C4941" ,
17
17
"startBlock" : 4421942
18
18
}
19
+ },
20
+ "base" : {
21
+ "HypercertMinter" : {
22
+ "address" : " 0xC2d179166bc9dbB00A03686a5b17eCe2224c2704" ,
23
+ "startBlock" : 11261815
24
+ }
25
+ },
26
+ "base-sepolia" : {
27
+ "HypercertMinter" : {
28
+ "address" : " 0xC2d179166bc9dbB00A03686a5b17eCe2224c2704" ,
29
+ "startBlock" : 6771210
30
+ }
19
31
}
20
32
}
You can’t perform that action at this time.
0 commit comments