Skip to content

Commit

Permalink
Simplify Upgrader interface
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Sep 20, 2023
1 parent b689987 commit ddada38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/upgrader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ interface ContractToUpgrade {
interface Project {
name: string;
instance: Instance;
}

interface Target {
version: string;
contractNamesToUpgrade: string[]
}
Expand All @@ -49,15 +46,14 @@ export abstract class Upgrader {

constructor (
project: Project,
target: Target,
submitter: Submitter = new AutoSubmitter()
) {
this.targetVersion = target.version;
if (!target.version.includes("-")) {
this.targetVersion = `${target.version}-stable.0`;
this.targetVersion = project.version;
if (!project.version.includes("-")) {
this.targetVersion = `${project.version}-stable.0`;
}
this.instance = project.instance;
this.contractNamesToUpgrade = target.contractNamesToUpgrade;
this.contractNamesToUpgrade = project.contractNamesToUpgrade;
this.projectName = project.name;
this.transactions = [];
this.submitter = submitter;
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"extends": "@tsconfig/recommended/tsconfig.json",

"compilerOptions": {
"target": "ES2020",
"outDir": "./dist",
"declaration": true,
"outDir": "./dist",
"sourceMap": true,
"target": "ES2020"
},
"include": ["./src", "./typechain-types"],
"exclude": ["node_modules", "dist"],
Expand Down

0 comments on commit ddada38

Please sign in to comment.