Add 512bits add and mult operations (#5035)
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
function Enum(...options) {
|
||||
return Object.fromEntries(options.map((key, i) => [key, BigInt(i)]));
|
||||
}
|
||||
const { ethers } = require('ethers');
|
||||
|
||||
const Enum = (...options) => Object.fromEntries(options.map((key, i) => [key, BigInt(i)]));
|
||||
const EnumTyped = (...options) => Object.fromEntries(options.map((key, i) => [key, ethers.Typed.uint8(i)]));
|
||||
|
||||
module.exports = {
|
||||
Enum,
|
||||
EnumTyped,
|
||||
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'),
|
||||
Rounding: EnumTyped('Floor', 'Ceil', 'Trunc', 'Expand'),
|
||||
OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'),
|
||||
RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'),
|
||||
RevertType: EnumTyped('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user