You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
553 B
12 lines
553 B
function Enum(...options) {
|
|
return Object.fromEntries(options.map((key, i) => [key, BigInt(i)]));
|
|
}
|
|
|
|
module.exports = {
|
|
Enum,
|
|
ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'),
|
|
VoteType: Object.assign(Enum('Against', 'For', 'Abstain'), { Parameters: 255n }),
|
|
Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'),
|
|
OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'),
|
|
RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'),
|
|
};
|
|
|