Merge pull request from GHSA-93hq-5wgc-jc82

Co-authored-by: Francisco <fg@frang.io>
(cherry picked from commit 8d633cb7d1)
This commit is contained in:
Hadrien Croubois
2023-04-13 20:47:51 +02:00
committed by Francisco Giordano
parent 61b45a2850
commit ea595f5960
3 changed files with 26 additions and 2 deletions

View File

@ -223,6 +223,21 @@ contract('GovernorCompatibilityBravo', function (accounts) {
);
});
it('with inconsistent array size for selector and arguments', async function () {
const target = this.receiver.address;
this.helper.setProposal(
{
targets: [target, target],
values: [0, 0],
signatures: ['mockFunction()'], // One signature
data: ['0x', this.receiver.contract.methods.mockFunctionWithArgs(17, 42).encodeABI()], // Two data entries
},
'<proposal description>',
);
await expectRevert(this.helper.propose({ from: proposer }), 'GovernorBravo: invalid signatures length');
});
describe('should revert', function () {
describe('on propose', function () {
it('if proposal does not meet proposalThreshold', async function () {