Implement suggestions from audit of 4.9 (#4176)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
Francisco
2023-04-21 12:35:07 +01:00
committed by GitHub
parent 8d633cb7d1
commit 91df66c4a9
15 changed files with 97 additions and 76 deletions

View File

@ -70,7 +70,7 @@ contract('Governor', function (accounts) {
);
});
shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor', 'GovernorWithParams']);
shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor', 'GovernorWithParams', 'GovernorCancel']);
shouldBehaveLikeEIP6372(mode);
it('deployment check', async function () {
@ -84,7 +84,7 @@ contract('Governor', function (accounts) {
it('nominal workflow', async function () {
// Before
expect(await this.mock.$_proposalProposer(this.proposal.id)).to.be.equal(constants.ZERO_ADDRESS);
expect(await this.mock.proposalProposer(this.proposal.id)).to.be.equal(constants.ZERO_ADDRESS);
expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false);
expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(false);
expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(false);
@ -149,7 +149,7 @@ contract('Governor', function (accounts) {
await expectEvent.inTransaction(txExecute.tx, this.receiver, 'MockFunctionCalled');
// After
expect(await this.mock.$_proposalProposer(this.proposal.id)).to.be.equal(proposer);
expect(await this.mock.proposalProposer(this.proposal.id)).to.be.equal(proposer);
expect(await this.mock.hasVoted(this.proposal.id, owner)).to.be.equal(false);
expect(await this.mock.hasVoted(this.proposal.id, voter1)).to.be.equal(true);
expect(await this.mock.hasVoted(this.proposal.id, voter2)).to.be.equal(true);