File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ import {
1616} from "./common" ;
1717import { loadHotWallet } from "../src/node/utils/governance" ;
1818import { DefaultStore } from "../src/node/utils/store" ;
19+ import upgradeVaults from "../src/store/vaults/UpgradeVaults.json" ;
1920
2021const LAZER_CACHE_FILE = ".cache-upgrade-evm-lazer-contract" ;
2122
2223const parser = yargs ( hideBin ( process . argv ) )
2324 . usage (
2425 "Deploys a new PythLazer implementation contract to a set of chains and creates a governance proposal for upgrading the proxy.\n" +
25- ` Uses a cache file to avoid deploying contracts twice\n` +
26+ " Uses a cache file to avoid deploying contracts twice\n" +
2627 "Usage: $0 --chain <chain_1> --chain <chain_2> --private-key <private_key> --ops-key-path <ops_key_path>" ,
2728 )
2829 . options ( {
@@ -125,10 +126,13 @@ async function main() {
125126
126127 const selectedChains = getSelectedChains ( argv ) ;
127128
129+ const mainnetVault = upgradeVaults . find (
130+ ( v ) => v . cluster === "mainnet-beta" && v . type === "vault" ,
131+ ) ;
132+ if ( ! mainnetVault )
133+ throw new Error ( "Mainnet vault not found in UpgradeVaults.json" ) ;
128134 const vault =
129- DefaultStore . vaults [
130- "mainnet-beta_FVQyHcooAtThJ83XFrNnv74BcinbRH3bRmfFamAHBfuj"
131- ] ;
135+ DefaultStore . vaults [ `${ mainnetVault . cluster } _${ mainnetVault . key } ` ] ;
132136
133137 console . log ( "Using cache file" , cacheFile ) ;
134138
You can’t perform that action at this time.
0 commit comments