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,8 +3,8 @@ const { expect } = require('chai');
const Enums = require('../../helpers/enums');
const { GovernorHelper } = require('../../helpers/governance');
const Token = artifacts.require('ERC20VotesCompMock');
const Governor = artifacts.require('GovernorCompMock');
const Token = artifacts.require('$ERC20VotesComp');
const Governor = artifacts.require('$GovernorCompMock');
const CallReceiver = artifacts.require('CallReceiverMock');
contract('GovernorComp', function (accounts) {
@ -21,7 +21,7 @@ contract('GovernorComp', function (accounts) {
beforeEach(async function () {
this.owner = owner;
this.token = await Token.new(tokenName, tokenSymbol);
this.token = await Token.new(tokenName, tokenSymbol, tokenName);
this.mock = await Governor.new(name, this.token.address);
this.receiver = await CallReceiver.new();
@ -29,7 +29,7 @@ contract('GovernorComp', function (accounts) {
await web3.eth.sendTransaction({ from: owner, to: this.mock.address, value });
await this.token.mint(owner, tokenSupply);
await this.token.$_mint(owner, tokenSupply);
await this.helper.delegate({ token: this.token, to: voter1, value: web3.utils.toWei('10') }, { from: owner });
await this.helper.delegate({ token: this.token, to: voter2, value: web3.utils.toWei('7') }, { from: owner });
await this.helper.delegate({ token: this.token, to: voter3, value: web3.utils.toWei('5') }, { from: owner });