Skip to content

Commit

Permalink
lint: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcontracts committed Jun 17, 2021
1 parent 3b0bcb5 commit 568369a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/smock/src/smockit/binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { HardhatNetworkProvider } from 'hardhat/internal/hardhat-network/provide
import { VmError } from '@nomiclabs/ethereumjs-vm/dist/exceptions'
import BN from 'bn.js'

/* eslint-disable @typescript-eslint/no-var-requires */
// Handle hardhat ^2.4.0
let decodeRevertReason: (value: Buffer) => string
try {
Expand All @@ -16,18 +17,16 @@ try {
return new ReturnData(value).decodeError()
}
}

// Handle hardhat ^2.2.0
let TransactionExecutionError: any
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
TransactionExecutionError = require('hardhat/internal/hardhat-network/provider/errors')
.TransactionExecutionError
} catch (err) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
TransactionExecutionError = require('hardhat/internal/core/providers/errors')
.TransactionExecutionError
}
/* eslint-enable @typescript-eslint/no-var-requires */

/* Imports: Internal */
import { MockContract, SmockedVM } from './types'
Expand Down

0 comments on commit 568369a

Please sign in to comment.