Skip to content

Commit

Permalink
fix misc bugs in npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
RnkSngh committed Jul 29, 2024
1 parent 1c541c4 commit 8a85eb4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion specs/update.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
description: 'Upgrade for uch contract'
deployer: 'KEY_POLYMER'
signature: "upgradeTo(address)"
address: '{{ UC Proxy }}'
address: '{{ UCProxy }}'
factoryName: "UC"
args:
- '{{UC}}'
Expand Down
2 changes: 1 addition & 1 deletion specs/upgrade.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
description: 'Upgrade for uch contract'
deployer: 'KEY_POLYMER'
signature: "upgradeTo(address)"
address: '{{ UC Proxy }}'
address: '{{ UCProxy }}'
factoryName: "UC"
args:
- '{{UC}}'
8 changes: 4 additions & 4 deletions src/scripts/fork-deployment-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { loadContractUpdateRegistry } from "../evm/schemas/contractUpdate";
import { updateContractsForChain } from "../updateContract";

const main = async () => {
const { chain, accounts, upgradeSpecs, anvilPort } = await parseArgsFromCLI();
const { chain, accounts, updateSpecs, anvilPort } = await parseArgsFromCLI();

const { anvilProcess } = await startAnvilServer(
chain.rpc,
Expand All @@ -26,10 +26,10 @@ const main = async () => {
const forkedChain = { ...chain, rpc: anvilUrl };

const contractUpdates = loadContractUpdateRegistry(
parseObjFromFile(upgradeSpecs)
parseObjFromFile(updateSpecs)
);

updateContractsForChain(
await updateContractsForChain(
forkedChain,
accounts.mustGet(chain.chainName),
ContractRegistryLoader.emptySingle(),
Expand All @@ -52,7 +52,7 @@ const main = async () => {
createWriteStream("fork-test.out")
);

anvilProcess.kill();
await anvilProcess.kill();
};

// Starts anvil server from an RPC fork, and waits until it's started
Expand Down
5 changes: 4 additions & 1 deletion src/utils/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ export async function parseArgsFromCLI() {
const deploySpecs = (argv1.DEPLOY_SPECS_PATH as string) || DEPLOY_SPECS_PATH;
const upgradeSpecs =
(argv1.UPGRADE_SPECS_PATH as string) || UPGRADE_SPECS_PATH;
const updateSpecs=
(argv1.UPDATE_SPECS_PATH as string) || UPDATE_SPECS_PATH;
const anvilPort = (argv1.ANVIL_PORT as string) || ANVIL_PORT;

const chainParse = ChainConfigSchema.safeParse({
Expand All @@ -360,7 +362,7 @@ export async function parseArgsFromCLI() {
}

const accountConfigFromYaml = {
name: "local",
name: chainParse.data.chainName,
registry: parseObjFromFile(accountSpecs),
};

Expand All @@ -371,6 +373,7 @@ export async function parseArgsFromCLI() {
accounts,
accountSpecs,
upgradeSpecs,
updateSpecs,
deploySpecs,
args: argv1,
anvilPort,
Expand Down

0 comments on commit 8a85eb4

Please sign in to comment.