UNPKG

@matterlabs/hardhat-zksync-verify

Version:
37 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ZksyncBlockExplorerResponse = void 0; class ZksyncBlockExplorerResponse { constructor(response) { this.status = response.data.status; this.error = response.data.error; this.compilationErrors = response.data.compilationErrors; } errorExists() { return !!(this.error || this.compilationErrors); } getError() { let errors = ''; if (this.error) { errors += this.error; } if (this.compilationErrors) { errors += this.compilationErrors.join('\n'); } return errors; } isPending() { return this.status === 'in_progress' || this.status === 'queued'; } isFailure() { return this.status === 'failed'; } isOk() { return this.status === 'successful'; } isSuccess() { return this.isOk(); } } exports.ZksyncBlockExplorerResponse = ZksyncBlockExplorerResponse; //# sourceMappingURL=verification-status-response.js.map