Use hardhat-exposed to reduce the need for mocks (#3666)
Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user