Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7d0fad
commit a846d7e
Showing
9 changed files
with
132 additions
and
135 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
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
77 changes: 77 additions & 0 deletions
77
packages/contracts/test/contracts/L2/predeploys/OVM_ETH.spec.ts
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,77 @@ | ||
import { expect } from '../../../setup' | ||
|
||
/* External Imports */ | ||
import { ethers } from 'hardhat' | ||
import { ContractFactory, Contract, Signer } from 'ethers' | ||
|
||
describe('OVM_ETH', () => { | ||
let signer1: Signer | ||
let signer2: Signer | ||
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() | ||
}) | ||
|
||
describe('transfer', () => { | ||
it('should revert', async () => { | ||
await expect( | ||
OVM_ETH.transfer(await signer2.getAddress(), 100) | ||
).to.be.revertedWith( | ||
'OVM_ETH: transfer is disabled pending further community discussion.' | ||
) | ||
}) | ||
}) | ||
|
||
describe('approve', () => { | ||
it('should revert', async () => { | ||
await expect( | ||
OVM_ETH.approve(await signer2.getAddress(), 100) | ||
).to.be.revertedWith( | ||
'OVM_ETH: approve is disabled pending further community discussion.' | ||
) | ||
}) | ||
}) | ||
|
||
describe('transferFrom', () => { | ||
it('should revert', async () => { | ||
await expect( | ||
OVM_ETH.transferFrom( | ||
await signer1.getAddress(), | ||
await signer2.getAddress(), | ||
100 | ||
) | ||
).to.be.revertedWith( | ||
'OVM_ETH: transferFrom is disabled pending further community discussion.' | ||
) | ||
}) | ||
}) | ||
|
||
describe('increaseAllowance', () => { | ||
it('should revert', async () => { | ||
await expect( | ||
OVM_ETH.increaseAllowance(await signer2.getAddress(), 100) | ||
).to.be.revertedWith( | ||
'OVM_ETH: increaseAllowance is disabled pending further community discussion.' | ||
) | ||
}) | ||
}) | ||
|
||
describe('decreaseAllowance', () => { | ||
it('should revert', async () => { | ||
await expect( | ||
OVM_ETH.decreaseAllowance(await signer2.getAddress(), 100) | ||
).to.be.revertedWith( | ||
'OVM_ETH: decreaseAllowance is disabled pending further community discussion.' | ||
) | ||
}) | ||
}) | ||
}) |
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