Skip to content

Commit

Permalink
Support load deployments from different groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed May 29, 2024
1 parent 551ed38 commit eecd19a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/cli/src/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,7 @@ async function getAllDeployments(config: Configuration): Promise<DeploymentsPerA
const allDeployments: DeploymentsPerAddress[] = []
for (const filePath of filePaths) {
const deployments = await Deployments.from(filePath)
if (deployments.deployments.length > 0) {
allDeployments.push(deployments.deployments[0])
}
allDeployments.push(...deployments.deployments)
}
return allDeployments
}
Expand Down Expand Up @@ -746,7 +744,7 @@ export async function genLoadDeployments(config: Configuration) {
if (deployments === undefined) {
throw Error('The contract has not been deployed to the ' + networkId)
}
const allDeployments = Array.isArray(deployments) ? deployments : [deployments]
const allDeployments: any[] = Array.isArray(deployments) ? deployments : [deployments]
if (deployerAddress === undefined) {
if (allDeployments.length > 1) {
throw Error('The contract has been deployed multiple times on ' + networkId + ', please specify the deployer address')
Expand Down

0 comments on commit eecd19a

Please sign in to comment.