Use hardhat-exposed to reduce the need for mocks (#3666)

Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
Hadrien Croubois
2023-01-03 15:38:13 +01:00
committed by GitHub
parent a81b0d0b21
commit c1d9da4052
190 changed files with 2297 additions and 4311 deletions

View File

@ -3,7 +3,7 @@ const { bufferToHex, keccakFromString } = require('ethereumjs-util');
const { expect } = require('chai');
const ERC1820ImplementerMock = artifacts.require('ERC1820ImplementerMock');
const ERC1820Implementer = artifacts.require('$ERC1820Implementer');
contract('ERC1820Implementer', function (accounts) {
const [ registryFunder, implementee, other ] = accounts;
@ -11,7 +11,7 @@ contract('ERC1820Implementer', function (accounts) {
const ERC1820_ACCEPT_MAGIC = bufferToHex(keccakFromString('ERC1820_ACCEPT_MAGIC'));
beforeEach(async function () {
this.implementer = await ERC1820ImplementerMock.new();
this.implementer = await ERC1820Implementer.new();
this.registry = await singletons.ERC1820Registry(registryFunder);
this.interfaceA = bufferToHex(keccakFromString('interfaceA'));
@ -36,7 +36,7 @@ contract('ERC1820Implementer', function (accounts) {
context('with registered interfaces', function () {
beforeEach(async function () {
await this.implementer.registerInterfaceForAddress(this.interfaceA, implementee);
await this.implementer.$_registerInterfaceForAddress(this.interfaceA, implementee);
});
it('returns true when interface implementation is queried', async function () {