-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Added Contract Name to the KeyDeploymentFields structure (#56)
* Added name to the KeyDeploymentFields * Deleted only in test * Refactor Reporter contract. Fix lag during Truffle tx report (#57) * Refactored Reporter contract. Fixed lag. * Added missed new lines * Resolved issue with encapsulation * Update versions * Cleaned up new lines * Risen up a sleep time between attempts to 2500ms
- Loading branch information
Showing
14 changed files
with
239 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable no-console */ | ||
import { Reporter } from "./Reporter"; | ||
|
||
import { Provider } from "../Provider"; | ||
|
||
import { MigrateError } from "../../errors"; | ||
|
||
export class PublicReporter { | ||
public static async reportTransactionByHash(txHash: string, instanceName: string) { | ||
const tx = await Provider.provider.getTransaction(txHash); | ||
|
||
if (!tx) { | ||
throw new MigrateError("Transaction not found."); | ||
} | ||
|
||
await Reporter.reportTransactionResponse(tx, instanceName); | ||
} | ||
|
||
public static reportContracts(...contracts: [string, string][]): void { | ||
const table: { Contract: string; Address: string }[] = contracts.map(([contract, address]) => ({ | ||
Contract: contract, | ||
Address: address, | ||
})); | ||
console.log(); | ||
console.table(table); | ||
console.log(); | ||
} | ||
} |
Oops, something went wrong.