Add Governor contracts (#2672)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Hadrien Croubois
2021-07-16 17:44:01 +02:00
committed by GitHub
parent f88e555234
commit 6c1a634053
39 changed files with 5302 additions and 377 deletions

24
test/helpers/enums.js Normal file
View File

@ -0,0 +1,24 @@
const { BN } = require('@openzeppelin/test-helpers');
function Enum (...options) {
return Object.fromEntries(options.map((key, i) => [ key, new BN(i) ]));
}
module.exports = {
Enum,
ProposalState: Enum(
'Pending',
'Active',
'Canceled',
'Defeated',
'Succeeded',
'Queued',
'Expired',
'Executed',
),
VoteType: Enum(
'Against',
'For',
'Abstain',
),
};