You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
389 B
JavaScript
13 lines
389 B
JavaScript
1 year ago
|
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'),
|
||
|
Rounding: Enum('Down', 'Up', 'Zero'),
|
||
|
};
|