@venusprotocol/governance-contracts 2.11.1-dev.2 → 2.12.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/build-info/3b47d4ce14ec7fb090660b6af43c54be.json +1 -0
- package/artifacts/contracts/Governance/GovernorBravoDelegate.sol/GovernorBravoDelegate.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoDelegate.sol/GovernorBravoDelegate.json +208 -62
- package/artifacts/contracts/Governance/GovernorBravoDelegator.sol/GovernorBravoDelegator.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoDelegator.sol/GovernorBravoDelegator.json +82 -2
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorAlphaInterface.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.json +2 -2
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2.json +2 -2
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.json +365 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.json +2 -2
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.json +82 -2
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/TimelockInterface.dbg.json +1 -1
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/XvsVaultInterface.dbg.json +1 -1
- package/artifacts/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1.dbg.json +1 -1
- package/artifacts/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1.json +2 -2
- package/artifacts/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.dbg.json +4 -0
- package/artifacts/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.json +418 -0
- package/artifacts/contracts/legacy/GovernorBravoDelegateV1.sol/GovernorBravoDelegateV1.dbg.json +1 -1
- package/artifacts/contracts/legacy/GovernorBravoDelegateV1.sol/GovernorBravoDelegateV1.json +2 -2
- package/artifacts/contracts/legacy/GovernorBravoDelegateV2.sol/GovernorBravoDelegateV2.dbg.json +4 -0
- package/artifacts/contracts/legacy/GovernorBravoDelegateV2.sol/GovernorBravoDelegateV2.json +1173 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.dbg.json +1 -1
- package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.json +2 -2
- package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.dbg.json +1 -1
- package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.json +2 -2
- package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoEventsV1.dbg.json +1 -1
- package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoEventsV1.json +2 -2
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.dbg.json +4 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.json +283 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.dbg.json +4 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.json +335 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.dbg.json +4 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.json +56 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.dbg.json +4 -0
- package/artifacts/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.json +312 -0
- package/contracts/Governance/GovernorBravoDelegate.sol +80 -30
- package/contracts/Governance/GovernorBravoInterfaces.sol +33 -1
- package/contracts/legacy/GovenorBravoV2.sol +97 -0
- package/contracts/legacy/GovernorBravoDelegateV2.sol +521 -0
- package/contracts/legacy/GovernorBravoInterfacesV2.sol +208 -0
- package/deploy/011-deploy-governor-bravo.ts +32 -0
- package/deployments/bscmainnet/GovernorBravoDelegate.json +877 -62
- package/deployments/bscmainnet/solcInputs/ad770aaa336e097c7b976e7839cb0f59.json +48 -0
- package/deployments/bscmainnet.json +207 -61
- package/deployments/bscmainnet_addresses.json +1 -1
- package/deployments/bsctestnet/GovernorBravoDelegate.json +877 -62
- package/deployments/bsctestnet/solcInputs/39afa7d975793de62f715dc8afa71529.json +48 -0
- package/deployments/bsctestnet/solcInputs/51535febbc2fed693ac575b5f75633d2.json +48 -0
- package/deployments/bsctestnet/solcInputs/ad770aaa336e097c7b976e7839cb0f59.json +48 -0
- package/deployments/bsctestnet.json +207 -61
- package/deployments/bsctestnet_addresses.json +1 -1
- package/dist/deploy/011-deploy-governor-bravo.d.ts +4 -0
- package/dist/deploy/011-deploy-governor-bravo.d.ts.map +1 -0
- package/dist/deploy/011-deploy-governor-bravo.js +36 -0
- package/dist/deploy/011-deploy-governor-bravo.js.map +1 -0
- package/dist/deployments/bscmainnet.json +207 -61
- package/dist/deployments/bsctestnet.json +207 -61
- package/dist/typechain/contracts/Governance/GovernorBravoDelegate.d.ts +137 -39
- package/dist/typechain/contracts/Governance/GovernorBravoDelegate.d.ts.map +1 -1
- package/dist/typechain/contracts/Governance/GovernorBravoDelegator.d.ts +40 -0
- package/dist/typechain/contracts/Governance/GovernorBravoDelegator.d.ts.map +1 -1
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.d.ts +297 -0
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.d.ts.map +1 -0
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.js +3 -0
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.js.map +1 -0
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.d.ts +40 -0
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.d.ts.map +1 -1
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/index.d.ts +1 -0
- package/dist/typechain/contracts/Governance/GovernorBravoInterfaces.sol/index.d.ts.map +1 -1
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.d.ts +259 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.js +3 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/index.d.ts +2 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/index.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/index.js +3 -0
- package/dist/typechain/contracts/legacy/GovenorBravoV2.sol/index.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoDelegateV2.d.ts +833 -0
- package/dist/typechain/contracts/legacy/GovernorBravoDelegateV2.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoDelegateV2.js +3 -0
- package/dist/typechain/contracts/legacy/GovernorBravoDelegateV2.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.d.ts +219 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.js +3 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.d.ts +259 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.js +3 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.d.ts +59 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.js +3 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.d.ts +215 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.js +3 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.js.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/index.d.ts +5 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/index.d.ts.map +1 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/index.js +3 -0
- package/dist/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/index.js.map +1 -0
- package/dist/typechain/contracts/legacy/index.d.ts +5 -0
- package/dist/typechain/contracts/legacy/index.d.ts.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegate__factory.d.ts +165 -49
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegate__factory.d.ts.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegate__factory.js +207 -61
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegate__factory.js.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegator__factory.d.ts +66 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegator__factory.d.ts.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegator__factory.js +81 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoDelegator__factory.js.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1__factory.js +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2__factory.js +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3__factory.d.ts +302 -0
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3__factory.js +394 -0
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage__factory.js +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents__factory.d.ts +66 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents__factory.d.ts.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents__factory.js +81 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents__factory.js.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/index.d.ts +1 -0
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/index.d.ts.map +1 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/index.js +3 -1
- package/dist/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/index.js.map +1 -1
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1__factory.js +1 -1
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1__factory.d.ts +346 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1__factory.js +447 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/index.d.ts +2 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/index.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/index.js +6 -0
- package/dist/typechain/factories/contracts/legacy/GovenorBravoV2.sol/index.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoDelegateV1__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoDelegateV1__factory.js +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoDelegateV2__factory.d.ts +944 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoDelegateV2__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoDelegateV2__factory.js +1202 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoDelegateV2__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1__factory.js +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage__factory.js +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoEventsV1__factory.d.ts +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoEventsV1__factory.js +1 -1
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1__factory.d.ts +238 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1__factory.js +312 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2__factory.d.ts +278 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2__factory.js +364 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage__factory.d.ts +58 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage__factory.js +85 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2__factory.d.ts +262 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2__factory.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2__factory.js +341 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2__factory.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/index.d.ts +5 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/index.d.ts.map +1 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/index.js +12 -0
- package/dist/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/index.js.map +1 -0
- package/dist/typechain/factories/contracts/legacy/index.d.ts +3 -0
- package/dist/typechain/factories/contracts/legacy/index.d.ts.map +1 -1
- package/dist/typechain/factories/contracts/legacy/index.js +5 -1
- package/dist/typechain/factories/contracts/legacy/index.js.map +1 -1
- package/dist/typechain/index.d.ts +6 -0
- package/dist/typechain/index.d.ts.map +1 -1
- package/dist/typechain/index.js +8 -2
- package/dist/typechain/index.js.map +1 -1
- package/package.json +1 -1
- package/typechain/contracts/Governance/GovernorBravoDelegate.ts +221 -81
- package/typechain/contracts/Governance/GovernorBravoDelegator.ts +76 -0
- package/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3.ts +573 -0
- package/typechain/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.ts +76 -0
- package/typechain/contracts/Governance/GovernorBravoInterfaces.sol/index.ts +1 -0
- package/typechain/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1.ts +477 -0
- package/typechain/contracts/legacy/GovenorBravoV2.sol/index.ts +4 -0
- package/typechain/contracts/legacy/GovernorBravoDelegateV2.ts +1716 -0
- package/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1.ts +438 -0
- package/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2.ts +526 -0
- package/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage.ts +125 -0
- package/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2.ts +371 -0
- package/typechain/contracts/legacy/GovernorBravoInterfacesV2.sol/index.ts +7 -0
- package/typechain/contracts/legacy/index.ts +7 -0
- package/typechain/factories/contracts/Governance/GovernorBravoDelegate__factory.ts +207 -61
- package/typechain/factories/contracts/Governance/GovernorBravoDelegator__factory.ts +81 -1
- package/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1__factory.ts +1 -1
- package/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2__factory.ts +1 -1
- package/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV3__factory.ts +425 -0
- package/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage__factory.ts +1 -1
- package/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents__factory.ts +81 -1
- package/typechain/factories/contracts/Governance/GovernorBravoInterfaces.sol/index.ts +1 -0
- package/typechain/factories/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1__factory.ts +1 -1
- package/typechain/factories/contracts/legacy/GovenorBravoV2.sol/GovernorBravoDelegatorV1__factory.ts +519 -0
- package/typechain/factories/contracts/legacy/GovenorBravoV2.sol/index.ts +4 -0
- package/typechain/factories/contracts/legacy/GovernorBravoDelegateV1__factory.ts +1 -1
- package/typechain/factories/contracts/legacy/GovernorBravoDelegateV2__factory.ts +1231 -0
- package/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1__factory.ts +1 -1
- package/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage__factory.ts +1 -1
- package/typechain/factories/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoEventsV1__factory.ts +1 -1
- package/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV1__factory.ts +343 -0
- package/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegateStorageV2__factory.ts +395 -0
- package/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoDelegatorStorage__factory.ts +116 -0
- package/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/GovernorBravoEventsV2__factory.ts +370 -0
- package/typechain/factories/contracts/legacy/GovernorBravoInterfacesV2.sol/index.ts +7 -0
- package/typechain/factories/contracts/legacy/index.ts +3 -0
- package/typechain/index.ts +6 -0
- package/artifacts/build-info/da11d367dd07d3f79bea1d8c5833588f.json +0 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "GovernorBravoEventsV2",
|
|
4
|
+
"sourceName": "contracts/legacy/GovernorBravoInterfacesV2.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"anonymous": false,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"indexed": false,
|
|
11
|
+
"internalType": "address",
|
|
12
|
+
"name": "oldAdmin",
|
|
13
|
+
"type": "address"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"indexed": false,
|
|
17
|
+
"internalType": "address",
|
|
18
|
+
"name": "newAdmin",
|
|
19
|
+
"type": "address"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"name": "NewAdmin",
|
|
23
|
+
"type": "event"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"anonymous": false,
|
|
27
|
+
"inputs": [
|
|
28
|
+
{
|
|
29
|
+
"indexed": false,
|
|
30
|
+
"internalType": "address",
|
|
31
|
+
"name": "oldGuardian",
|
|
32
|
+
"type": "address"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"indexed": false,
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "newGuardian",
|
|
38
|
+
"type": "address"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"name": "NewGuardian",
|
|
42
|
+
"type": "event"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"anonymous": false,
|
|
46
|
+
"inputs": [
|
|
47
|
+
{
|
|
48
|
+
"indexed": false,
|
|
49
|
+
"internalType": "address",
|
|
50
|
+
"name": "oldImplementation",
|
|
51
|
+
"type": "address"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"indexed": false,
|
|
55
|
+
"internalType": "address",
|
|
56
|
+
"name": "newImplementation",
|
|
57
|
+
"type": "address"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"name": "NewImplementation",
|
|
61
|
+
"type": "event"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"anonymous": false,
|
|
65
|
+
"inputs": [
|
|
66
|
+
{
|
|
67
|
+
"indexed": false,
|
|
68
|
+
"internalType": "address",
|
|
69
|
+
"name": "oldPendingAdmin",
|
|
70
|
+
"type": "address"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"indexed": false,
|
|
74
|
+
"internalType": "address",
|
|
75
|
+
"name": "newPendingAdmin",
|
|
76
|
+
"type": "address"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"name": "NewPendingAdmin",
|
|
80
|
+
"type": "event"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"anonymous": false,
|
|
84
|
+
"inputs": [
|
|
85
|
+
{
|
|
86
|
+
"indexed": false,
|
|
87
|
+
"internalType": "uint256",
|
|
88
|
+
"name": "id",
|
|
89
|
+
"type": "uint256"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"name": "ProposalCanceled",
|
|
93
|
+
"type": "event"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"anonymous": false,
|
|
97
|
+
"inputs": [
|
|
98
|
+
{
|
|
99
|
+
"indexed": false,
|
|
100
|
+
"internalType": "uint256",
|
|
101
|
+
"name": "id",
|
|
102
|
+
"type": "uint256"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"indexed": false,
|
|
106
|
+
"internalType": "address",
|
|
107
|
+
"name": "proposer",
|
|
108
|
+
"type": "address"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"indexed": false,
|
|
112
|
+
"internalType": "address[]",
|
|
113
|
+
"name": "targets",
|
|
114
|
+
"type": "address[]"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"indexed": false,
|
|
118
|
+
"internalType": "uint256[]",
|
|
119
|
+
"name": "values",
|
|
120
|
+
"type": "uint256[]"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"indexed": false,
|
|
124
|
+
"internalType": "string[]",
|
|
125
|
+
"name": "signatures",
|
|
126
|
+
"type": "string[]"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"indexed": false,
|
|
130
|
+
"internalType": "bytes[]",
|
|
131
|
+
"name": "calldatas",
|
|
132
|
+
"type": "bytes[]"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"indexed": false,
|
|
136
|
+
"internalType": "uint256",
|
|
137
|
+
"name": "startBlock",
|
|
138
|
+
"type": "uint256"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"indexed": false,
|
|
142
|
+
"internalType": "uint256",
|
|
143
|
+
"name": "endBlock",
|
|
144
|
+
"type": "uint256"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"indexed": false,
|
|
148
|
+
"internalType": "string",
|
|
149
|
+
"name": "description",
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"indexed": false,
|
|
154
|
+
"internalType": "uint8",
|
|
155
|
+
"name": "proposalType",
|
|
156
|
+
"type": "uint8"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"name": "ProposalCreated",
|
|
160
|
+
"type": "event"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"anonymous": false,
|
|
164
|
+
"inputs": [
|
|
165
|
+
{
|
|
166
|
+
"indexed": false,
|
|
167
|
+
"internalType": "uint256",
|
|
168
|
+
"name": "id",
|
|
169
|
+
"type": "uint256"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"name": "ProposalExecuted",
|
|
173
|
+
"type": "event"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"anonymous": false,
|
|
177
|
+
"inputs": [
|
|
178
|
+
{
|
|
179
|
+
"indexed": false,
|
|
180
|
+
"internalType": "uint256",
|
|
181
|
+
"name": "oldMaxOperations",
|
|
182
|
+
"type": "uint256"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"indexed": false,
|
|
186
|
+
"internalType": "uint256",
|
|
187
|
+
"name": "newMaxOperations",
|
|
188
|
+
"type": "uint256"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"name": "ProposalMaxOperationsUpdated",
|
|
192
|
+
"type": "event"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"anonymous": false,
|
|
196
|
+
"inputs": [
|
|
197
|
+
{
|
|
198
|
+
"indexed": false,
|
|
199
|
+
"internalType": "uint256",
|
|
200
|
+
"name": "id",
|
|
201
|
+
"type": "uint256"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"indexed": false,
|
|
205
|
+
"internalType": "uint256",
|
|
206
|
+
"name": "eta",
|
|
207
|
+
"type": "uint256"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"name": "ProposalQueued",
|
|
211
|
+
"type": "event"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"anonymous": false,
|
|
215
|
+
"inputs": [
|
|
216
|
+
{
|
|
217
|
+
"indexed": false,
|
|
218
|
+
"internalType": "uint256",
|
|
219
|
+
"name": "oldProposalThreshold",
|
|
220
|
+
"type": "uint256"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"indexed": false,
|
|
224
|
+
"internalType": "uint256",
|
|
225
|
+
"name": "newProposalThreshold",
|
|
226
|
+
"type": "uint256"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"name": "ProposalThresholdSet",
|
|
230
|
+
"type": "event"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"anonymous": false,
|
|
234
|
+
"inputs": [
|
|
235
|
+
{
|
|
236
|
+
"indexed": true,
|
|
237
|
+
"internalType": "address",
|
|
238
|
+
"name": "voter",
|
|
239
|
+
"type": "address"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"indexed": false,
|
|
243
|
+
"internalType": "uint256",
|
|
244
|
+
"name": "proposalId",
|
|
245
|
+
"type": "uint256"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"indexed": false,
|
|
249
|
+
"internalType": "uint8",
|
|
250
|
+
"name": "support",
|
|
251
|
+
"type": "uint8"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"indexed": false,
|
|
255
|
+
"internalType": "uint256",
|
|
256
|
+
"name": "votes",
|
|
257
|
+
"type": "uint256"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"indexed": false,
|
|
261
|
+
"internalType": "string",
|
|
262
|
+
"name": "reason",
|
|
263
|
+
"type": "string"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"name": "VoteCast",
|
|
267
|
+
"type": "event"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"anonymous": false,
|
|
271
|
+
"inputs": [
|
|
272
|
+
{
|
|
273
|
+
"indexed": false,
|
|
274
|
+
"internalType": "uint256",
|
|
275
|
+
"name": "oldVotingDelay",
|
|
276
|
+
"type": "uint256"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"indexed": false,
|
|
280
|
+
"internalType": "uint256",
|
|
281
|
+
"name": "newVotingDelay",
|
|
282
|
+
"type": "uint256"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"name": "VotingDelaySet",
|
|
286
|
+
"type": "event"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"anonymous": false,
|
|
290
|
+
"inputs": [
|
|
291
|
+
{
|
|
292
|
+
"indexed": false,
|
|
293
|
+
"internalType": "uint256",
|
|
294
|
+
"name": "oldVotingPeriod",
|
|
295
|
+
"type": "uint256"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"indexed": false,
|
|
299
|
+
"internalType": "uint256",
|
|
300
|
+
"name": "newVotingPeriod",
|
|
301
|
+
"type": "uint256"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"name": "VotingPeriodSet",
|
|
305
|
+
"type": "event"
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"bytecode": "0x6080604052348015600f57600080fd5b50604c80601d6000396000f3fe6080604052600080fdfea365627a7a723158200f63769915acc84dc0c56af4ee01a78605ccfcbb62ce538b18a3cff9de8874f96c6578706572696d656e74616cf564736f6c63430005100040",
|
|
309
|
+
"deployedBytecode": "0x6080604052600080fdfea365627a7a723158200f63769915acc84dc0c56af4ee01a78605ccfcbb62ce538b18a3cff9de8874f96c6578706572696d656e74616cf564736f6c63430005100040",
|
|
310
|
+
"linkReferences": {},
|
|
311
|
+
"deployedLinkReferences": {}
|
|
312
|
+
}
|
|
@@ -70,7 +70,7 @@ import "./GovernorBravoInterfaces.sol";
|
|
|
70
70
|
* The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert
|
|
71
71
|
* vote delegation by calling the same function with a value of `0`.
|
|
72
72
|
*/
|
|
73
|
-
contract GovernorBravoDelegate is
|
|
73
|
+
contract GovernorBravoDelegate is GovernorBravoDelegateStorageV3, GovernorBravoEvents {
|
|
74
74
|
/// @notice The name of this contract
|
|
75
75
|
string public constant name = "Venus Governor Bravo";
|
|
76
76
|
|
|
@@ -80,18 +80,6 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE
|
|
|
80
80
|
/// @notice The maximum setable proposal threshold
|
|
81
81
|
uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs
|
|
82
82
|
|
|
83
|
-
/// @notice The minimum setable voting period
|
|
84
|
-
uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block
|
|
85
|
-
|
|
86
|
-
/// @notice The max setable voting period
|
|
87
|
-
uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block
|
|
88
|
-
|
|
89
|
-
/// @notice The min setable voting delay
|
|
90
|
-
uint public constant MIN_VOTING_DELAY = 1;
|
|
91
|
-
|
|
92
|
-
/// @notice The max setable voting delay
|
|
93
|
-
uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block
|
|
94
|
-
|
|
95
83
|
/// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
|
|
96
84
|
uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs
|
|
97
85
|
|
|
@@ -110,20 +98,21 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE
|
|
|
110
98
|
*/
|
|
111
99
|
function initialize(
|
|
112
100
|
address xvsVault_,
|
|
101
|
+
ValidationParams memory validationParams_,
|
|
113
102
|
ProposalConfig[] memory proposalConfigs_,
|
|
114
103
|
TimelockInterface[] memory timelocks,
|
|
115
104
|
address guardian_
|
|
116
105
|
) public {
|
|
117
106
|
require(address(proposalTimelocks[0]) == address(0), "GovernorBravo::initialize: cannot initialize twice");
|
|
118
107
|
require(msg.sender == admin, "GovernorBravo::initialize: admin only");
|
|
119
|
-
require(xvsVault_ != address(0), "GovernorBravo::initialize: invalid xvs address");
|
|
108
|
+
require(xvsVault_ != address(0), "GovernorBravo::initialize: invalid xvs vault address");
|
|
120
109
|
require(guardian_ != address(0), "GovernorBravo::initialize: invalid guardian");
|
|
121
110
|
require(
|
|
122
|
-
timelocks.length ==
|
|
111
|
+
timelocks.length == getGovernanceRouteCount(),
|
|
123
112
|
"GovernorBravo::initialize:number of timelocks should match number of governance routes"
|
|
124
113
|
);
|
|
125
114
|
require(
|
|
126
|
-
proposalConfigs_.length ==
|
|
115
|
+
proposalConfigs_.length == getGovernanceRouteCount(),
|
|
127
116
|
"GovernorBravo::initialize:number of proposal configs should match number of governance routes"
|
|
128
117
|
);
|
|
129
118
|
|
|
@@ -131,37 +120,94 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE
|
|
|
131
120
|
proposalMaxOperations = 10;
|
|
132
121
|
guardian = guardian_;
|
|
133
122
|
|
|
134
|
-
//Set parameters for each Governance Route
|
|
123
|
+
// Set parameters for each Governance Route
|
|
124
|
+
setValidationParams(validationParams_);
|
|
125
|
+
setProposalConfigs(proposalConfigs_);
|
|
126
|
+
|
|
127
|
+
uint256 arrLength = timelocks.length;
|
|
128
|
+
for (uint256 i; i < arrLength; ++i) {
|
|
129
|
+
require(address(timelocks[i]) != address(0), "GovernorBravo::initialize:invalid timelock address");
|
|
130
|
+
proposalTimelocks[i] = timelocks[i];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
** @notice Sets the validation parameters for voting delay and voting period
|
|
136
|
+
** @param newValidationParams Struct containing new minimum and maximum voting period and delay
|
|
137
|
+
*/
|
|
138
|
+
function setValidationParams(ValidationParams memory newValidationParams) public {
|
|
139
|
+
require(msg.sender == admin, "GovernorBravo::setValidationParams: admin only");
|
|
140
|
+
require(
|
|
141
|
+
newValidationParams.minVotingPeriod > 0 &&
|
|
142
|
+
newValidationParams.minVotingDelay > 0 &&
|
|
143
|
+
newValidationParams.minVotingDelay < newValidationParams.maxVotingDelay &&
|
|
144
|
+
newValidationParams.minVotingPeriod < newValidationParams.maxVotingPeriod,
|
|
145
|
+
"GovernorBravo::setValidationParams: invalid params"
|
|
146
|
+
);
|
|
147
|
+
emit SetValidationParams(
|
|
148
|
+
validationParams.minVotingPeriod,
|
|
149
|
+
newValidationParams.minVotingPeriod,
|
|
150
|
+
validationParams.maxVotingPeriod,
|
|
151
|
+
newValidationParams.maxVotingPeriod,
|
|
152
|
+
validationParams.minVotingDelay,
|
|
153
|
+
newValidationParams.minVotingDelay,
|
|
154
|
+
validationParams.maxVotingDelay,
|
|
155
|
+
newValidationParams.maxVotingDelay
|
|
156
|
+
);
|
|
157
|
+
validationParams = newValidationParams;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
** @notice Sets the configuration for different proposal types
|
|
162
|
+
** @dev Requires validationParams to be configured before also it will set proposal config for all proposal types
|
|
163
|
+
** @param proposalConfigs_ Array of proposal configuration structs to update
|
|
164
|
+
*/
|
|
165
|
+
function setProposalConfigs(ProposalConfig[] memory proposalConfigs_) public {
|
|
166
|
+
require(msg.sender == admin, "GovernorBravo::setProposalConfigs: admin only");
|
|
167
|
+
require(
|
|
168
|
+
validationParams.minVotingPeriod > 0 &&
|
|
169
|
+
validationParams.maxVotingPeriod > 0 &&
|
|
170
|
+
validationParams.minVotingDelay > 0 &&
|
|
171
|
+
validationParams.maxVotingDelay > 0,
|
|
172
|
+
"GovernorBravo::setProposalConfigs: validation params not configured yet"
|
|
173
|
+
);
|
|
135
174
|
uint256 arrLength = proposalConfigs_.length;
|
|
175
|
+
require(
|
|
176
|
+
arrLength == getGovernanceRouteCount(),
|
|
177
|
+
"GovernorBravo::setProposalConfigs: invalid proposal config length"
|
|
178
|
+
);
|
|
136
179
|
for (uint256 i; i < arrLength; ++i) {
|
|
137
180
|
require(
|
|
138
|
-
proposalConfigs_[i].votingPeriod >=
|
|
139
|
-
"GovernorBravo::
|
|
181
|
+
proposalConfigs_[i].votingPeriod >= validationParams.minVotingPeriod,
|
|
182
|
+
"GovernorBravo::setProposalConfigs: invalid min voting period"
|
|
140
183
|
);
|
|
141
184
|
require(
|
|
142
|
-
proposalConfigs_[i].votingPeriod <=
|
|
143
|
-
"GovernorBravo::
|
|
185
|
+
proposalConfigs_[i].votingPeriod <= validationParams.maxVotingPeriod,
|
|
186
|
+
"GovernorBravo::setProposalConfigs: invalid max voting period"
|
|
144
187
|
);
|
|
145
188
|
require(
|
|
146
|
-
proposalConfigs_[i].votingDelay >=
|
|
147
|
-
"GovernorBravo::
|
|
189
|
+
proposalConfigs_[i].votingDelay >= validationParams.minVotingDelay,
|
|
190
|
+
"GovernorBravo::setProposalConfigs: invalid min voting delay"
|
|
148
191
|
);
|
|
149
192
|
require(
|
|
150
|
-
proposalConfigs_[i].votingDelay <=
|
|
151
|
-
"GovernorBravo::
|
|
193
|
+
proposalConfigs_[i].votingDelay <= validationParams.maxVotingDelay,
|
|
194
|
+
"GovernorBravo::setProposalConfigs: invalid max voting delay"
|
|
152
195
|
);
|
|
153
196
|
require(
|
|
154
197
|
proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,
|
|
155
|
-
"GovernorBravo::
|
|
198
|
+
"GovernorBravo::setProposalConfigs: invalid min proposal threshold"
|
|
156
199
|
);
|
|
157
200
|
require(
|
|
158
201
|
proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,
|
|
159
|
-
"GovernorBravo::
|
|
202
|
+
"GovernorBravo::setProposalConfigs: invalid max proposal threshold"
|
|
160
203
|
);
|
|
161
|
-
require(address(timelocks[i]) != address(0), "GovernorBravo::initialize:invalid timelock address");
|
|
162
204
|
|
|
163
205
|
proposalConfigs[i] = proposalConfigs_[i];
|
|
164
|
-
|
|
206
|
+
emit SetProposalConfigs(
|
|
207
|
+
proposalConfigs_[i].votingPeriod,
|
|
208
|
+
proposalConfigs_[i].votingDelay,
|
|
209
|
+
proposalConfigs_[i].proposalThreshold
|
|
210
|
+
);
|
|
165
211
|
}
|
|
166
212
|
}
|
|
167
213
|
|
|
@@ -500,7 +546,7 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE
|
|
|
500
546
|
require(initialProposalId == 0, "GovernorBravo::_initiate: can only initiate once");
|
|
501
547
|
proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();
|
|
502
548
|
initialProposalId = proposalCount;
|
|
503
|
-
for (uint256 i; i <
|
|
549
|
+
for (uint256 i; i < getGovernanceRouteCount(); ++i) {
|
|
504
550
|
proposalTimelocks[i].acceptAdmin();
|
|
505
551
|
}
|
|
506
552
|
}
|
|
@@ -580,4 +626,8 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE
|
|
|
580
626
|
}
|
|
581
627
|
return chainId;
|
|
582
628
|
}
|
|
629
|
+
|
|
630
|
+
function getGovernanceRouteCount() internal pure returns (uint8) {
|
|
631
|
+
return uint8(ProposalType.CRITICAL) + 1;
|
|
632
|
+
}
|
|
583
633
|
}
|
|
@@ -61,6 +61,21 @@ contract GovernorBravoEvents {
|
|
|
61
61
|
|
|
62
62
|
/// @notice Emitted when the maximum number of operations in one proposal is updated
|
|
63
63
|
event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);
|
|
64
|
+
|
|
65
|
+
/// @notice Emitted when the new validation params are set
|
|
66
|
+
event SetValidationParams(
|
|
67
|
+
uint256 oldMinVotingPeriod,
|
|
68
|
+
uint256 newMinVotingPeriod,
|
|
69
|
+
uint256 oldmaxVotingPeriod,
|
|
70
|
+
uint256 newmaxVotingPeriod,
|
|
71
|
+
uint256 oldminVotingDelay,
|
|
72
|
+
uint256 newminVotingDelay,
|
|
73
|
+
uint256 oldmaxVotingDelay,
|
|
74
|
+
uint256 newmaxVotingDelay
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
/// @notice Emitted when new Proposal configs added
|
|
78
|
+
event SetProposalConfigs(uint256 votingPeriod, uint256 votingDelay, uint256 proposalThreshold);
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
/**
|
|
@@ -179,7 +194,7 @@ contract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {
|
|
|
179
194
|
|
|
180
195
|
/**
|
|
181
196
|
* @title GovernorBravoDelegateStorageV2
|
|
182
|
-
* @dev For future upgrades, do not change
|
|
197
|
+
* @dev For future upgrades, do not change GovernorBravoDelegateStorageV2. Create a new
|
|
183
198
|
* contract which implements GovernorBravoDelegateStorageV2 and following the naming convention
|
|
184
199
|
* GovernorBravoDelegateStorageVX.
|
|
185
200
|
*/
|
|
@@ -206,6 +221,23 @@ contract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {
|
|
|
206
221
|
mapping(uint => TimelockInterface) public proposalTimelocks;
|
|
207
222
|
}
|
|
208
223
|
|
|
224
|
+
/**
|
|
225
|
+
* @title GovernorBravoDelegateStorageV3
|
|
226
|
+
* @dev For future upgrades, do not change GovernorBravoDelegateStorageV3. Create a new
|
|
227
|
+
* contract which implements GovernorBravoDelegateStorageV3 and following the naming convention
|
|
228
|
+
* GovernorBravoDelegateStorageVX.
|
|
229
|
+
*/
|
|
230
|
+
contract GovernorBravoDelegateStorageV3 is GovernorBravoDelegateStorageV2 {
|
|
231
|
+
struct ValidationParams {
|
|
232
|
+
uint256 minVotingPeriod;
|
|
233
|
+
uint256 maxVotingPeriod;
|
|
234
|
+
uint256 minVotingDelay;
|
|
235
|
+
uint256 maxVotingDelay;
|
|
236
|
+
}
|
|
237
|
+
/// @notice Stores the current minimum and maximum values of voting delay and voting period
|
|
238
|
+
ValidationParams public validationParams;
|
|
239
|
+
}
|
|
240
|
+
|
|
209
241
|
/**
|
|
210
242
|
* @title TimelockInterface
|
|
211
243
|
* @author Venus
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
pragma solidity ^0.5.16;
|
|
2
|
+
pragma experimental ABIEncoderV2;
|
|
3
|
+
|
|
4
|
+
import "./GovernorBravoInterfaces.sol";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title GovernorBravoDelegator
|
|
8
|
+
* @author Venus
|
|
9
|
+
* @notice The `GovernorBravoDelegator` contract.
|
|
10
|
+
*/
|
|
11
|
+
contract GovernorBravoDelegatorV1 is GovernorBravoDelegatorStorage, GovernorBravoEventsV1 {
|
|
12
|
+
constructor(
|
|
13
|
+
address timelock_,
|
|
14
|
+
address xvsVault_,
|
|
15
|
+
address admin_,
|
|
16
|
+
address implementation_,
|
|
17
|
+
uint votingPeriod_,
|
|
18
|
+
uint votingDelay_,
|
|
19
|
+
uint proposalThreshold_,
|
|
20
|
+
address guardian_
|
|
21
|
+
) public {
|
|
22
|
+
// Admin set to msg.sender for initialization
|
|
23
|
+
admin = msg.sender;
|
|
24
|
+
|
|
25
|
+
delegateTo(
|
|
26
|
+
implementation_,
|
|
27
|
+
abi.encodeWithSignature(
|
|
28
|
+
"initialize(address,address,uint256,uint256,uint256,address)",
|
|
29
|
+
timelock_,
|
|
30
|
+
xvsVault_,
|
|
31
|
+
votingPeriod_,
|
|
32
|
+
votingDelay_,
|
|
33
|
+
proposalThreshold_,
|
|
34
|
+
guardian_
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
_setImplementation(implementation_);
|
|
39
|
+
|
|
40
|
+
admin = admin_;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @notice Called by the admin to update the implementation of the delegator
|
|
45
|
+
* @param implementation_ The address of the new implementation for delegation
|
|
46
|
+
*/
|
|
47
|
+
function _setImplementation(address implementation_) public {
|
|
48
|
+
require(msg.sender == admin, "GovernorBravoDelegator::_setImplementation: admin only");
|
|
49
|
+
require(
|
|
50
|
+
implementation_ != address(0),
|
|
51
|
+
"GovernorBravoDelegator::_setImplementation: invalid implementation address"
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
address oldImplementation = implementation;
|
|
55
|
+
implementation = implementation_;
|
|
56
|
+
|
|
57
|
+
emit NewImplementation(oldImplementation, implementation);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @notice Internal method to delegate execution to another contract
|
|
62
|
+
* @dev It returns to the external caller whatever the implementation returns or forwards reverts
|
|
63
|
+
* @param callee The contract to delegatecall
|
|
64
|
+
* @param data The raw data to delegatecall
|
|
65
|
+
*/
|
|
66
|
+
function delegateTo(address callee, bytes memory data) internal {
|
|
67
|
+
(bool success, bytes memory returnData) = callee.delegatecall(data);
|
|
68
|
+
assembly {
|
|
69
|
+
if eq(success, 0) {
|
|
70
|
+
revert(add(returnData, 0x20), returndatasize)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @dev Delegates execution to an implementation contract.
|
|
77
|
+
* It returns to the external caller whatever the implementation returns
|
|
78
|
+
* or forwards reverts.
|
|
79
|
+
*/
|
|
80
|
+
function() external payable {
|
|
81
|
+
// delegate all other functions to current implementation
|
|
82
|
+
(bool success, ) = implementation.delegatecall(msg.data);
|
|
83
|
+
|
|
84
|
+
assembly {
|
|
85
|
+
let free_mem_ptr := mload(0x40)
|
|
86
|
+
returndatacopy(free_mem_ptr, 0, returndatasize)
|
|
87
|
+
|
|
88
|
+
switch success
|
|
89
|
+
case 0 {
|
|
90
|
+
revert(free_mem_ptr, returndatasize)
|
|
91
|
+
}
|
|
92
|
+
default {
|
|
93
|
+
return(free_mem_ptr, returndatasize)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|