Skip to content

Commit

Permalink
fixed error handling on xSBT deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Jun 20, 2023
1 parent ef06ed7 commit 2242aa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 3 additions & 7 deletions src/commands/sbt/ASBT/deploy.ts
Expand Up @@ -26,11 +26,9 @@ export const deployASBT = async (etherscanKey?: string) => {
adminAddress,
});

if (
deployResult &&
etherscanKey &&
masa.config.network?.blockExplorerApiUrls?.[0]
) {
if (!deployResult) {
console.error("ASBT Deployment failed!");
} else if (etherscanKey && masa.config.network?.blockExplorerApiUrls?.[0]) {
const ReferenceSBTAuthority = fs
.readFileSync(ReferenceSBTAuthorityPath)
.toString("utf8");
Expand All @@ -45,7 +43,5 @@ export const deployASBT = async (etherscanKey?: string) => {
abiEncodedConstructorArguments,
ReferenceSBTAuthority
);
} else {
console.error("ASBT Deployment failed!");
}
};
10 changes: 3 additions & 7 deletions src/commands/sbt/SSSBT/deploy.ts
Expand Up @@ -30,11 +30,9 @@ export const deploySSSBT = async (etherscanKey?: string) => {
adminAddress,
});

if (
deployResult &&
etherscanKey &&
masa.config.network?.blockExplorerApiUrls?.[0]
) {
if (!deployResult) {
console.error("SSSBT Deployment failed!");
} else if (etherscanKey && masa.config.network?.blockExplorerApiUrls?.[0]) {
const ReferenceSBTAuthority = fs
.readFileSync(ReferenceSBTAuthorityPath)
.toString("utf8");
Expand All @@ -49,7 +47,5 @@ export const deploySSSBT = async (etherscanKey?: string) => {
abiEncodedConstructorArguments,
ReferenceSBTAuthority
);
} else {
console.error("SSSBT Deployment failed!");
}
};

0 comments on commit 2242aa3

Please sign in to comment.