Commit 75c5f54d authored by smartcontracts's avatar smartcontracts Committed by GitHub

maint(ct): clean up OVM_ETH tests (#2493)

Cleans up OVM_ETH tests using the same techniques as other cleanup PRs.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent d7bb9625
/* External Imports */
import { ethers } from 'hardhat'
import { ContractFactory, Contract, Signer } from 'ethers'
import { Contract } from 'ethers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { expect } from '../../../setup'
import { deploy } from '../../../helpers'
describe('OVM_ETH', () => {
let signer1: Signer
let signer2: Signer
let signer1: SignerWithAddress
let signer2: SignerWithAddress
before(async () => {
;[signer1, signer2] = await ethers.getSigners()
})
let Factory__OVM_ETH: ContractFactory
before(async () => {
Factory__OVM_ETH = await ethers.getContractFactory('OVM_ETH')
})
let OVM_ETH: Contract
beforeEach(async () => {
OVM_ETH = await Factory__OVM_ETH.deploy()
OVM_ETH = await deploy('OVM_ETH')
})
describe('transfer', () => {
it('should revert', async () => {
await expect(
OVM_ETH.transfer(await signer2.getAddress(), 100)
).to.be.revertedWith(
await expect(OVM_ETH.transfer(signer2.address, 100)).to.be.revertedWith(
'OVM_ETH: transfer is disabled pending further community discussion.'
)
})
......@@ -33,9 +28,7 @@ describe('OVM_ETH', () => {
describe('approve', () => {
it('should revert', async () => {
await expect(
OVM_ETH.approve(await signer2.getAddress(), 100)
).to.be.revertedWith(
await expect(OVM_ETH.approve(signer2.address, 100)).to.be.revertedWith(
'OVM_ETH: approve is disabled pending further community discussion.'
)
})
......@@ -44,11 +37,7 @@ describe('OVM_ETH', () => {
describe('transferFrom', () => {
it('should revert', async () => {
await expect(
OVM_ETH.transferFrom(
await signer1.getAddress(),
await signer2.getAddress(),
100
)
OVM_ETH.transferFrom(signer1.address, signer2.address, 100)
).to.be.revertedWith(
'OVM_ETH: transferFrom is disabled pending further community discussion.'
)
......@@ -58,7 +47,7 @@ describe('OVM_ETH', () => {
describe('increaseAllowance', () => {
it('should revert', async () => {
await expect(
OVM_ETH.increaseAllowance(await signer2.getAddress(), 100)
OVM_ETH.increaseAllowance(signer2.address, 100)
).to.be.revertedWith(
'OVM_ETH: increaseAllowance is disabled pending further community discussion.'
)
......@@ -68,7 +57,7 @@ describe('OVM_ETH', () => {
describe('decreaseAllowance', () => {
it('should revert', async () => {
await expect(
OVM_ETH.decreaseAllowance(await signer2.getAddress(), 100)
OVM_ETH.decreaseAllowance(signer2.address, 100)
).to.be.revertedWith(
'OVM_ETH: decreaseAllowance is disabled pending further community discussion.'
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment