This repository was archived by the owner on Feb 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 11import config from "./config" ;
22import { ApiError , ConfigError } from "./errors" ;
3- import { NETWORKS } from "./networks" ;
3+ import { NETWORKS , getNetworkConfigFromName } from "./networks" ;
44import { reset } from "./reset" ;
55import { rollOut } from "./rollout" ;
66import { updateAutotask , updateSentinel } from "./update" ;
@@ -29,6 +29,18 @@ const setup = async () => {
2929 const oldAutoTasks = await autotaskClient . list ( ) ;
3030 const oldSentinels = await sentinelClient . list ( ) ;
3131
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+
3244 let updates = false ;
3345
3446 if ( oldAutoTasks . items . length > 0 ) {
Original file line number Diff line number Diff line change 1616 "address" : " 0xa16DFb32Eb140a6f3F2AC68f41dAd8c7e83C4941" ,
1717 "startBlock" : 4421942
1818 }
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+ }
1931 }
2032}
You can’t perform that action at this time.
0 commit comments