Implement recommendations from 5.0 audit Phase 1A (#4398)

Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Ernesto García
2023-07-03 12:02:06 -06:00
committed by GitHub
parent 06861dce54
commit bb64458928
38 changed files with 779 additions and 666 deletions

View File

@ -70,8 +70,8 @@ function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungibl
});
expectEvent(receipt, 'DelegateVotesChanged', {
delegate: accounts[1],
previousBalance: '0',
newBalance: weight,
previousVotes: '0',
newVotes: weight,
});
expect(await this.votes.delegates(accounts[1])).to.be.equal(accounts[1]);
@ -100,13 +100,13 @@ function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungibl
});
expectEvent(receipt, 'DelegateVotesChanged', {
delegate: accounts[1],
previousBalance: weight,
newBalance: '0',
previousVotes: weight,
newVotes: '0',
});
expectEvent(receipt, 'DelegateVotesChanged', {
delegate: accounts[2],
previousBalance: '0',
newBalance: weight,
previousVotes: '0',
newVotes: weight,
});
expect(await this.votes.delegates(accounts[1])).to.be.equal(accounts[2]);
@ -152,8 +152,8 @@ function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungibl
});
expectEvent(receipt, 'DelegateVotesChanged', {
delegate: delegatee,
previousBalance: '0',
newBalance: weight,
previousVotes: '0',
newVotes: weight,
});
expect(await this.votes.delegates(delegator.address)).to.be.equal(delegatee);