Remove GovernorCompatibilyBravo and add simpler GovernorStorage (#4360)
Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
const { web3 } = require('hardhat');
|
||||
const { forward } = require('../helpers/time');
|
||||
const { ProposalState } = require('./enums');
|
||||
|
||||
@ -15,6 +16,9 @@ function concatOpts(args, opts = null) {
|
||||
return opts ? args.concat(opts) : args;
|
||||
}
|
||||
|
||||
const timelockSalt = (address, descriptionHash) =>
|
||||
'0x' + web3.utils.toBN(address).shln(96).xor(web3.utils.toBN(descriptionHash)).toString(16, 64);
|
||||
|
||||
class GovernorHelper {
|
||||
constructor(governor, mode = 'blocknumber') {
|
||||
this.governor = governor;
|
||||
@ -245,4 +249,5 @@ function proposalStatesToBitMap(proposalStates, options = {}) {
|
||||
module.exports = {
|
||||
GovernorHelper,
|
||||
proposalStatesToBitMap,
|
||||
timelockSalt,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user