diff --git a/.github/deployed-bytecode-consts.js b/.github/deployed-bytecode-consts.js
index 4959d22f2..f82ca979e 100644
--- a/.github/deployed-bytecode-consts.js
+++ b/.github/deployed-bytecode-consts.js
@@ -1,7 +1,6 @@
const APPS_TO_NAMES = new Map([
['lido', 'Lido'],
['node-operators-registry', 'NodeOperatorsRegistry'],
- ['oracle', 'LidoOracle']
])
const CONTRACTS_TO_NAMES = new Map([
diff --git a/apps/lidooracle/app/.babelrc b/apps/lidooracle/app/.babelrc
deleted file mode 100644
index 13d2b95a1..000000000
--- a/apps/lidooracle/app/.babelrc
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "presets": [
- [
- "@babel/preset-env",
- {
- "modules": false,
- "targets": {
- "browsers": [
- "> 1%",
- "last 3 versions",
- "ie >= 9",
- "ios >= 8",
- "android >= 4.2"
- ]
- },
- "useBuiltIns": "entry",
- "corejs": 3,
- "shippedProposals": true,
- }
- ]
- ],
- "plugins": [
- [
- "styled-components",
- {
- "displayName": true
- }
- ]
- ]
-}
diff --git a/apps/lidooracle/app/.eslintrc b/apps/lidooracle/app/.eslintrc
deleted file mode 100644
index b6dad13e0..000000000
--- a/apps/lidooracle/app/.eslintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "env": {
- "browser": true,
- "es6": true
- },
- "extends": [
- "standard",
- "standard-react",
- "plugin:prettier/recommended",
- "prettier/react"
- ],
- "parser": "babel-eslint",
- "plugins": ["prettier", "react", "react-hooks"],
- "rules": {
- "valid-jsdoc": "error",
- "react/prop-types": 0,
- "linebreak-style": ["error", "unix"],
- "react-hooks/rules-of-hooks": "error",
- "react-hooks/exhaustive-deps": "warn",
- "no-unused-vars": "warn",
- "react/jsx-handler-names": "off",
- "react/jsx-key": "off"
- }
-}
diff --git a/apps/lidooracle/app/.gitignore b/apps/lidooracle/app/.gitignore
deleted file mode 100644
index 8c784e35c..000000000
--- a/apps/lidooracle/app/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-# See https://help.github.com/ignore-files/ for more about ignoring files.
-
-# cache
-.cache
-
-# dependencies
-/node_modules
-
-# testing
-/coverage
-
-# production
-/build
-/dist
-
-# misc
-.DS_Store
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
-
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# built assets
-/public/aragon-ui
-/public/script.js
-/public/script.map
diff --git a/apps/lidooracle/app/.prettierrc b/apps/lidooracle/app/.prettierrc
deleted file mode 100644
index 5824bbabb..000000000
--- a/apps/lidooracle/app/.prettierrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "singleQuote": true,
- "semi": false,
- "trailingComma": "es5",
- "bracketSpacing": true,
- "jsxBracketSameLine": false
-}
diff --git a/apps/lidooracle/app/index.html b/apps/lidooracle/app/index.html
deleted file mode 100644
index 07f0586fb..000000000
--- a/apps/lidooracle/app/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- Aragon App
-
-
-
-
-
-
-
diff --git a/apps/lidooracle/app/package.json b/apps/lidooracle/app/package.json
deleted file mode 100644
index f2c83046b..000000000
--- a/apps/lidooracle/app/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "lidooracle-frontend",
- "version": "1.0.0",
- "main": "src/index.js",
- "dependencies": {
- "@aragon/api": "^2.0.0",
- "@aragon/api-react": "^2.0.0",
- "@aragon/ui": "^1.7.0",
- "@openzeppelin/contracts": "3.1.0",
- "core-js": "^3.6.5",
- "formik": "^2.2.0",
- "react": "^16.13.1",
- "react-dom": "^16.13.1",
- "regenerator-runtime": "^0.13.7",
- "styled-components": "^5.2.0",
- "web3-utils": "^1.3.0",
- "yup": "^0.29.3"
- },
- "devDependencies": {
- "@babel/core": "^7.11.6",
- "@babel/preset-env": "^7.11.5",
- "@babel/preset-react": "^7.10.1",
- "babel-eslint": "^10.1.0",
- "babel-plugin-styled-components": "^1.11.1",
- "copyfiles": "^2.3.0",
- "eslint": "^7.9.0",
- "eslint-config-prettier": "^6.11.0",
- "eslint-config-standard": "^14.1.1",
- "eslint-config-standard-react": "^9.2.0",
- "eslint-plugin-import": "^2.22.0",
- "eslint-plugin-node": "^11.1.0",
- "eslint-plugin-prettier": "^3.1.4",
- "eslint-plugin-promise": "^4.2.1",
- "eslint-plugin-react": "^7.20.6",
- "eslint-plugin-react-hooks": "^4.1.2",
- "eslint-plugin-standard": "^4.0.1",
- "parcel-bundler": "^1.12.4",
- "prettier": "^2.1.2"
- },
- "scripts": {
- "build": "yarn sync-assets && yarn build:app && yarn build:script",
- "build:app": "parcel build index.html -d ../dist/ --public-url \".\" --no-cache",
- "build:script": "parcel build src/script.js --out-dir ../dist/ --no-cache",
- "watch:script": "parcel watch src/script.js --out-dir ../dist/ --no-hmr",
- "serve": "parcel serve index.html --out-dir ../dist/ --no-cache",
- "watch": "yarn watch:script",
- "sync-assets": "copy-aragon-ui-assets ../dist && copyfiles -u 1 './public/**/*' ../dist",
- "start": "yarn sync-assets && yarn watch:script & yarn serve",
- "dev": "yarn sync-assets && yarn watch:script & yarn serve -- --port 3011",
- "dev-fallback": "bash -c 'yarn sync-assets && yarn watch:script & yarn serve --port 3011'"
- }
-}
diff --git a/apps/lidooracle/app/public/meta/details.md b/apps/lidooracle/app/public/meta/details.md
deleted file mode 100644
index fb71ccc9d..000000000
--- a/apps/lidooracle/app/public/meta/details.md
+++ /dev/null
@@ -1,6 +0,0 @@
-An application for Aragon.
-
-**Features**
-- Feature \#1.
-- Feature \#2.
-- Feature \#3.
diff --git a/apps/lidooracle/app/public/meta/icon.svg b/apps/lidooracle/app/public/meta/icon.svg
deleted file mode 100644
index 546d85afe..000000000
--- a/apps/lidooracle/app/public/meta/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/lidooracle/app/public/meta/screenshot-1.png b/apps/lidooracle/app/public/meta/screenshot-1.png
deleted file mode 100644
index b7f817650..000000000
Binary files a/apps/lidooracle/app/public/meta/screenshot-1.png and /dev/null differ
diff --git a/apps/lidooracle/app/src/App.js b/apps/lidooracle/app/src/App.js
deleted file mode 100644
index 335ff31f9..000000000
--- a/apps/lidooracle/app/src/App.js
+++ /dev/null
@@ -1,454 +0,0 @@
-import React, { useCallback, useState } from 'react'
-import { useAragonApi } from '@aragon/api-react'
-import {
- Button,
- ContextMenu,
- DataView,
- GU,
- Header,
- IconTrash,
- IdentityBadge,
- Main,
- Split,
- SyncIndicator,
- textStyle,
- useTheme,
-} from '@aragon/ui'
-import AddMemberSidePanel from './components/AddMemberSidePanel'
-import MenuItem from './components/MenuItem'
-import InfoBox from './components/InfoBox'
-import ChangeQuorumSidePanel from './components/ChangeQuorumSidePanel'
-import ChangeBeaconReportReceiverSidePanel from './components/ChangeBeaconReportReceiverSidePanel'
-import IconEdit from '@aragon/ui/dist/IconEdit'
-import ChangeIncreaseSidePanel from './components/ChangeIncreaseSidePanel'
-import ChangeDecreaseSidePanel from './components/ChangeDecreaseSidePanel'
-import { constants, ethers } from 'ethers'
-
-export default function App() {
- const { api, appState, currentApp, guiStyle } = useAragonApi()
- const theme = useTheme()
- const {
- isSyncing,
- oracleMembers,
- quorum,
- currentFrame,
- expectedEpochId,
- currentOraclesReportStatus,
- allowedBeaconBalanceAnnualRelativeIncrease,
- allowedBeaconBalanceRelativeDecrease,
- beaconReportReceiver,
- currentReportVariants,
- lastCompletedReportDelta,
- version,
- } = appState
- const { appearance } = guiStyle
- const appName = (currentApp && currentApp.name) || 'app'
-
- // MEMBERS
-
- const [addMemberSidePanelOpen, setAddMemberSidePanelOpen] = useState(false)
-
- const openAddMemberSidePanel = useCallback(
- () => setAddMemberSidePanelOpen(true),
- []
- )
-
- const closeAddMemberSidePanel = useCallback(
- () => setAddMemberSidePanelOpen(false),
- []
- )
-
- const addOracleMember = useCallback(
- (address) => {
- return api.addOracleMember(address).toPromise()
- },
- [api]
- )
-
- const removeOracleMember = useCallback(
- (address) => {
- return api.removeOracleMember(address).toPromise()
- },
- [api]
- )
-
- // INCREASE
- const [increaseSidePanelOpen, setIncreaseSidePanelOpen] = useState(false)
-
- const openIncreaseSidePanel = useCallback(
- () => setIncreaseSidePanelOpen(true),
- []
- )
-
- const closeIncreaseSidePanel = useCallback(
- () => setIncreaseSidePanelOpen(false),
- []
- )
-
- const changeIncrease = useCallback(
- (value) => {
- return api
- .setAllowedBeaconBalanceAnnualRelativeIncrease(value)
- .toPromise()
- },
- [api]
- )
-
- // DECREASE
- const [decreaseSidePanelOpen, setDecreaseSidePanelOpen] = useState(false)
-
- const openDecreaseSidePanel = useCallback(
- () => setDecreaseSidePanelOpen(true),
- []
- )
-
- const closeDecreaseSidePanel = useCallback(
- () => setDecreaseSidePanelOpen(false),
- []
- )
-
- const changeDecrease = useCallback(
- (value) => {
- return api.setAllowedBeaconBalanceRelativeDecrease(value).toPromise()
- },
- [api]
- )
-
- // QUORUM
- const [changeQuorumSidePanelOpen, setChangeQuorumSidePanelOpen] = useState(
- false
- )
-
- const openChangeQuorumSidePanel = useCallback(
- () => setChangeQuorumSidePanelOpen(true),
- []
- )
-
- const closeChangeQuorumSidePanel = useCallback(
- () => setChangeQuorumSidePanelOpen(false),
- []
- )
-
- const setQuorum = useCallback(
- (quorum) => {
- return api.setQuorum(quorum).toPromise()
- },
- [api]
- )
-
- // BEACON REPORT RECEIVER
- const [
- reportReceiverSidePanelOpen,
- setReportReceiverSidePanelOpen,
- ] = useState(false)
-
- const openReportReceiverSidePanel = useCallback(
- () => setReportReceiverSidePanelOpen(true),
- []
- )
- const closeReportReceiverSidePanel = useCallback(
- () => setReportReceiverSidePanelOpen(false),
- []
- )
-
- const setBeaconReceiver = useCallback(
- (address) => {
- return api.setBeaconReportReceiver(address).toPromise()
- },
- [api]
- )
-
- // RENDER ELEMENTS
-
- const currentFrameEl = renderCurrentFrame(currentFrame)
- const lastCompletedReportDeltaEl = renderLastCompletedReportDelta(
- lastCompletedReportDelta
- )
-
- const renderSettings = useCallback(
- (value, i) => {
- switch (i) {
- case 0:
- return [
- 'Max Allowed APR',
-
- {value ? `${value / 100}%` : 'Unavailable'}
- }
- label="Change increase"
- display="icon"
- onClick={openIncreaseSidePanel}
- style={{ marginLeft: 10 }}
- />
-
,
- ]
- case 1:
- return [
- 'Drop Limit Between Frames',
-
- {value ? `${value / 100}%` : 'Unavailable'}
- }
- label="Change decrease"
- display="icon"
- onClick={openDecreaseSidePanel}
- style={{ marginLeft: 10 }}
- />
-
,
- ]
- case 2:
- return [
- 'Beacon Report Receiver',
-
-
- }
- label="Change receiver"
- display="icon"
- onClick={openReportReceiverSidePanel}
- style={{ marginLeft: 10 }}
- />
-
,
- ]
- default:
- return null
- }
- },
- [openDecreaseSidePanel, openIncreaseSidePanel, openReportReceiverSidePanel]
- )
-
- return (
-
- {isSyncing && }
-
- }
- />
-
- [
- ,
-
- {(2 ** i) & currentOraclesReportStatus ? 'Submitted' : ''}
- ,
- ]}
- renderEntryActions={(memberAddress) => (
-
-
- )}
- />
-
- Current Report Variants
-
- [
- {i},
- {beaconBalance} gwei,
- {beaconValidators},
- {count},
- ]}
- />
-
- Settings
-
-
- >
- }
- secondary={
- <>
-
-
- {currentFrameEl && (
- api.emitTrigger('UI:UpdateFrame')}
- />
- )}
- {lastCompletedReportDeltaEl && (
-
- )}
- {version && (
-
- Lido Oracle v{+version + 1}
-
- )}
- >
- }
- />
-
-
-
-
-
-
- )
-}
-
-function renderCurrentFrame(frame) {
- if (!frame) {
- return null
- }
- return (
- <>
-
-
-
- >
- )
-}
-
-function renderLastCompletedReportDelta(lastCompletedReportDelta) {
- if (!lastCompletedReportDelta) return null
-
- return (
- <>
-
-
-
- >
- )
-}
-
-function LabelValue({ label, value }) {
- return (
-
-
- {label}
-
-
- {value}
-
-
- )
-}
-
-function formatUnixTime(unixTime) {
- return new Date(1000 * unixTime).toISOString().replace(/[.]\d+Z$/, 'Z')
-}
diff --git a/apps/lidooracle/app/src/components/AddMemberSidePanel.js b/apps/lidooracle/app/src/components/AddMemberSidePanel.js
deleted file mode 100644
index cb21e90b1..000000000
--- a/apps/lidooracle/app/src/components/AddMemberSidePanel.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Button, GU, SidePanel } from '@aragon/ui'
-import React, { useCallback } from 'react'
-import { Formik, Field } from 'formik'
-import * as yup from 'yup'
-import TextField from './TextField'
-import Info from '@aragon/ui/dist/Info'
-
-const initialValues = {
- address: '',
-}
-
-const validationSchema = yup.object().shape({
- address: yup.string().required().min(1),
-})
-
-function PanelContent({ api, onClose }) {
- const onSubmit = useCallback(
- ({ address }) => {
- api(address).then(() => {
- onClose()
- })
- },
- [api, onClose]
- )
-
- return (
-
- {({ submitForm, isSubmitting }) => {
- return (
-
- )
- }}
-
- )
-}
-
-export default (props) => (
-
-
-
-)
diff --git a/apps/lidooracle/app/src/components/ChangeBeaconReportReceiverSidePanel.js b/apps/lidooracle/app/src/components/ChangeBeaconReportReceiverSidePanel.js
deleted file mode 100644
index d908160a5..000000000
--- a/apps/lidooracle/app/src/components/ChangeBeaconReportReceiverSidePanel.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Button, GU, SidePanel } from '@aragon/ui'
-import React, { useCallback } from 'react'
-import { Formik, Field } from 'formik'
-import * as yup from 'yup'
-import TextField from './TextField'
-import Info from '@aragon/ui/dist/Info'
-
-const initialValues = {
- address: '',
-}
-
-const validationSchema = yup.object().shape({
- address: yup.string().required().min(1),
-})
-
-function PanelContent({ api, onClose }) {
- const onSubmit = useCallback(
- ({ address }) => {
- api(address).finally(() => {
- onClose()
- })
- },
- [api, onClose]
- )
-
- return (
-
- {({ submitForm, isSubmitting }) => {
- return (
-
- )
- }}
-
- )
-}
-
-export default (props) => (
-
-
-
-)
diff --git a/apps/lidooracle/app/src/components/ChangeDecreaseSidePanel.js b/apps/lidooracle/app/src/components/ChangeDecreaseSidePanel.js
deleted file mode 100644
index 6974d5554..000000000
--- a/apps/lidooracle/app/src/components/ChangeDecreaseSidePanel.js
+++ /dev/null
@@ -1,102 +0,0 @@
-import { Button, GU, SidePanel } from '@aragon/ui'
-import React, { useCallback } from 'react'
-import { Formik, Field } from 'formik'
-import * as yup from 'yup'
-import TextField from './TextField'
-import Info from '@aragon/ui/dist/Info'
-
-const initialValues = {
- value: '',
-}
-
-const validationSchema = yup.object().shape({
- value: yup
- .number()
- .positive()
- .required()
- .min(0)
- .max(100)
- .test('Value', `Value can have up to 2 decimal places.`, (value) => {
- const regex = /^\d{1,3}(\.\d{1,2})?$/
- return regex.test(value)
- }),
-})
-
-function PanelContent({ api, onClose }) {
- const onSubmit = useCallback(
- ({ value }) => {
- api(value * 100).finally(() => {
- onClose()
- })
- },
- [api, onClose]
- )
-
- return (
-
- {({ submitForm, isSubmitting }) => {
- return (
-
- )
- }}
-
- )
-}
-
-export default (props) => (
-
-
-
-)
diff --git a/apps/lidooracle/app/src/components/ChangeIncreaseSidePanel.js b/apps/lidooracle/app/src/components/ChangeIncreaseSidePanel.js
deleted file mode 100644
index 626dfabec..000000000
--- a/apps/lidooracle/app/src/components/ChangeIncreaseSidePanel.js
+++ /dev/null
@@ -1,102 +0,0 @@
-import { Button, GU, SidePanel } from '@aragon/ui'
-import React, { useCallback } from 'react'
-import { Formik, Field } from 'formik'
-import * as yup from 'yup'
-import TextField from './TextField'
-import Info from '@aragon/ui/dist/Info'
-
-const initialValues = {
- value: '',
-}
-
-const validationSchema = yup.object().shape({
- value: yup
- .number()
- .positive()
- .required()
- .min(0)
- .max(100)
- .test('Value', `Value can have up to 2 decimal places.`, (value) => {
- const regex = /^\d{1,3}(\.\d{1,2})?$/
- return regex.test(value)
- }),
-})
-
-function PanelContent({ api, onClose }) {
- const onSubmit = useCallback(
- ({ value }) => {
- api(value * 100).finally(() => {
- onClose()
- })
- },
- [api, onClose]
- )
-
- return (
-
- {({ submitForm, isSubmitting }) => {
- return (
-
- )
- }}
-
- )
-}
-
-export default (props) => (
-
-
-
-)
diff --git a/apps/lidooracle/app/src/components/ChangeQuorumSidePanel.js b/apps/lidooracle/app/src/components/ChangeQuorumSidePanel.js
deleted file mode 100644
index 8c149d8d9..000000000
--- a/apps/lidooracle/app/src/components/ChangeQuorumSidePanel.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import { Button, GU, SidePanel } from '@aragon/ui'
-import React, { useCallback } from 'react'
-import { Formik, Field } from 'formik'
-import * as yup from 'yup'
-import TextField from './TextField'
-import Info from '@aragon/ui/dist/Info'
-
-const initialValues = {
- quorum: '',
-}
-
-const validationSchema = yup.object().shape({
- quorum: yup.number().integer().required().min(0),
-})
-
-function PanelContent({ api, onClose }) {
- const onSubmit = useCallback(
- ({ quorum }) => {
- api(quorum).finally(() => {
- onClose()
- })
- },
- [api, onClose]
- )
-
- return (
-
- {({ submitForm, isSubmitting }) => {
- return (
-
- )
- }}
-
- )
-}
-
-export default (props) => (
-
-
-
-)
diff --git a/apps/lidooracle/app/src/components/InfoBox.js b/apps/lidooracle/app/src/components/InfoBox.js
deleted file mode 100644
index 453080669..000000000
--- a/apps/lidooracle/app/src/components/InfoBox.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Box, Button } from '@aragon/ui'
-import React from 'react'
-
-export default function InfoBox({
- heading,
- value,
- onClick,
- label,
- largeText = true,
-}) {
- return (
-
-
- {value}
-
- {onClick && }
-
- )
-}
diff --git a/apps/lidooracle/app/src/components/MenuItem.js b/apps/lidooracle/app/src/components/MenuItem.js
deleted file mode 100644
index f91d83e1f..000000000
--- a/apps/lidooracle/app/src/components/MenuItem.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import { ContextMenuItem, GU, useTheme } from '@aragon/ui'
-import React from 'react'
-
-export default function MenuItem({ onClick, label, icon, iconColor }) {
- const theme = useTheme()
-
- return (
-
-
- {icon}
-
-
- {label}
-
-
- )
-}
diff --git a/apps/lidooracle/app/src/components/TextField.js b/apps/lidooracle/app/src/components/TextField.js
deleted file mode 100644
index 7211d3697..000000000
--- a/apps/lidooracle/app/src/components/TextField.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Field, Info, TextInput } from '@aragon/ui'
-import React from 'react'
-
-const TextField = React.forwardRef(({ label, field, form, ...props }, ref) => {
- return (
-
-
- {form.errors[field.name] && (
-
- {form.errors[field.name]}
-
- )}
-
- )
-})
-
-export default TextField
diff --git a/apps/lidooracle/app/src/index.js b/apps/lidooracle/app/src/index.js
deleted file mode 100644
index 7b7d5e606..000000000
--- a/apps/lidooracle/app/src/index.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'core-js/stable'
-import 'regenerator-runtime/runtime'
-
-import React from 'react'
-import ReactDOM from 'react-dom'
-import { AragonApi } from '@aragon/api-react'
-import App from './App'
-
-const reducer = (state) => {
- if (state === null) {
- return {
- oracleMembers: [],
- quorum: null,
- currentFrame: null,
- expectedEpochId: null,
- currentOraclesReportStatus: null,
- allowedBeaconBalanceAnnualRelativeIncrease: null,
- allowedBeaconBalanceRelativeDecrease: null,
- beaconReportReceiver: null,
- currentReportVariants: [],
- lastCompletedReportDelta: null,
- version: null,
- isSyncing: true,
- }
- }
- return state
-}
-
-ReactDOM.render(
-
-
- ,
- document.getElementById('root')
-)
diff --git a/apps/lidooracle/app/src/script.js b/apps/lidooracle/app/src/script.js
deleted file mode 100644
index a6a9e3aaa..000000000
--- a/apps/lidooracle/app/src/script.js
+++ /dev/null
@@ -1,181 +0,0 @@
-import 'core-js/stable'
-import 'regenerator-runtime/runtime'
-import Aragon, { events } from '@aragon/api'
-
-const app = new Aragon()
-
-app.store(
- async (state, { event }) => {
- const nextState = {
- ...state,
- }
-
- try {
- switch (event) {
- case 'MemberAdded':
- return { ...nextState, oracleMembers: await getOracleMembers() }
- case 'MemberRemoved':
- return { ...nextState, oracleMembers: await getOracleMembers() }
- case 'QuorumChanged':
- return { ...nextState, quorum: await getQuorum() }
- case 'ExpectedEpochIdUpdated':
- return { ...nextState, expectedEpochId: await getExpectedEpochId() }
- case 'AllowedBeaconBalanceAnnualRelativeIncreaseSet':
- return {
- ...nextState,
- allowedBeaconBalanceAnnualRelativeIncrease: await getAllowedBeaconBalanceAnnualRelativeIncrease(),
- }
- case 'AllowedBeaconBalanceRelativeDecreaseSet':
- return {
- ...nextState,
- allowedBeaconBalanceRelativeDecrease: await getAllowedBeaconBalanceRelativeDecrease(),
- }
- case 'UI:UpdateFrame':
- return { ...nextState, currentFrame: await getCurrentFrame() }
- case 'BeaconReportReceiverSet':
- return {
- ...nextState,
- beaconReportReceiver: await getBeaconReportReceiver(),
- }
- case 'BeaconReported':
- return {
- ...nextState,
- currentReportVariants: await getCurrentReportVariants(),
- currentOraclesReportStatus: await getCurrentOraclesReportStatus(),
- }
- case 'ContractVersionSet':
- return {
- ...nextState,
- version: await getVersion(),
- }
- case events.SYNC_STATUS_SYNCING:
- return { ...nextState, isSyncing: true }
- case events.SYNC_STATUS_SYNCED:
- return { ...nextState, isSyncing: false }
- default:
- return state
- }
- } catch (err) {
- console.log(err)
- }
- },
- {
- init: initializeState(),
- }
-)
-
-/***********************
- * *
- * Event Handlers *
- * *
- ***********************/
-
-function initializeState() {
- return async (cachedState) => {
- const [
- oracleMembers,
- quorum,
- currentFrame,
- expectedEpochId,
- currentOraclesReportStatus,
- allowedBeaconBalanceAnnualRelativeIncrease,
- allowedBeaconBalanceRelativeDecrease,
- beaconReportReceiver,
- currentReportVariants,
- lastCompletedReportDelta,
- version,
- ] = await Promise.all([
- getOracleMembers(),
- getQuorum(),
- getCurrentFrame(),
- getExpectedEpochId(),
- getCurrentOraclesReportStatus(),
- getAllowedBeaconBalanceAnnualRelativeIncrease(),
- getAllowedBeaconBalanceRelativeDecrease(),
- getBeaconReportReceiver(),
- getCurrentReportVariants(),
- getLastCompletedReportDelta(),
- getVersion(),
- ])
-
- return {
- ...cachedState,
- oracleMembers,
- quorum,
- currentFrame,
- expectedEpochId,
- currentOraclesReportStatus,
- allowedBeaconBalanceAnnualRelativeIncrease,
- allowedBeaconBalanceRelativeDecrease,
- beaconReportReceiver,
- currentReportVariants,
- lastCompletedReportDelta,
- version,
- }
- }
-}
-
-function getOracleMembers() {
- return app.call('getOracleMembers').toPromise()
-}
-
-function getQuorum() {
- return app.call('getQuorum').toPromise()
-}
-
-async function getCurrentFrame() {
- const frame = await app.call('getCurrentFrame').toPromise()
- return {
- frameEpochId: String(frame.frameEpochId),
- frameStartTime: +frame.frameStartTime,
- frameEndTime: +frame.frameEndTime,
- }
-}
-
-function getExpectedEpochId() {
- return app.call('getExpectedEpochId').toPromise()
-}
-
-function getCurrentOraclesReportStatus() {
- return app.call('getCurrentOraclesReportStatus').toPromise()
-}
-
-function getCurrentReportVariantsSize() {
- return app.call('getCurrentReportVariantsSize').toPromise()
-}
-
-async function getCurrentReportVariant(index) {
- return app.call('getCurrentReportVariant', index).toPromise()
-}
-
-async function getCurrentReportVariants() {
- const size = await getCurrentReportVariantsSize()
-
- const variants = []
- for (let i = 0; i < size; i++) {
- const variant = await getCurrentReportVariant(i)
- variants.push(variant)
- }
-
- return variants
-}
-
-function getLastCompletedReportDelta() {
- return app.call('getLastCompletedReportDelta').toPromise()
-}
-
-function getAllowedBeaconBalanceAnnualRelativeIncrease() {
- return app.call('getAllowedBeaconBalanceAnnualRelativeIncrease').toPromise()
-}
-
-function getAllowedBeaconBalanceRelativeDecrease() {
- return app.call('getAllowedBeaconBalanceRelativeDecrease').toPromise()
-}
-
-function getBeaconReportReceiver() {
- return app.call('getBeaconReportReceiver').toPromise()
-}
-
-async function getVersion() {
- return app.call('getVersion').toPromise()
-}
diff --git a/apps/lidooracle/arapp.json b/apps/lidooracle/arapp.json
deleted file mode 100644
index de6638c61..000000000
--- a/apps/lidooracle/arapp.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "roles": [
- {
- "name": "Add or remove oracle committee members",
- "id": "MANAGE_MEMBERS",
- "params": []
- },
- {
- "name": "Set the number of oracle members required to form a data point",
- "id": "MANAGE_QUORUM",
- "params": []
- },
- {
- "name": "Set the Beacon chain spec",
- "id": "SET_BEACON_SPEC",
- "params": []
- },
- {
- "name": "Set the sanity check bounds",
- "id": "SET_REPORT_BOUNDARIES",
- "params": []
- },
- {
- "name": "Set the beacon receiver contract address",
- "id": "SET_BEACON_REPORT_RECEIVER",
- "params": []
- }
- ],
- "environments": {
- "default": {
- "appName": "oracle.lidopm.eth",
- "network": "development"
- },
- "rinkeby": {
- "appName": "oracle.lidopm.eth",
- "network": "rinkeby"
- },
- "mainnet-test": {
- "appName": "oracle.lidopm.eth",
- "network": "mainnet"
- },
- "mainnet": {
- "appName": "oracle.lidopm.eth",
- "network": "mainnet"
- },
- "localhost": {
- "appName": "oracle.lidopm.eth",
- "network": "development",
- "registry": "0xa16E02E87b7454126E5E10d957A927A7F5B5d2be"
- }
- },
- "appName": "oracle.lidopm.eth",
- "path": "../../contracts/0.4.24/oracle/LidoOracle.sol"
-}
diff --git a/apps/lidooracle/hardhat.config.js b/apps/lidooracle/hardhat.config.js
deleted file mode 100644
index e2e150c56..000000000
--- a/apps/lidooracle/hardhat.config.js
+++ /dev/null
@@ -1,23 +0,0 @@
-require('@aragon/buidler-aragon')
-
-const baseConfig = require('../../hardhat.config.js')
-const hooks = require('./scripts/buidler-hooks')
-
-module.exports = {
- ...baseConfig,
- paths: {
- ...baseConfig.paths,
- root: '../..'
- },
- defaultNetwork: process.env.NETWORK_NAME || 'localhost',
- // Aragon plugin configuration
- aragon: {
- ...baseConfig.aragon,
- appServePort: 3011,
- clientServePort: 3000,
- appSrcPath: 'apps/lidooracle/app/',
- appBuildOutputPath: 'apps/lidooracle/dist/',
- appName: 'lidooracle',
- hooks // Path to script hooks
- }
-}
diff --git a/apps/lidooracle/manifest.json b/apps/lidooracle/manifest.json
deleted file mode 100644
index 4f976935f..000000000
--- a/apps/lidooracle/manifest.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "Oracle",
- "author": "Lido",
- "description": "An application for Aragon",
- "details_url": "/meta/details.md",
- "source_url": "https://",
- "icons": [
- {
- "src": "/meta/icon.svg",
- "sizes": "56x56"
- }
- ],
- "screenshots": [{ "src": "/meta/screenshot-1.png" }],
- "start_url": "/index.html",
- "script": "/script.js"
-}
diff --git a/apps/lidooracle/scripts/buidler-hooks.js b/apps/lidooracle/scripts/buidler-hooks.js
deleted file mode 100644
index 20d8b2e1a..000000000
--- a/apps/lidooracle/scripts/buidler-hooks.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * These hooks are called by the Aragon Buidler plugin during the start task's lifecycle. Use them to perform custom tasks at certain entry points of the development build process, like deploying a token before a proxy is initialized, etc.
- *
- * Link them to the main buidler config file (buidler.config.js) in the `aragon.hooks` property.
- *
- * All hooks receive two parameters:
- * 1) A params object that may contain other objects that pertain to the particular hook.
- * 2) A "bre" or BuidlerRuntimeEnvironment object that contains enviroment objects like web3, Truffle artifacts, etc.
- *
- * Please see AragonConfigHooks, in the plugin's types for further details on these interfaces.
- * https://github.com/aragon/buidler-aragon/blob/develop/src/types.ts#L31
- */
-
-module.exports = {
- // Called before a dao is deployed.
- preDao: async ({ log }, { web3, artifacts }) => {},
-
- // Called after a dao is deployed.
- postDao: async ({ dao, _experimentalAppInstaller, log }, { web3, artifacts }) => {},
-
- // Called after the app's proxy is created, but before it's initialized.
- preInit: async ({ proxy, _experimentalAppInstaller, log }, { web3, artifacts }) => {},
-
- // Called after the app's proxy is initialized.
- postInit: async ({ proxy, _experimentalAppInstaller, log }, { web3, artifacts }) => {},
-
- // Called when the start task needs to know the app proxy's init parameters.
- // Must return an array with the proxy's init parameters.
- getInitParams: async ({ log }, { web3, artifacts }) => {
- return []
- },
-
- // Called after the app's proxy is updated with a new implementation.
- postUpdate: async ({ proxy, log }, { web3, artifacts }) => {}
-}
diff --git a/contracts/0.4.24/template/LidoTemplate.sol b/contracts/0.4.24/template/LidoTemplate.sol
index 752f6945f..7d64ff4da 100644
--- a/contracts/0.4.24/template/LidoTemplate.sol
+++ b/contracts/0.4.24/template/LidoTemplate.sol
@@ -26,7 +26,6 @@ import "@aragon/apps-lido/apps/token-manager/contracts/TokenManager.sol";
import "@aragon/id/contracts/IFIFSResolvingRegistrar.sol";
import "../Lido.sol";
-import "../oracle/LidoOracle.sol";
import "../nos/NodeOperatorsRegistry.sol";
import "../interfaces/IDepositContract.sol";
@@ -74,7 +73,6 @@ contract LidoTemplate is IsContract {
// Lido app names
string private constant LIDO_APP_NAME = "lido";
string private constant NODE_OPERATORS_REGISTRY_APP_NAME = "node-operators-registry";
- string private constant ORACLE_APP_NAME = "oracle";
// DAO config constants
bool private constant TOKEN_TRANSFERABLE = true;
@@ -84,7 +82,6 @@ contract LidoTemplate is IsContract {
struct APMRepos {
Repo lido;
- Repo oracle;
Repo nodeOperatorsRegistry;
Repo aragonAgent;
Repo aragonFinance;
@@ -102,8 +99,8 @@ contract LidoTemplate is IsContract {
Finance finance;
TokenManager tokenManager;
Voting voting;
+ address oracle;
Lido lido;
- LidoOracle oracle;
NodeOperatorsRegistry operators;
}
@@ -213,9 +210,7 @@ contract LidoTemplate is IsContract {
address _lidoImplAddress,
bytes _lidoContentURI,
address _nodeOperatorsRegistryImplAddress,
- bytes _nodeOperatorsRegistryContentURI,
- address _oracleImplAddress,
- bytes _oracleContentURI
+ bytes _nodeOperatorsRegistryContentURI
) external onlyOwner {
require(deployState.lidoRegistry != address(0), ERROR_REGISTRY_NOT_DEPLOYED);
@@ -239,14 +234,6 @@ contract LidoTemplate is IsContract {
_nodeOperatorsRegistryContentURI
);
- apmRepos.oracle = lidoRegistry.newRepoWithVersion(
- ORACLE_APP_NAME,
- this,
- _initialSemanticVersion,
- _oracleImplAddress,
- _oracleContentURI
- );
-
// create Aragon app repos pointing to latest upstream versions
AppVersion memory latest = _apmResolveLatest(ARAGON_AGENT_APP_ID);
@@ -292,16 +279,17 @@ contract LidoTemplate is IsContract {
string _tokenName,
string _tokenSymbol,
uint64[4] _votingSettings,
- IDepositContract /*_beaconDepositContract*/,
- uint32[4],
- address _eip712StETH
+ address _eip712StETH,
+ address _oracle
) external onlyOwner {
- // TODO: remove unused argument
DeployState memory state = deployState;
+ require(_oracle != address(0), "ZERO_ORACLE_ADDRESS");
require(state.lidoRegistry != address(0), ERROR_REGISTRY_NOT_DEPLOYED);
require(state.dao == address(0), ERROR_DAO_ALREADY_DEPLOYED);
+ state.oracle = _oracle;
+
state.token = _createToken(_tokenName, _tokenSymbol, TOKEN_DECIMALS);
(state.dao, state.acl) = _createDAO();
@@ -341,33 +329,9 @@ contract LidoTemplate is IsContract {
)
);
- state.oracle = LidoOracle(
- _installNonDefaultApp(state.dao, _getAppId(ORACLE_APP_NAME, state.lidoRegistryEnsNode), noInit)
- );
-
- // TODO: do new Lido Oracle initialization. Maybe initialized old deprecated APR version of LidoOracle
- // state.oracle.initialize(
- // state.lido,
- // _beaconSpec[0], // epochsPerFrame
- // _beaconSpec[1], // slotsPerEpoch
- // _beaconSpec[2], // secondsPerSlot
- // _beaconSpec[3], // genesisTime
- // 100000,
- // 50000
- // );
state.operators.initialize(state.lido, bytes32(0x1));
- state.lido.initialize(
- state.oracle,
- state.agent, // treasury
- address(0), // staking router
- address(0), // deposit security module
- address(0), // execution layer rewards vault
- address(0), // withdrawal queue
- _eip712StETH // EIP712 helper for StETH
- );
-
// used for issuing vested tokens in the next step
_createTokenManagerPermissionsForTemplate(state.acl, state.tokenManager);
@@ -408,33 +372,17 @@ contract LidoTemplate is IsContract {
function finalizeDAO(
string _daoName,
- uint16 /*_totalFeeBP*/,
- uint16 /*_treasuryFeeBP*/,
- uint16 /*_operatorsFeeBP*/,
uint256 _unvestedTokensAmount,
- address _elRewardsVault,
uint16 _elRewardsWithdrawalLimit
)
external onlyOwner
{
- // TODO: remove unused arguments
DeployState memory state = deployState;
APMRepos memory repos = apmRepos;
require(state.dao != address(0), ERROR_DAO_NOT_DEPLOYED);
require(bytes(_daoName).length > 0, ERROR_INVALID_ID);
- // Set Execution Layer rewards parameters on Lido contract
- bytes32 MANAGE_PROTOCOL_CONTRACTS_ROLE = state.lido.MANAGE_PROTOCOL_CONTRACTS_ROLE();
- _createPermissionForTemplate(state.acl, state.lido, MANAGE_PROTOCOL_CONTRACTS_ROLE);
- state.lido.setProtocolContracts(
- state.lido.getOracle(),
- state.lido.getTreasury(),
- _elRewardsVault,
- address(0)
- );
- _removePermissionFromTemplate(state.acl, state.lido, MANAGE_PROTOCOL_CONTRACTS_ROLE);
-
bytes32 LIDO_SET_EL_REWARDS_WITHDRAWAL_LIMIT = state.lido.SET_EL_REWARDS_WITHDRAWAL_LIMIT_ROLE();
_createPermissionForTemplate(state.acl, state.lido, LIDO_SET_EL_REWARDS_WITHDRAWAL_LIMIT);
state.lido.setELRewardsWithdrawalLimit(_elRewardsWithdrawalLimit);
@@ -624,17 +572,16 @@ contract LidoTemplate is IsContract {
// APM repos
// using loops to save contract size
- Repo[10] memory repoAddresses;
+ Repo[9] memory repoAddresses;
repoAddresses[0] = _repos.lido;
- repoAddresses[1] = _repos.oracle;
- repoAddresses[2] = _repos.nodeOperatorsRegistry;
- repoAddresses[3] = _repos.aragonAgent;
- repoAddresses[4] = _repos.aragonFinance;
- repoAddresses[5] = _repos.aragonTokenManager;
- repoAddresses[6] = _repos.aragonVoting;
- repoAddresses[7] = _resolveRepo(_getAppId(APM_APP_NAME, _state.lidoRegistryEnsNode));
- repoAddresses[8] = _resolveRepo(_getAppId(APM_REPO_APP_NAME, _state.lidoRegistryEnsNode));
- repoAddresses[9] = _resolveRepo(_getAppId(APM_ENSSUB_APP_NAME, _state.lidoRegistryEnsNode));
+ repoAddresses[1] = _repos.nodeOperatorsRegistry;
+ repoAddresses[2] = _repos.aragonAgent;
+ repoAddresses[3] = _repos.aragonFinance;
+ repoAddresses[4] = _repos.aragonTokenManager;
+ repoAddresses[5] = _repos.aragonVoting;
+ repoAddresses[6] = _resolveRepo(_getAppId(APM_APP_NAME, _state.lidoRegistryEnsNode));
+ repoAddresses[7] = _resolveRepo(_getAppId(APM_REPO_APP_NAME, _state.lidoRegistryEnsNode));
+ repoAddresses[8] = _resolveRepo(_getAppId(APM_ENSSUB_APP_NAME, _state.lidoRegistryEnsNode));
for (uint256 i = 0; i < repoAddresses.length; ++i) {
_transferPermissionFromTemplate(apmACL, repoAddresses[i], voting, REPO_CREATE_VERSION_ROLE);
}
@@ -642,17 +589,6 @@ contract LidoTemplate is IsContract {
// using loops to save contract size
bytes32[7] memory perms;
- // Oracle
- // TODO
- // perms[0] = _state.oracle.MANAGE_MEMBERS();
- // perms[1] = _state.oracle.MANAGE_QUORUM();
- // perms[2] = _state.oracle.SET_BEACON_SPEC();
- // perms[3] = _state.oracle.SET_REPORT_BOUNDARIES();
- // perms[4] = _state.oracle.SET_BEACON_REPORT_RECEIVER();
- for (i = 0; i < 5; ++i) {
- _createPermissionForVoting(acl, _state.oracle, perms[i], voting);
- }
-
// NodeOperatorsRegistry
perms[0] = _state.operators.MANAGE_SIGNING_KEYS();
perms[1] = _state.operators.ADD_NODE_OPERATOR_ROLE();
@@ -827,7 +763,6 @@ contract LidoTemplate is IsContract {
delete deployState.operators;
delete deployState;
delete apmRepos.lido;
- delete apmRepos.oracle;
delete apmRepos.nodeOperatorsRegistry;
delete apmRepos.aragonAgent;
delete apmRepos.aragonFinance;
diff --git a/contracts/0.8.9/LidoOracleNew.sol b/contracts/0.8.9/LidoOracleNew.sol
index c828d536f..0fe196913 100644
--- a/contracts/0.8.9/LidoOracleNew.sol
+++ b/contracts/0.8.9/LidoOracleNew.sol
@@ -169,7 +169,8 @@ contract LidoOracleNew is CommitteeQuorum, AccessControlEnumerable, ReportEpochC
uint64 _secondsPerSlot,
uint64 _genesisTime,
uint256 _allowedBeaconBalanceAnnualRelativeIncrease,
- uint256 _allowedBeaconBalanceRelativeDecrease
+ uint256 _allowedBeaconBalanceRelativeDecrease,
+ address _postRebaseBeaconReportReceiver
)
external
{
@@ -204,6 +205,8 @@ contract LidoOracleNew is CommitteeQuorum, AccessControlEnumerable, ReportEpochC
// set expected epoch to the first epoch for the next frame
_setExpectedEpochToFirstOfNextFrame();
+
+ _setBeaconReportReceiver(_postRebaseBeaconReportReceiver);
}
/**
@@ -273,6 +276,12 @@ contract LidoOracleNew is CommitteeQuorum, AccessControlEnumerable, ReportEpochC
*/
function setBeaconReportReceiver(address _address)
external onlyRole(SET_BEACON_REPORT_RECEIVER_ROLE)
+ {
+ _setBeaconReportReceiver(_address);
+ }
+
+ function _setBeaconReportReceiver(address _address)
+ internal
{
if(_address != address(0)) {
IBeaconReportReceiver iBeacon;
@@ -285,6 +294,7 @@ contract LidoOracleNew is CommitteeQuorum, AccessControlEnumerable, ReportEpochC
emit BeaconReportReceiverSet(_address);
}
+
/**
* @notice Return the initialized version of this contract starting from 0
*/
diff --git a/contracts/0.8.9/ValidatorExitBus.sol b/contracts/0.8.9/ValidatorExitBus.sol
index 413c29d23..d6fc0269d 100644
--- a/contracts/0.8.9/ValidatorExitBus.sol
+++ b/contracts/0.8.9/ValidatorExitBus.sol
@@ -140,6 +140,8 @@ contract ValidatorExitBus is CommitteeQuorum, AccessControlEnumerable, ReportEpo
_handleMemberReport(msg.sender, _epochId, _reportHash);
}
+ // TODO: what id it should be? NodeOperator registry Id or beacon chain id? validatorIndex
+ // offchain guarantee that don't ask the same validator
function handleReportData(
uint256 _epochId,
address[] calldata _stakingModules,
diff --git a/contracts/0.8.9/lib/RateLimitUtils.sol b/contracts/0.8.9/lib/RateLimitUtils.sol
index 1707178e9..bf0610e51 100644
--- a/contracts/0.8.9/lib/RateLimitUtils.sol
+++ b/contracts/0.8.9/lib/RateLimitUtils.sol
@@ -1,5 +1,7 @@
-// SPDX-FileCopyrightText: 2022 Lido
+// SPDX-FileCopyrightText: 2023 Lido
// SPDX-License-Identifier: MIT
+
+/* See contracts/COMPILERS.md */
pragma solidity 0.8.9;
diff --git a/contracts/common/lib/MinFirstAllocationStrategy.sol.4 b/contracts/common/lib/MinFirstAllocationStrategy.sol.4
new file mode 100644
index 000000000..4a81fbf12
--- /dev/null
+++ b/contracts/common/lib/MinFirstAllocationStrategy.sol.4
@@ -0,0 +1,107 @@
+// SPDX-FileCopyrightText: 2022 Lido
+// SPDX-License-Identifier: GPL-3.0
+
+/* See contracts/COMPILERS.md */
+// solhint-disable-next-line
+// pragma solidity 0.4.24||0.8.9;
+pragma solidity 0.4.24;
+
+import {Math256} from "./Math256.sol";
+
+/// @notice Library with methods to calculate "proportional" allocations among buckets with different
+/// capacity and level of filling.
+/// @dev The current implementation favors buckets with the least fill factor
+library MinFirstAllocationStrategy {
+ uint256 private constant MAX_UINT256 = 2**256 - 1;
+
+ /// @notice Allocates passed maxAllocationSize among the buckets. The resulting allocation doesn't exceed the
+ /// capacities of the buckets. An algorithm starts filling from the least populated buckets to equalize the fill factor.
+ /// For example, for buckets: [9998, 70, 0], capacities: [10000, 101, 100], and maxAllocationSize: 101, the allocation happens
+ /// following way:
+ /// 1. top up the bucket with index 2 on 70. Intermediate state of the buckets: [9998, 70, 70]. According to the definition,
+ /// the rest allocation must be proportionally split among the buckets with the same values.
+ /// 2. top up the bucket with index 1 on 15. Intermediate state of the buckets: [9998, 85, 70].
+ /// 3. top up the bucket with index 2 on 15. Intermediate state of the buckets: [9998, 85, 85].
+ /// 4. top up the bucket with index 1 on 1. Nothing to distribute. The final state of the buckets: [9998, 86, 85]
+ /// @dev Method modifies the passed buckets array to reduce the gas costs on memory allocation.
+ /// @param buckets The array of current allocations in the buckets
+ /// @param capacities The array of capacities of the buckets
+ /// @param allocationSize The desired value to allocate among the buckets
+ /// @return allocated The total value allocated among the buckets. Can't exceed the allocationSize value
+ function allocate(
+ uint256[] memory buckets,
+ uint256[] memory capacities,
+ uint256 allocationSize
+ ) internal pure returns (uint256 allocated) {
+ uint256 allocatedToBestCandidate = 0;
+ while (allocated < allocationSize) {
+ allocatedToBestCandidate = allocateToBestCandidate(buckets, capacities, allocationSize - allocated);
+ if (allocatedToBestCandidate == 0) {
+ break;
+ }
+ allocated += allocatedToBestCandidate;
+ }
+ }
+
+ /// @notice Allocates the max allowed value not exceeding allocationSize to the bucket with the least value.
+ /// The candidate search happens according to the following algorithm:
+ /// 1. Find the first least filled bucket which has free space. Count the number of such buckets.
+ /// 2. If no buckets are found terminate the search - no free buckets
+ /// 3. Find the first bucket with free space, which has the least value greater
+ /// than the bucket found in step 1. To preserve proportional allocation the resulting allocation can't exceed this value.
+ /// 4. Calculate the allocation size as:
+ /// min(
+ /// max(allocationSize / count of least filling buckets, 1),
+ /// fill factor of the bucket found in step 3,
+ /// free space of the least filled bucket
+ /// )
+ /// @dev Method modifies the passed buckets array to reduce the gas costs on memory allocation.
+ /// @param buckets The array of current allocations in the buckets
+ /// @param capacities The array of capacities of the buckets
+ /// @param allocationSize The desired value to allocate to the bucket
+ /// @return allocated The total value allocated to the bucket. Can't exceed the allocationSize value
+ function allocateToBestCandidate(
+ uint256[] memory buckets,
+ uint256[] memory capacities,
+ uint256 allocationSize
+ ) internal pure returns (uint256 allocated) {
+ uint256 bestCandidateIndex = buckets.length;
+ uint256 bestCandidateAllocation = MAX_UINT256;
+ uint256 bestCandidatesCount = 0;
+
+ for (uint256 i = 0; i < buckets.length; ++i) {
+ if (buckets[i] >= capacities[i]) {
+ continue;
+ } else if (bestCandidateAllocation > buckets[i]) {
+ bestCandidateIndex = i;
+ bestCandidatesCount = 1;
+ bestCandidateAllocation = buckets[i];
+ } else if (bestCandidateAllocation == buckets[i]) {
+ bestCandidatesCount += 1;
+ }
+ }
+
+ if (bestCandidatesCount == 0 || allocationSize == 0) {
+ return 0;
+ }
+
+ // cap the allocation by the smallest larger allocation than the found best one
+ uint256 allocationSizeUpperBound = MAX_UINT256;
+ for (uint256 j = 0; j < buckets.length; ++j) {
+ if (buckets[j] >= capacities[j]) {
+ continue;
+ } else if (buckets[j] > bestCandidateAllocation && buckets[j] < allocationSizeUpperBound) {
+ allocationSizeUpperBound = buckets[j];
+ }
+ }
+
+ // allocate at least one item per iteration
+ allocationSize = Math256.max(allocationSize / bestCandidatesCount, 1);
+
+ allocated = Math256.min(
+ allocationSize,
+ Math256.min(allocationSizeUpperBound, capacities[bestCandidateIndex]) - bestCandidateAllocation
+ );
+ buckets[bestCandidateIndex] += allocated;
+ }
+}
diff --git a/dao-devnet3-deploy.sh b/dao-devnet3-deploy.sh
new file mode 100755
index 000000000..8a19ed066
--- /dev/null
+++ b/dao-devnet3-deploy.sh
@@ -0,0 +1,147 @@
+#!/bin/bash
+set -ex +u
+set -o pipefail
+
+# first local account by default
+# DEPLOYER=${DEPLOYER:=0xC36894ECf19526b3Af600445E0E97BB0F5B57F33}
+DEPLOYER=${DEPLOYER:=0xa5F1d7D49F581136Cf6e58B32cBE9a2039C48bA1}
+NETWORK=${NETWORK:=devnet3}
+ARAGON_APPS_REPO_REF=import-shared-minime
+
+echo "DEPLOYER is $DEPLOYER"
+echo "NETWORK is $NETWORK"
+
+function msg() {
+ MSG=$1
+ if [ ! -z "$MSG" ]; then
+ echo ">>> ============================="
+ echo ">>> $MSG"
+ echo ">>> ============================="
+ fi
+}
+
+function pause() {
+ MSG=$1
+ msg "$1"
+ read -s -n 1 -p "Press any key to continue . . ."
+ echo ""
+}
+
+
+# yarn install --immutable
+yarn compile
+
+
+rm -f deployed-$NETWORK.json
+cp deployed-$NETWORK-defaults.json deployed-$NETWORK.json
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/33-deploy-lido-oracle-new.js
+
+yarn deploy:$NETWORK:aragon-env
+msg "Aragon ENV deployed."
+
+declare -a contracts_with_custom_errors=(
+ "0.8.9/proxy/OssifiableProxy.sol"
+ "0.8.9/ValidatorExitBus.sol"
+ "0.8.9/CommitteeQuorum.sol"
+ "0.8.9/LidoOracleNew.sol"
+ "0.8.9/test_helpers/LidoOracleNewMock.sol"
+ "0.8.9/test_helpers/ValidatorExitBusMock.sol"
+ "0.8.9/ReportEpochChecker.sol"
+ "0.8.9/lib/RateLimitUtils.sol"
+ "0.8.9/WithdrawalVault.sol"
+ "0.8.9/StakingRouter.sol"
+ "0.8.9/test_helpers/StakingRouterMock.sol"
+ "0.8.9/WithdrawalQueue.sol"
+ "0.8.9/BeaconChainDepositor.sol"
+ "0.8.9/test_helpers/BeaconChainDepositorMock.sol"
+)
+for f in "${contracts_with_custom_errors[@]}"
+do
+ mv "contracts/${f}" "contracts/${f}.bkp"
+done
+
+yarn deploy:$NETWORK:aragon-std-apps
+msg "Aragon STD apps deployed."
+
+for f in "${contracts_with_custom_errors[@]}"
+do
+ mv "contracts/${f}.bkp" "contracts/${f}"
+done
+
+yarn hardhat --network $NETWORK run --no-compile ./scripts/deploy-beacon-deposit-contract.js
+msg "Deposit contract deployed."
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/01-deploy-lido-template-and-bases.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-01-1-deploy-template.json
+pause "!!! Now set the daoTemplateDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-01-2-deploy-lido-base.json
+pause "!!! Now set the lidoBaseDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-01-4-deploy-nops-base.json
+pause "!!! Now set the nodeOperatorsRegistryBaseDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK run ./scripts/multisig/02-obtain-deployed-instances.js
+msg "Apps instances deployed"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/03-register-ens-domain.js
+if [ -f "tx-02-1-commit-ens-registration.json" ]; then
+ yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-02-1-commit-ens-registration.json
+fi
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-02-2-make-ens-registration.json
+msg "ENS registered"
+
+mv contracts/common/lib/MinFirstAllocationStrategy.sol contracts/common/lib/MinFirstAllocationStrategy.sol.48
+mv contracts/common/lib/MinFirstAllocationStrategy.sol.4 contracts/common/lib/MinFirstAllocationStrategy.sol
+mv contracts/0.8.9/StakingRouter.sol contracts/0.8.9/StakingRouter.sol.bkp
+mv contracts/0.8.9/test_helpers/StakingRouterMock.sol contracts/0.8.9/test_helpers/StakingRouterMock.sol.bkp
+mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol.bkp
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/04-publish-app-frontends.js
+msg "Frontend published to IPFS"
+
+mv contracts/common/lib/MinFirstAllocationStrategy.sol contracts/common/lib/MinFirstAllocationStrategy.sol.4
+mv contracts/common/lib/MinFirstAllocationStrategy.sol.48 contracts/common/lib/MinFirstAllocationStrategy.sol
+mv contracts/0.8.9/StakingRouter.sol.bkp contracts/0.8.9/StakingRouter.sol
+mv contracts/0.8.9/test_helpers/StakingRouterMock.sol.bkp contracts/0.8.9/test_helpers/StakingRouterMock.sol
+mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol.bkp contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/05-deploy-apm.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-03-deploy-apm.json
+yarn hardhat --network $NETWORK run ./scripts/multisig/06-obtain-deployed-apm.js
+msg "APM deployed"
+
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/07-create-app-repos.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-07-create-app-repos.json
+msg "App repos created"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/08-deploy-dao.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-05-deploy-dao.json
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/09-obtain-deployed-dao.js
+msg "DAO deploy started"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/10-issue-tokens.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-06-1-issue-tokens.json
+msg "Tokens issued"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/34-deploy-shapella-upgrade-contracts.js
+
+# Insurance: deploy CompositePostRebaseBeaconReceiver
+yarn hardhat --network $NETWORK run ./scripts/multisig/21-deploy-composite-post-rebase-beacon-receiver.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-21-deploy-composite-post-rebase-beacon-receiver.json
+pause "!!! Now set the compositePostRebaseBeaconReceiverDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK run ./scripts/multisig/22-obtain-composite-post-rebase-beacon-receiver.js
+msg "CompositePostRebaseBeaconReceiver deployed"
+
+# Insurance: deploy SelfOwnedStETHBurner
+yarn hardhat --network $NETWORK run ./scripts/multisig/23-deploy-self-owned-steth-burner.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-23-deploy-self-owned-steth-burner.json
+pause "!!! Now set the selfOwnedStETHBurnerDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK run ./scripts/multisig/24-obtain-self-owned-steth-burner.js
+msg "SelfOwnedStETHBurner deployed"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/35-initialize-lido-and-oracle.js
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/11-finalize-dao.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-11-finalize-dao.json
+msg "DAO deploy finalized"
diff --git a/dao-mainnetfork-deploy.sh b/dao-mainnetfork-deploy.sh
new file mode 100755
index 000000000..456f253a9
--- /dev/null
+++ b/dao-mainnetfork-deploy.sh
@@ -0,0 +1,146 @@
+#!/bin/bash
+set -ex +u
+set -o pipefail
+
+# first local account by default
+# DEPLOYER=${DEPLOYER:=0xC36894ECf19526b3Af600445E0E97BB0F5B57F33}
+DEPLOYER=0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1
+NETWORK=${NETWORK:=mainnetfork}
+ARAGON_APPS_REPO_REF=import-shared-minime
+
+echo "DEPLOYER is $DEPLOYER"
+echo "NETWORK is $NETWORK"
+
+function msg() {
+ MSG=$1
+ if [ ! -z "$MSG" ]; then
+ echo ">>> ============================="
+ echo ">>> $MSG"
+ echo ">>> ============================="
+ fi
+}
+
+function pause() {
+ MSG=$1
+ msg "$1"
+ read -s -n 1 -p "Press any key to continue . . ."
+ echo ""
+}
+
+
+# yarn install --immutable
+# yarn compile
+
+rm -f deployed-$NETWORK.json
+cp deployed-$NETWORK-defaults.json deployed-$NETWORK.json
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/33-deploy-lido-oracle-new.js
+
+yarn deploy:$NETWORK:aragon-env
+msg "Aragon ENV deployed."
+
+declare -a contracts_with_custom_errors=(
+ "0.8.9/proxy/OssifiableProxy.sol"
+ "0.8.9/ValidatorExitBus.sol"
+ "0.8.9/CommitteeQuorum.sol"
+ "0.8.9/LidoOracleNew.sol"
+ "0.8.9/test_helpers/LidoOracleNewMock.sol"
+ "0.8.9/test_helpers/ValidatorExitBusMock.sol"
+ "0.8.9/ReportEpochChecker.sol"
+ "0.8.9/lib/RateLimitUtils.sol"
+ "0.8.9/WithdrawalVault.sol"
+ "0.8.9/StakingRouter.sol"
+ "0.8.9/test_helpers/StakingRouterMock.sol"
+ "0.8.9/WithdrawalQueue.sol"
+ "0.8.9/BeaconChainDepositor.sol"
+ "0.8.9/test_helpers/BeaconChainDepositorMock.sol"
+)
+for f in "${contracts_with_custom_errors[@]}"
+do
+ mv "contracts/${f}" "contracts/${f}.bkp"
+done
+
+yarn deploy:$NETWORK:aragon-std-apps
+msg "Aragon STD apps deployed."
+
+for f in "${contracts_with_custom_errors[@]}"
+do
+ mv "contracts/${f}.bkp" "contracts/${f}"
+done
+
+yarn hardhat --network $NETWORK run --no-compile ./scripts/deploy-beacon-deposit-contract.js
+msg "Deposit contract deployed."
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/01-deploy-lido-template-and-bases.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-01-1-deploy-template.json
+pause "!!! Now set the daoTemplateDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-01-2-deploy-lido-base.json
+pause "!!! Now set the lidoBaseDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-01-4-deploy-nops-base.json
+pause "!!! Now set the nodeOperatorsRegistryBaseDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK run ./scripts/multisig/02-obtain-deployed-instances.js
+msg "Apps instances deployed"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/03-register-ens-domain.js
+if [ -f "tx-02-1-commit-ens-registration.json" ]; then
+ yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-02-1-commit-ens-registration.json
+fi
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-02-2-make-ens-registration.json
+msg "ENS registered"
+
+mv contracts/common/lib/MinFirstAllocationStrategy.sol contracts/common/lib/MinFirstAllocationStrategy.sol.48
+mv contracts/common/lib/MinFirstAllocationStrategy.sol.4 contracts/common/lib/MinFirstAllocationStrategy.sol
+mv contracts/0.8.9/StakingRouter.sol contracts/0.8.9/StakingRouter.sol.bkp
+mv contracts/0.8.9/test_helpers/StakingRouterMock.sol contracts/0.8.9/test_helpers/StakingRouterMock.sol.bkp
+mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol.bkp
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/04-publish-app-frontends.js
+msg "Frontend published to IPFS"
+
+mv contracts/common/lib/MinFirstAllocationStrategy.sol contracts/common/lib/MinFirstAllocationStrategy.sol.4
+mv contracts/common/lib/MinFirstAllocationStrategy.sol.48 contracts/common/lib/MinFirstAllocationStrategy.sol
+mv contracts/0.8.9/StakingRouter.sol.bkp contracts/0.8.9/StakingRouter.sol
+mv contracts/0.8.9/test_helpers/StakingRouterMock.sol.bkp contracts/0.8.9/test_helpers/StakingRouterMock.sol
+mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol.bkp contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/05-deploy-apm.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-03-deploy-apm.json
+yarn hardhat --network $NETWORK run ./scripts/multisig/06-obtain-deployed-apm.js
+msg "APM deployed"
+
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/07-create-app-repos.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-07-create-app-repos.json
+msg "App repos created"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/08-deploy-dao.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-05-deploy-dao.json
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/09-obtain-deployed-dao.js
+msg "DAO deploy started"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/10-issue-tokens.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-06-1-issue-tokens.json
+msg "Tokens issued"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/34-deploy-shapella-upgrade-contracts.js
+
+# Insurance: deploy CompositePostRebaseBeaconReceiver
+yarn hardhat --network $NETWORK run ./scripts/multisig/21-deploy-composite-post-rebase-beacon-receiver.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-21-deploy-composite-post-rebase-beacon-receiver.json
+pause "!!! Now set the compositePostRebaseBeaconReceiverDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK run ./scripts/multisig/22-obtain-composite-post-rebase-beacon-receiver.js
+msg "CompositePostRebaseBeaconReceiver deployed"
+
+# Insurance: deploy SelfOwnedStETHBurner
+yarn hardhat --network $NETWORK run ./scripts/multisig/23-deploy-self-owned-steth-burner.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-23-deploy-self-owned-steth-burner.json
+pause "!!! Now set the selfOwnedStETHBurnerDeployTx hash value in deployed-$NETWORK.json"
+yarn hardhat --network $NETWORK run ./scripts/multisig/24-obtain-self-owned-steth-burner.js
+msg "SelfOwnedStETHBurner deployed"
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/35-initialize-lido.js
+
+yarn hardhat --network $NETWORK run ./scripts/multisig/11-finalize-dao.js
+yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-11-finalize-dao.json
+msg "DAO deploy finalized"
diff --git a/deployed-devnet3-defaults.json b/deployed-devnet3-defaults.json
new file mode 100644
index 000000000..b17e83ea0
--- /dev/null
+++ b/deployed-devnet3-defaults.json
@@ -0,0 +1,60 @@
+{
+ "networkId": 1337807,
+ "ipfsAPI": "http://127.0.0.1:5001/api/v0",
+ "multisigAddress": "0xa5F1d7D49F581136Cf6e58B32cBE9a2039C48bA1",
+ "owner": "0xa5F1d7D49F581136Cf6e58B32cBE9a2039C48bA1",
+ "lidoApmEnsName": "lidopm.eth",
+ "lidoApmEnsRegDurationSec": 94608000,
+ "daoAragonId": "lido-dao",
+ "daoInitialSettings": {
+ "voting": {
+ "minSupportRequired": "500000000000000000",
+ "minAcceptanceQuorum": "50000000000000000",
+ "voteDuration": 30,
+ "objectionPhaseDuration": 1
+ },
+ "beaconSpec": {
+ "depositContractAddress": "",
+ "epochsPerFrame": 10,
+ "slotsPerEpoch": 32,
+ "secondsPerSlot": 12,
+ "genesisTime": 1673953200
+ },
+ "fee": {
+ "totalPercent": 10,
+ "treasuryPercent": 0,
+ "insurancePercent": 50,
+ "nodeOperatorsPercent": 50
+ },
+ "token": {
+ "name": "TEST Lido DAO Token",
+ "symbol": "TLDO"
+ }
+ },
+ "vestingParams": {
+ "unvestedTokensAmount": "230000000000000000000000",
+ "holders": {
+ "0xa5F1d7D49F581136Cf6e58B32cBE9a2039C48bA1": "530000000000000000000000",
+ "0x8401Eb5ff34cc943f096A32EF3d5113FEbE8D4Eb": "15000000000000000000000",
+ "0x306469457266CBBe7c0505e8Aad358622235e768": "15000000000000000000000",
+ "0xd873F6DC68e3057e4B7da74c6b304d0eF0B484C7": "15000000000000000000000",
+ "0xDcC5dD922fb1D0fd0c450a0636a8cE827521f0eD": "15000000000000000000000",
+ "0x27E9727FD9b8CdDdd0854F56712AD9DF647FaB74": "15000000000000000000000",
+ "0x9766D2e7FFde358AD0A40BB87c4B88D9FAC3F4dd": "15000000000000000000000",
+ "0xBd7055AB500cD1b0b0B14c82BdBe83ADCc2e8D06": "15000000000000000000000",
+ "0xe8898A4E589457D979Da4d1BDc35eC2aaf5a3f8E": "15000000000000000000000"
+ },
+ "start": 1639659600,
+ "cliff": 1639660100,
+ "end": 1639660100,
+ "revokable": false
+ },
+ "selfOwnedStETHBurnerParams": {
+ "totalCoverSharesBurnt": "0",
+ "totalNonCoverSharesBurnt": "0",
+ "maxBurnAmountPerRunBasisPoints": "4"
+ },
+ "executionLayerRewardsParams": {
+ "withdrawalLimit": "1"
+ }
+}
diff --git a/deployed-goerli.json b/deployed-goerli.json
index 18a8cbd1a..6c938cfd8 100644
--- a/deployed-goerli.json
+++ b/deployed-goerli.json
@@ -184,5 +184,9 @@
],
"selfOwnedStETHBurnerAddress": "0x6432756feF0fb527C06eFd4689A7CE0E195bD327",
"executionLayerRewardsVaultAddress": "0x94750381bE1AbA0504C666ee1DB118F68f0780D4",
- "depositorPreviousAddress": "0xEd23AD3EA5Fb9d10e7371Caef1b141AD1C23A80c"
+ "depositorPreviousAddress": "0xEd23AD3EA5Fb9d10e7371Caef1b141AD1C23A80c",
+ "validatorExitBus": {
+ "implementation": "0xB08C2030324617DF133Bd2faC0f6723Cb2c5065C",
+ "proxy": "0x7282dCa8AB24531B0bE16Db9D74b924d0e444124"
+ }
}
diff --git a/deployed-mainnetfork-defaults.json b/deployed-mainnetfork-defaults.json
new file mode 100644
index 000000000..8fc1bb063
--- /dev/null
+++ b/deployed-mainnetfork-defaults.json
@@ -0,0 +1,60 @@
+{
+ "networkId": 1,
+ "ipfsAPI": "http://127.0.0.1:5001/api/v0",
+ "multisigAddress": "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1",
+ "owner": "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1",
+ "lidoApmEnsName": "lidopm.eth",
+ "lidoApmEnsRegDurationSec": 94608000,
+ "daoAragonId": "lido-dao",
+ "daoInitialSettings": {
+ "voting": {
+ "minSupportRequired": "500000000000000000",
+ "minAcceptanceQuorum": "50000000000000000",
+ "voteDuration": 30,
+ "objectionPhaseDuration": 1
+ },
+ "beaconSpec": {
+ "depositContractAddress": "",
+ "epochsPerFrame": 225,
+ "slotsPerEpoch": 32,
+ "secondsPerSlot": 12,
+ "genesisTime": 1639659600
+ },
+ "fee": {
+ "totalPercent": 10,
+ "treasuryPercent": 0,
+ "insurancePercent": 50,
+ "nodeOperatorsPercent": 50
+ },
+ "token": {
+ "name": "TEST Lido DAO Token",
+ "symbol": "TLDO"
+ }
+ },
+ "vestingParams": {
+ "unvestedTokensAmount": "230000000000000000000000",
+ "holders": {
+ "0xb4124cEB3451635DAcedd11767f004d8a28c6eE7": "530000000000000000000000",
+ "0x8401Eb5ff34cc943f096A32EF3d5113FEbE8D4Eb": "15000000000000000000000",
+ "0x306469457266CBBe7c0505e8Aad358622235e768": "15000000000000000000000",
+ "0xd873F6DC68e3057e4B7da74c6b304d0eF0B484C7": "15000000000000000000000",
+ "0xDcC5dD922fb1D0fd0c450a0636a8cE827521f0eD": "15000000000000000000000",
+ "0x27E9727FD9b8CdDdd0854F56712AD9DF647FaB74": "15000000000000000000000",
+ "0x9766D2e7FFde358AD0A40BB87c4B88D9FAC3F4dd": "15000000000000000000000",
+ "0xBd7055AB500cD1b0b0B14c82BdBe83ADCc2e8D06": "15000000000000000000000",
+ "0xe8898A4E589457D979Da4d1BDc35eC2aaf5a3f8E": "15000000000000000000000"
+ },
+ "start": 1639659600,
+ "cliff": 1639660100,
+ "end": 1639660100,
+ "revokable": false
+ },
+ "selfOwnedStETHBurnerParams": {
+ "totalCoverSharesBurnt": "0",
+ "totalNonCoverSharesBurnt": "0",
+ "maxBurnAmountPerRunBasisPoints": "4"
+ },
+ "executionLayerRewardsParams": {
+ "withdrawalLimit": "1"
+ }
+}
diff --git a/hardhat.config.js b/hardhat.config.js
index 133b5f9bb..5e4f6192e 100644
--- a/hardhat.config.js
+++ b/hardhat.config.js
@@ -41,10 +41,24 @@ const getNetConfig = (networkName, ethAccountName) => {
...base,
url: 'http://localhost:8545',
chainId: 31337,
- gas: 8000000 // the same as in Görli
+ gas: 80000000 // the same as in Görli
+ }
+ const mainnetfork = {
+ ...base,
+ url: 'http://localhost:8545',
+ chainId: 1337,
+ gas: 80000000 // the same as in Görli
+ }
+ const devnet3 = {
+ ...base,
+ url: 'http://35.228.211.212:8545',
+ chainId: 1337807,
+ gas: 9194304
}
const byNetName = {
localhost,
+ mainnetfork,
+ devnet3,
// local
local: {
...base,
diff --git a/lib/abi/LidoOracleNew.json b/lib/abi/LidoOracleNew.json
index 77dd9b8e1..72da332b5 100644
--- a/lib/abi/LidoOracleNew.json
+++ b/lib/abi/LidoOracleNew.json
@@ -1 +1 @@
-[{"inputs":[],"name":"AllowedBeaconBalanceDecreaseExceeded","type":"error"},{"inputs":[],"name":"AllowedBeaconBalanceIncreaseExceeded","type":"error"},{"inputs":[],"name":"BadBeaconReportReceiver","type":"error"},{"inputs":[],"name":"BadEpochsPerFrame","type":"error"},{"inputs":[],"name":"BadGenesisTime","type":"error"},{"inputs":[],"name":"BadSecondsPerSlot","type":"error"},{"inputs":[],"name":"BadSlotsPerEpoch","type":"error"},{"inputs":[],"name":"CanInitializeOnlyOnZeroVersion","type":"error"},{"inputs":[],"name":"CannotDeliverDataIfNoHashConsensus","type":"error"},{"inputs":[],"name":"ConsensusEpochAndDataEpochDoNotMatch","type":"error"},{"inputs":[],"name":"EpochIsTooOld","type":"error"},{"inputs":[],"name":"InvalidReportFormat","type":"error"},{"inputs":[],"name":"MemberAlreadyReported","type":"error"},{"inputs":[],"name":"MemberExists","type":"error"},{"inputs":[],"name":"MemberNotFound","type":"error"},{"inputs":[],"name":"NotMemberReported","type":"error"},{"inputs":[],"name":"QuorumWontBeMade","type":"error"},{"inputs":[{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"bytes32","name":"consensusHash","type":"bytes32"}],"name":"ReportDataDoNotMatchConsensusHash","type":"error"},{"inputs":[],"name":"TooManyMembers","type":"error"},{"inputs":[],"name":"UnexpectedEpoch","type":"error"},{"inputs":[],"name":"ZeroAdminAddress","type":"error"},{"inputs":[],"name":"ZeroMemberAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AllowedBeaconBalanceAnnualRelativeIncreaseSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AllowedBeaconBalanceRelativeDecreaseSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"callback","type":"address"}],"name":"BeaconReportReceiverSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"epochsPerFrame","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"slotsPerEpoch","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"secondsPerSlot","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"genesisTime","type":"uint64"}],"name":"BeaconSpecSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"reportHash","type":"bytes32"}],"name":"CommitteeMemberReported","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beaconBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beaconValidators","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawalVaultBalance","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"requestIdToFinalizeUpTo","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"finalizationShareRates","type":"uint256[]"}],"name":"ConsensusDataDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"reportHash","type":"bytes32"}],"name":"ConsensusReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"epochId","type":"uint256"}],"name":"ExpectedEpochIdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"}],"name":"MemberAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"}],"name":"MemberRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"postTotalPooledEther","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"preTotalPooledEther","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeElapsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalShares","type":"uint256"}],"name":"PostTotalShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"quorum","type":"uint256"}],"name":"QuorumChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_MEMBERS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_QUORUM_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MEMBERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_BEACON_REPORT_RECEIVER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_BEACON_SPEC_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_REPORT_BOUNDARIES_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"addOracleMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distinctReportCounters","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distinctReportHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedBeaconBalanceAnnualRelativeIncrease","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedBeaconBalanceRelativeDecrease","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeaconReportReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeaconSpec","outputs":[{"internalType":"uint64","name":"epochsPerFrame","type":"uint64"},{"internalType":"uint64","name":"slotsPerEpoch","type":"uint64"},{"internalType":"uint64","name":"secondsPerSlot","type":"uint64"},{"internalType":"uint64","name":"genesisTime","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConsensusHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentFrame","outputs":[{"internalType":"uint256","name":"frameEpochId","type":"uint256"},{"internalType":"uint256","name":"frameStartTime","type":"uint256"},{"internalType":"uint256","name":"frameEndTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentOraclesReportStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExpectedEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastCompletedEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastCompletedReportDelta","outputs":[{"internalType":"uint256","name":"postTotalPooledEther","type":"uint256"},{"internalType":"uint256","name":"preTotalPooledEther","type":"uint256"},{"internalType":"uint256","name":"timeElapsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLido","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getMemberReportHash","outputs":[{"internalType":"bytes32","name":"reportHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOracleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getQuorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epochId","type":"uint256"},{"internalType":"bytes32","name":"_reportHash","type":"bytes32"}],"name":"handleCommitteeMemberReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"epochId","type":"uint256"},{"internalType":"uint256","name":"beaconValidators","type":"uint256"},{"internalType":"uint64","name":"beaconBalanceGwei","type":"uint64"},{"internalType":"address[]","name":"stakingModules","type":"address[]"},{"internalType":"uint256[]","name":"nodeOperatorsWithExitedValidators","type":"uint256[]"},{"internalType":"uint256[]","name":"exitedValidatorsNumbers","type":"uint256[]"},{"internalType":"uint256","name":"withdrawalVaultBalance","type":"uint256"},{"internalType":"uint256","name":"newBufferedEtherReserveAmount","type":"uint256"},{"internalType":"uint256[]","name":"requestIdToFinalizeUpTo","type":"uint256[]"},{"internalType":"uint256[]","name":"finalizationShareRates","type":"uint256[]"},{"internalType":"bool","name":"bunkerModeFlag","type":"bool"}],"internalType":"struct LidoOracleNew.Report","name":"_report","type":"tuple"}],"name":"handleReportData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_lido","type":"address"},{"internalType":"uint64","name":"_epochsPerFrame","type":"uint64"},{"internalType":"uint64","name":"_slotsPerEpoch","type":"uint64"},{"internalType":"uint64","name":"_secondsPerSlot","type":"uint64"},{"internalType":"uint64","name":"_genesisTime","type":"uint64"},{"internalType":"uint256","name":"_allowedBeaconBalanceAnnualRelativeIncrease","type":"uint256"},{"internalType":"uint256","name":"_allowedBeaconBalanceRelativeDecrease","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"removeOracleMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setAllowedBeaconBalanceAnnualRelativeIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setAllowedBeaconBalanceRelativeDecrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setBeaconReportReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_epochsPerFrame","type":"uint64"},{"internalType":"uint64","name":"_slotsPerEpoch","type":"uint64"},{"internalType":"uint64","name":"_secondsPerSlot","type":"uint64"},{"internalType":"uint64","name":"_genesisTime","type":"uint64"}],"name":"setBeaconSpec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"testnet_addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rolesHolder","type":"address"}],"name":"testnet_assignAllNonAdminRolesTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"testnet_setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newLido","type":"address"}],"name":"testnet_setLido","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quorum","type":"uint256"}],"name":"updateQuorum","outputs":[],"stateMutability":"nonpayable","type":"function"}]
\ No newline at end of file
+[{"inputs":[],"name":"AllowedBeaconBalanceDecreaseExceeded","type":"error"},{"inputs":[],"name":"AllowedBeaconBalanceIncreaseExceeded","type":"error"},{"inputs":[],"name":"BadBeaconReportReceiver","type":"error"},{"inputs":[],"name":"BadEpochsPerFrame","type":"error"},{"inputs":[],"name":"BadGenesisTime","type":"error"},{"inputs":[],"name":"BadSecondsPerSlot","type":"error"},{"inputs":[],"name":"BadSlotsPerEpoch","type":"error"},{"inputs":[],"name":"CanInitializeOnlyOnZeroVersion","type":"error"},{"inputs":[],"name":"CannotDeliverDataIfNoHashConsensus","type":"error"},{"inputs":[],"name":"ConsensusEpochAndDataEpochDoNotMatch","type":"error"},{"inputs":[],"name":"EpochIsTooOld","type":"error"},{"inputs":[],"name":"InvalidReportFormat","type":"error"},{"inputs":[],"name":"MemberAlreadyReported","type":"error"},{"inputs":[],"name":"MemberExists","type":"error"},{"inputs":[],"name":"MemberNotFound","type":"error"},{"inputs":[],"name":"NotMemberReported","type":"error"},{"inputs":[],"name":"QuorumWontBeMade","type":"error"},{"inputs":[{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"bytes32","name":"consensusHash","type":"bytes32"}],"name":"ReportDataDoNotMatchConsensusHash","type":"error"},{"inputs":[],"name":"TooManyMembers","type":"error"},{"inputs":[],"name":"UnexpectedEpoch","type":"error"},{"inputs":[],"name":"ZeroAdminAddress","type":"error"},{"inputs":[],"name":"ZeroMemberAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AllowedBeaconBalanceAnnualRelativeIncreaseSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AllowedBeaconBalanceRelativeDecreaseSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"callback","type":"address"}],"name":"BeaconReportReceiverSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"epochsPerFrame","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"slotsPerEpoch","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"secondsPerSlot","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"genesisTime","type":"uint64"}],"name":"BeaconSpecSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"reportHash","type":"bytes32"}],"name":"CommitteeMemberReported","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beaconBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beaconValidators","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawalVaultBalance","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"requestIdToFinalizeUpTo","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"finalizationShareRates","type":"uint256[]"}],"name":"ConsensusDataDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"reportHash","type":"bytes32"}],"name":"ConsensusReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"epochId","type":"uint256"}],"name":"ExpectedEpochIdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"}],"name":"MemberAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"}],"name":"MemberRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"postTotalPooledEther","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"preTotalPooledEther","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeElapsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalShares","type":"uint256"}],"name":"PostTotalShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"quorum","type":"uint256"}],"name":"QuorumChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_MEMBERS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_QUORUM_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MEMBERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_BEACON_REPORT_RECEIVER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_BEACON_SPEC_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_REPORT_BOUNDARIES_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"addOracleMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distinctReportCounters","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distinctReportHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedBeaconBalanceAnnualRelativeIncrease","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedBeaconBalanceRelativeDecrease","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeaconReportReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeaconSpec","outputs":[{"internalType":"uint64","name":"epochsPerFrame","type":"uint64"},{"internalType":"uint64","name":"slotsPerEpoch","type":"uint64"},{"internalType":"uint64","name":"secondsPerSlot","type":"uint64"},{"internalType":"uint64","name":"genesisTime","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConsensusHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentFrame","outputs":[{"internalType":"uint256","name":"frameEpochId","type":"uint256"},{"internalType":"uint256","name":"frameStartTime","type":"uint256"},{"internalType":"uint256","name":"frameEndTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentOraclesReportStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExpectedEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastCompletedEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastCompletedReportDelta","outputs":[{"internalType":"uint256","name":"postTotalPooledEther","type":"uint256"},{"internalType":"uint256","name":"preTotalPooledEther","type":"uint256"},{"internalType":"uint256","name":"timeElapsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLido","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getMemberReportHash","outputs":[{"internalType":"bytes32","name":"reportHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOracleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getQuorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epochId","type":"uint256"},{"internalType":"bytes32","name":"_reportHash","type":"bytes32"}],"name":"handleCommitteeMemberReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"epochId","type":"uint256"},{"internalType":"uint256","name":"beaconValidators","type":"uint256"},{"internalType":"uint64","name":"beaconBalanceGwei","type":"uint64"},{"internalType":"address[]","name":"stakingModules","type":"address[]"},{"internalType":"uint256[]","name":"nodeOperatorsWithExitedValidators","type":"uint256[]"},{"internalType":"uint256[]","name":"exitedValidatorsNumbers","type":"uint256[]"},{"internalType":"uint256","name":"withdrawalVaultBalance","type":"uint256"},{"internalType":"uint256","name":"newBufferedEtherReserveAmount","type":"uint256"},{"internalType":"uint256[]","name":"requestIdToFinalizeUpTo","type":"uint256[]"},{"internalType":"uint256[]","name":"finalizationShareRates","type":"uint256[]"},{"internalType":"bool","name":"bunkerModeFlag","type":"bool"}],"internalType":"struct LidoOracleNew.Report","name":"_report","type":"tuple"}],"name":"handleReportData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_lido","type":"address"},{"internalType":"uint64","name":"_epochsPerFrame","type":"uint64"},{"internalType":"uint64","name":"_slotsPerEpoch","type":"uint64"},{"internalType":"uint64","name":"_secondsPerSlot","type":"uint64"},{"internalType":"uint64","name":"_genesisTime","type":"uint64"},{"internalType":"uint256","name":"_allowedBeaconBalanceAnnualRelativeIncrease","type":"uint256"},{"internalType":"uint256","name":"_allowedBeaconBalanceRelativeDecrease","type":"uint256"},{"internalType":"address","name":"_postRebaseBeaconReportReceiver","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"removeOracleMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setAllowedBeaconBalanceAnnualRelativeIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setAllowedBeaconBalanceRelativeDecrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setBeaconReportReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_epochsPerFrame","type":"uint64"},{"internalType":"uint64","name":"_slotsPerEpoch","type":"uint64"},{"internalType":"uint64","name":"_secondsPerSlot","type":"uint64"},{"internalType":"uint64","name":"_genesisTime","type":"uint64"}],"name":"setBeaconSpec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"testnet_addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rolesHolder","type":"address"}],"name":"testnet_assignAllNonAdminRolesTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"testnet_setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newLido","type":"address"}],"name":"testnet_setLido","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quorum","type":"uint256"}],"name":"updateQuorum","outputs":[],"stateMutability":"nonpayable","type":"function"}]
\ No newline at end of file
diff --git a/lib/abi/LidoTemplate.json b/lib/abi/LidoTemplate.json
index 6a6176085..0620a3f37 100644
--- a/lib/abi/LidoTemplate.json
+++ b/lib/abi/LidoTemplate.json
@@ -1 +1 @@
-[{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tld","type":"bytes32"},{"name":"_label","type":"bytes32"}],"name":"deployLidoAPM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_holders","type":"address[]"},{"name":"_amounts","type":"uint256[]"},{"name":"_vestingStart","type":"uint64"},{"name":"_vestingCliff","type":"uint64"},{"name":"_vestingEnd","type":"uint64"},{"name":"_vestingRevokable","type":"bool"},{"name":"_expectedFinalTotalSupply","type":"uint256"}],"name":"issueTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"_to","type":"address"}],"name":"cancelAndTransferDomain","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenName","type":"string"},{"name":"_tokenSymbol","type":"string"},{"name":"_votingSettings","type":"uint64[4]"},{"name":"","type":"address"},{"name":"","type":"uint32[4]"},{"name":"_eip712StETH","type":"address"}],"name":"newDAO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_initialSemanticVersion","type":"uint16[3]"},{"name":"_lidoImplAddress","type":"address"},{"name":"_lidoContentURI","type":"bytes"},{"name":"_nodeOperatorsRegistryImplAddress","type":"address"},{"name":"_nodeOperatorsRegistryContentURI","type":"bytes"},{"name":"_oracleImplAddress","type":"address"},{"name":"_oracleContentURI","type":"bytes"}],"name":"createRepos","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getConfig","outputs":[{"name":"_owner","type":"address"},{"name":"_daoFactory","type":"address"},{"name":"_ens","type":"address"},{"name":"_miniMeFactory","type":"address"},{"name":"_aragonID","type":"address"},{"name":"_apmRegistryFactory","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_daoName","type":"string"},{"name":"","type":"uint16"},{"name":"","type":"uint16"},{"name":"","type":"uint16"},{"name":"_unvestedTokensAmount","type":"uint256"},{"name":"_elRewardsVault","type":"address"},{"name":"_elRewardsWithdrawalLimit","type":"uint16"}],"name":"finalizeDAO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_daoFactory","type":"address"},{"name":"_ens","type":"address"},{"name":"_miniMeFactory","type":"address"},{"name":"_aragonID","type":"address"},{"name":"_apmRegistryFactory","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"apm","type":"address"}],"name":"TmplAPMDeployed","type":"event"},{"anonymous":false,"inputs":[],"name":"TmplReposCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"appProxy","type":"address"},{"indexed":false,"name":"appId","type":"bytes32"}],"name":"TmplAppInstalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"dao","type":"address"},{"indexed":false,"name":"token","type":"address"}],"name":"TmplDAOAndTokenDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"totalAmount","type":"uint256"}],"name":"TmplTokensIssued","type":"event"},{"anonymous":false,"inputs":[],"name":"TmplDaoFinalized","type":"event"}]
\ No newline at end of file
+[{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenName","type":"string"},{"name":"_tokenSymbol","type":"string"},{"name":"_votingSettings","type":"uint64[4]"},{"name":"_eip712StETH","type":"address"},{"name":"_oracle","type":"address"}],"name":"newDAO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_initialSemanticVersion","type":"uint16[3]"},{"name":"_lidoImplAddress","type":"address"},{"name":"_lidoContentURI","type":"bytes"},{"name":"_nodeOperatorsRegistryImplAddress","type":"address"},{"name":"_nodeOperatorsRegistryContentURI","type":"bytes"}],"name":"createRepos","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tld","type":"bytes32"},{"name":"_label","type":"bytes32"}],"name":"deployLidoAPM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_holders","type":"address[]"},{"name":"_amounts","type":"uint256[]"},{"name":"_vestingStart","type":"uint64"},{"name":"_vestingCliff","type":"uint64"},{"name":"_vestingEnd","type":"uint64"},{"name":"_vestingRevokable","type":"bool"},{"name":"_expectedFinalTotalSupply","type":"uint256"}],"name":"issueTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_daoName","type":"string"},{"name":"_unvestedTokensAmount","type":"uint256"},{"name":"_elRewardsWithdrawalLimit","type":"uint16"}],"name":"finalizeDAO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"_to","type":"address"}],"name":"cancelAndTransferDomain","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getConfig","outputs":[{"name":"_owner","type":"address"},{"name":"_daoFactory","type":"address"},{"name":"_ens","type":"address"},{"name":"_miniMeFactory","type":"address"},{"name":"_aragonID","type":"address"},{"name":"_apmRegistryFactory","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_daoFactory","type":"address"},{"name":"_ens","type":"address"},{"name":"_miniMeFactory","type":"address"},{"name":"_aragonID","type":"address"},{"name":"_apmRegistryFactory","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"apm","type":"address"}],"name":"TmplAPMDeployed","type":"event"},{"anonymous":false,"inputs":[],"name":"TmplReposCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"appProxy","type":"address"},{"indexed":false,"name":"appId","type":"bytes32"}],"name":"TmplAppInstalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"dao","type":"address"},{"indexed":false,"name":"token","type":"address"}],"name":"TmplDAOAndTokenDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"totalAmount","type":"uint256"}],"name":"TmplTokensIssued","type":"event"},{"anonymous":false,"inputs":[],"name":"TmplDaoFinalized","type":"event"}]
\ No newline at end of file
diff --git a/package.json b/package.json
index 1d58d1edc..6142de939 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,6 @@
"deploy:apps": "hardhat run --no-compile ./scripts/deploy-lido-apps.js",
"deploy:e2e:apps": "NETWORK_NAME=e2e NETWORK_STATE_FILE=deployed-e2e.json IPFS_API_URL=http://localhost:5001/api/v0 IPFS_GATEWAY_URL=http://localhost:8080 hardhat run --no-compile ./scripts/deploy-lido-apps.js",
"deploy:app-pool": "APPS=depool yarn deploy:apps",
- "deploy:app-oracle": "APPS=depooloracle yarn deploy:apps",
"deploy:app-staking-providers-registry": "APPS=staking-providers-registry yarn deploy:apps",
"deploy:dao": "hardhat run --no-compile ./scripts/deploy-lido-dao.js",
"deploy:e2e:dao": "NETWORK_NAME=e2e NETWORK_STATE_FILE=deployed-e2e.json hardhat run --no-compile ./scripts/deploy-lido-dao.js",
@@ -50,13 +49,16 @@
"deploy:local:aragon-std-apps": "NETWORK_NAME=local NETWORK_STATE_FILE=deployed-local.json IPFS_API_URL=http://127.0.0.1:5001/api/v0 IPFS_GATEWAY_URL=http://127.0.0.1:8080 RELEASE_TYPE=major hardhat run --no-compile ./scripts/deploy-aragon-std-apps.js --config ./hardhat.config.aragon-apps.js",
"deploy:rinkeby:aragon-env": "NETWORK_NAME=rinkeby NETWORK_STATE_FILE=deployed-rinkeby.json hardhat run --no-compile ./scripts/deploy-aragon-env.js",
"deploy:rinkeby:aragon-std-apps": "NETWORK_NAME=rinkeby NETWORK_STATE_FILE=deployed-rinkeby.json IPFS_API_URL=http://127.0.0.1:5001/api/v0 IPFS_GATEWAY_URL=http://127.0.0.1:8080 RELEASE_TYPE=major hardhat run --no-compile ./scripts/deploy-aragon-std-apps.js --config ./hardhat.config.aragon-apps.js",
+ "deploy:mainnetfork:aragon-env": "NETWORK_NAME=mainnetfork NETWORK_STATE_FILE=deployed-mainnetfork.json hardhat run --no-compile ./scripts/deploy-aragon-env.js",
+ "deploy:mainnetfork:aragon-std-apps": "NETWORK_NAME=mainnetfork NETWORK_STATE_FILE=deployed-mainnetfork.json IPFS_API_URL=http://127.0.0.1:5001/api/v0 IPFS_GATEWAY_URL=http://127.0.0.1:8080 RELEASE_TYPE=major hardhat run --no-compile ./scripts/deploy-aragon-std-apps.js --config ./hardhat.config.aragon-apps.js",
+ "deploy:devnet3:aragon-env": "NETWORK_NAME=devnet3 NETWORK_STATE_FILE=deployed-devnet3.json hardhat run --no-compile ./scripts/deploy-aragon-env.js",
+ "deploy:devnet3:aragon-std-apps": "NETWORK_NAME=devnet3 NETWORK_STATE_FILE=deployed-devnet3.json IPFS_API_URL=http://127.0.0.1:5001/api/v0 IPFS_GATEWAY_URL=http://127.0.0.1:8080 RELEASE_TYPE=major hardhat run --no-compile ./scripts/deploy-aragon-std-apps.js --config ./hardhat.config.aragon-apps.js",
"deploy:local:apm-and-template": "NETWORK_NAME=local NETWORK_STATE_FILE=deployed-local.json hardhat run --no-compile ./scripts/deploy-lido-apm-and-template.js",
"deploy:local:apps": "NETWORK_NAME=local NETWORK_STATE_FILE=deployed-local.json IPFS_API_URL=http://127.0.0.1:5001/api/v0 IPFS_GATEWAY_URL=http://127.0.0.1:8080o hardhat run --no-compile ./scripts/deploy-lido-apps.js",
"deploy:local:perm": "NETWORK_NAME=local NETWORK_STATE_FILE=deployed-local.json hardhat run --no-compile ./scripts/deploy-repo-permissions.js",
"deploy:local:dao": "NETWORK_NAME=local NETWORK_STATE_FILE=deployed-local.json hardhat run --no-compile ./scripts/deploy-lido-dao.js",
"deploy:wsteth": "hardhat run --no-compile ./scripts/deploy-wsteth.js",
"apps:lido": "yarn --cwd ./apps/lido/app/ cli",
- "apps:oracle": "yarn --cwd ./apps/lidooracle/app/ cli",
"apps:nos": "yarn --cwd ./apps/node-operators-registry/app/ cli",
"lido:apps": "concurrently \"yarn apps:lido\" \"yarn apps:oracle\" \"yarn apps:nos\" ",
"aragon:start": "node scripts/start-aragon.js",
diff --git a/scripts/components/apm.js b/scripts/components/apm.js
index bfe199a40..b340c6ff6 100644
--- a/scripts/components/apm.js
+++ b/scripts/components/apm.js
@@ -29,7 +29,9 @@ async function deployAPM({ web3, artifacts, owner, labelName, ens, apmRegistryFa
logSplitter()
log(`Using APMRegistryFactory: ${chalk.yellow(apmRegistryFactory.address)}`)
- const receipt = await logTx(`Deploying APMRegistry`, apmRegistryFactory.newAPM(parentNode, labelHash, owner))
+ let receipt = await logTx(`Deploying APMRegistry`, apmRegistryFactory.newAPM(parentNode, labelHash, owner))
+ // let receipt = await logTx(`Deploying APMRegistry - 1`, apmRegistryFactory.newAPM1(parentNode, labelHash, owner))
+ // receipt = await logTx(`Deploying APMRegistry - 2`, apmRegistryFactory.newAPM2(parentNode, labelHash, owner))
const apmAddr = receipt.logs.filter((l) => l.event === 'DeployAPM')[0].args.apm
log(`APMRegistry address: ${chalk.yellow(apmAddr)}`)
logSplitter()
diff --git a/scripts/debug/extract-deployed-addresses.js b/scripts/debug/extract-deployed-addresses.js
new file mode 100644
index 000000000..0e0272652
--- /dev/null
+++ b/scripts/debug/extract-deployed-addresses.js
@@ -0,0 +1,73 @@
+const runOrWrapScript = require('../helpers/run-or-wrap-script')
+const { log, logSplitter, logWideSplitter, yl, gr } = require('../helpers/log')
+const { saveDeployTx } = require('../helpers/deploy')
+const { readNetworkState, assertRequiredNetworkState, persistNetworkState } = require('../helpers/persisted-network-state')
+const { deployWithoutProxy, deployBehindOssifiableProxy } = require('../helpers/deploy-shapella')
+const { ZERO_ADDRESS, bn } = require('@aragon/contract-helpers-test')
+const fs = require('fs')
+
+const { APP_NAMES } = require('../multisig/constants')
+
+const DEPLOYER = process.env.DEPLOYER || ''
+const REQUIRED_NET_STATE = [
+ "app:lido",
+ "app:aragon-agent",
+ "app:aragon-voting",
+ "app:node-operators-registry",
+ "lidoOracle",
+ "stakingRouter",
+ "executionLayerRewardsVaultAddress",
+ "withdrawalQueue",
+ "depositSecurityModuleAddress",
+ "daoInitialSettings",
+ "compositePostRebaseBeaconReceiverAddress",
+ "withdrawalVaultAddress",
+ "validatorExitBus",
+ "beaconChainDepositorAddress",
+ "wstETHAddress",
+]
+
+
+async function deployNewContracts({ web3, artifacts }) {
+ const netId = await web3.eth.net.getId()
+ logWideSplitter()
+ log(`Network ID:`, yl(netId))
+
+ let state = readNetworkState(network.name, netId)
+ assertRequiredNetworkState(state, REQUIRED_NET_STATE)
+ const agent = state["app:aragon-agent"].proxyAddress
+ const voting = state["app:aragon-voting"].proxyAddress
+ const lidoAddress = state["app:lido"].proxyAddress
+ const oracleAddress = state["lidoOracle"].proxy
+ const stakingRouter = state["stakingRouter"].proxy
+ const depositSecurityModule = state["depositSecurityModuleAddress"]
+ const withdrawalQueue = state["withdrawalQueue"].proxy
+ const withdrawalVault = state["withdrawalVaultAddress"]
+ const executionLayerRewardsVault = state["executionLayerRewardsVaultAddress"]
+ const beaconSpec = state["daoInitialSettings"]["beaconSpec"]
+ const compositePostRebaseBeaconReceiverAddress = state["compositePostRebaseBeaconReceiverAddress"]
+ const validatorExitBus = state["validatorExitBus"].proxy
+ const nodeOperatorsRegistry = state["app:node-operators-registry"].proxyAddress
+ const beaconChainDepositor = state["beaconChainDepositorAddress"]
+
+ const addressesInfo = `
+Lido ${lidoAddress}
+LidoOracleNew ${oracleAddress}
+WstETH ${state["wstETHAddress"]}
+WithdrawalVault ${withdrawalVault}
+WithdrawalQueue ${withdrawalQueue}
+ExecutionLayerRewardsVault ${executionLayerRewardsVault}
+ValidatorExitBus ${validatorExitBus}
+StakingRouter ${stakingRouter}
+NodeOperatorRegistry ${nodeOperatorsRegistry}
+BeaconChainDepositor ${beaconChainDepositor}
+DepositSecurityModule ${depositSecurityModule}
+CompositePostRebaseBeaconReceive ${compositePostRebaseBeaconReceiverAddress}
+SelfOwnedStETHBurner ${state["selfOwnedStETHBurnerAddress"]}
+`
+ console.log(addressesInfo)
+ // fs.writeFileSync(fileName, data + '\n', 'utf8')
+
+}
+
+module.exports = runOrWrapScript(deployNewContracts, module)
diff --git a/scripts/debug/load-contracts.js b/scripts/debug/load-contracts.js
new file mode 100644
index 000000000..366c29c86
--- /dev/null
+++ b/scripts/debug/load-contracts.js
@@ -0,0 +1,70 @@
+const runOrWrapScript = require('../helpers/run-or-wrap-script')
+const { log, logSplitter, logWideSplitter, yl, gr } = require('../helpers/log')
+const { saveDeployTx } = require('../helpers/deploy')
+const { readNetworkState, assertRequiredNetworkState, persistNetworkState } = require('../helpers/persisted-network-state')
+const { deployWithoutProxy, deployBehindOssifiableProxy } = require('../helpers/deploy-shapella')
+const { ZERO_ADDRESS, bn } = require('@aragon/contract-helpers-test')
+
+const { APP_NAMES } = require('../multisig/constants')
+
+const DEPLOYER = process.env.DEPLOYER || ''
+const REQUIRED_NET_STATE = [
+ "app:lido",
+ "app:aragon-agent",
+ "app:aragon-voting",
+]
+
+const GAS_LIMIT = 8000000
+
+async function deployNewContracts({ web3, artifacts }) {
+ const netId = await web3.eth.net.getId()
+ logWideSplitter()
+ log(`Network ID:`, yl(netId))
+ let state = readNetworkState(network.name, netId)
+ assertRequiredNetworkState(state, REQUIRED_NET_STATE)
+ const lidoAddress = state["app:lido"].proxyAddress
+ const agent = state["app:aragon-agent"].proxyAddress
+ const voting = state["app:aragon-voting"].proxyAddress
+ const beaconSpec = state["daoInitialSettings"]["beaconSpec"]
+ logWideSplitter()
+
+
+ const lido = await artifacts.require('Lido').at(lidoAddress)
+ const oracleAddress = await lido.getOracle()
+ const treasuryAddress = await lido.getTreasury()
+ const stakingRouterAddressLido = await lido.getStakingRouter()
+ const depositSecurityModuleAddress = await lido.getDepositSecurityModule()
+ const elRewardsVaultAddress = await lido.getELRewardsVault()
+ const withdrawalQueueAddressLido = await lido.getWithdrawalQueue()
+ console.log({
+ oracleAddress,
+ treasuryAddress,
+ stakingRouterAddressLido,
+ depositSecurityModuleAddress,
+ elRewardsVaultAddress,
+ withdrawalQueueAddressLido,
+ })
+
+
+ //
+ // === ValidatorExitBus ===
+ //
+ const validatorExitBusAddress = state["validatorExitBus"].proxy
+ const validatorExitBus = await artifacts.require('ValidatorExitBus').at(validatorExitBusAddress)
+
+ //
+ // === StakingRouter ===
+ //
+ const stakingRouterAddress = state["stakingRouter"].proxy
+ const stakingRouter = await artifacts.require('StakingRouter').at(stakingRouterAddress)
+
+ //
+ // === WithdrawalQueue ===
+ //
+ state = readNetworkState(network.name, netId)
+ const withdrawalQueueAddress = state["withdrawalQueue"].proxy
+ const withdrawalQueue = await artifacts.require('WithdrawalQueue').at(withdrawalQueueAddress)
+
+}
+
+module.exports = runOrWrapScript(deployNewContracts, module)
diff --git a/scripts/debug/tmp-debug-restore-contracts.sh b/scripts/debug/tmp-debug-restore-contracts.sh
new file mode 100755
index 000000000..97dcf769b
--- /dev/null
+++ b/scripts/debug/tmp-debug-restore-contracts.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e +u
+
+declare -a contracts_with_custom_errors=(
+ "0.8.9/proxy/OssifiableProxy.sol"
+ "0.8.9/ValidatorExitBus.sol"
+ "0.8.9/CommitteeQuorum.sol"
+ "0.8.9/LidoOracleNew.sol"
+ "0.8.9/test_helpers/LidoOracleNewMock.sol"
+ "0.8.9/test_helpers/ValidatorExitBusMock.sol"
+ "0.8.9/ReportEpochChecker.sol"
+ "0.8.9/lib/RateLimitUtils.sol"
+ "0.8.9/WithdrawalVault.sol"
+ "0.8.9/StakingRouter.sol"
+ "0.8.9/test_helpers/StakingRouterMock.sol"
+ "0.8.9/WithdrawalQueue.sol"
+ "0.8.9/BeaconChainDepositor.sol"
+ "0.8.9/test_helpers/BeaconChainDepositorMock.sol"
+)
+for f in "${contracts_with_custom_errors[@]}"
+do
+ mv "contracts/${f}.bkp" "contracts/${f}"
+done
diff --git a/scripts/deploy-aragon-env.js b/scripts/deploy-aragon-env.js
index d363960e1..f91f8ae50 100644
--- a/scripts/deploy-aragon-env.js
+++ b/scripts/deploy-aragon-env.js
@@ -127,6 +127,8 @@ async function deployENS({ artifacts, owner }) {
const ENS = artifacts.require('ENS')
const factory = await deploy(`ENSFactory`, artifacts, withArgs({ from: owner }))
+ // await new Promise(r => setTimeout(r, 20000));
+ // return
const result = await logTx(`Creating ENS`, factory.newENS(owner, { from: owner }))
const ensAddr = result.logs.filter((l) => l.event === 'DeployENS')[0].args.ens
diff --git a/scripts/deploy-aragon-std-apps.js b/scripts/deploy-aragon-std-apps.js
index 61a58326b..d126c0b4a 100644
--- a/scripts/deploy-aragon-std-apps.js
+++ b/scripts/deploy-aragon-std-apps.js
@@ -102,9 +102,9 @@ async function publishApp(appName, appsRepoPath, hardhatConfig, env, netName, re
if (hasFrontend) {
logSplitter(`Installing frontend deps for app ${appName}`)
- await execLive('yarn', {
- cwd: appFrontendPath
- })
+ // await execLive('yarn', {
+ // cwd: appFrontendPath
+ // })
logSplitter()
// logSplitter(`Build app ${appName}`)
diff --git a/scripts/deploy-lido-apps.js b/scripts/deploy-lido-apps.js
index a4e9284e5..9fa6d308c 100644
--- a/scripts/deploy-lido-apps.js
+++ b/scripts/deploy-lido-apps.js
@@ -96,16 +96,16 @@ async function publishApp(appName, env, netName, appsDirPath, releaseType) {
logSplitter(`Write state app ${appName}`)
writeNetworkStateFile(arappFile, arapp)
- log(`Installing frontend deps for app ${appName}`)
- await execLive('yarn', {
- cwd: appFrontendPath
- })
-
- log(`Build app ${appName}`)
- await execLive('yarn', {
- args: ['build'],
- cwd: appFrontendPath
- })
+ // log(`Installing frontend deps for app ${appName}`)
+ // await execLive('yarn', {
+ // cwd: appFrontendPath
+ // })
+
+ // log(`Build app ${appName}`)
+ // await execLive('yarn', {
+ // args: ['build'],
+ // cwd: appFrontendPath
+ // })
await execLive('hardhat', {
args: [
diff --git a/scripts/helpers/deploy-shapella.js b/scripts/helpers/deploy-shapella.js
new file mode 100644
index 000000000..46b8cdaed
--- /dev/null
+++ b/scripts/helpers/deploy-shapella.js
@@ -0,0 +1,82 @@
+const { readNetworkState, assertRequiredNetworkState, persistNetworkState } = require('./persisted-network-state')
+const { artifacts } = require('hardhat')
+
+const GAS_LIMIT = 4194304
+
+
+async function deployWithoutProxy(nameInState, artifactName, constructorArgs) {
+ const netId = await web3.eth.net.getId()
+ const state = readNetworkState(network.name, netId)
+ const Contract = await hre.ethers.getContractFactory(artifactName)
+ const contractAddress = (await Contract.deploy(...constructorArgs, { gasLimit: GAS_LIMIT})).address
+
+ console.log(`${artifactName} (NO proxy): ${contractAddress}`)
+
+ persistNetworkState(network.name, netId, state, {
+ [nameInState]: {
+ "address": contractAddress,
+ }
+ })
+
+ return contractAddress
+}
+
+async function deployBehindOssifiableProxyOld(nameInState, artifactName, proxyOwner, constructorArgs) {
+ const netId = await web3.eth.net.getId()
+ const state = readNetworkState(network.name, netId)
+
+ const Contract = await hre.ethers.getContractFactory(artifactName)
+ const implementation = (await Contract.deploy(...constructorArgs, { gasLimit: GAS_LIMIT})).address
+ console.log(`${artifactName} implementation: ${implementation}`)
+
+ const OssifiableProxy = await hre.ethers.getContractFactory("OssifiableProxy")
+ const proxy = (await OssifiableProxy.deploy(
+ implementation,
+ proxyOwner,
+ [],
+ { gasLimit: GAS_LIMIT},
+ )).address
+ console.log(`${artifactName} proxy: ${proxy} (owner is ${proxyOwner})`)
+
+ persistNetworkState(network.name, netId, state, {
+ [nameInState]: {
+ "implementation": implementation,
+ "proxy": proxy,
+ }
+ })
+
+ return proxy
+}
+
+
+async function deployBehindOssifiableProxy(nameInState, artifactName, proxyOwner, deployer, constructorArgs) {
+ const netId = await web3.eth.net.getId()
+ const state = readNetworkState(network.name, netId)
+
+ const Contract = await artifacts.require(artifactName)
+ const implementation = (await Contract.new(...constructorArgs, { from: deployer })).address
+ console.log(`${artifactName} implementation: ${implementation}`)
+
+ const OssifiableProxy = await artifacts.require("OssifiableProxy")
+ const proxy = (await OssifiableProxy.new(
+ implementation,
+ proxyOwner,
+ [],
+ { gasLimit: GAS_LIMIT, from: deployer },
+ )).address
+ console.log(`${artifactName} proxy: ${proxy} (owner is ${proxyOwner})`)
+
+ persistNetworkState(network.name, netId, state, {
+ [nameInState]: {
+ "implementation": implementation,
+ "proxy": proxy,
+ }
+ })
+
+ return proxy
+}
+
+module.exports = {
+ deployWithoutProxy,
+ deployBehindOssifiableProxy,
+}
diff --git a/scripts/multisig/01-deploy-lido-template-and-bases.js b/scripts/multisig/01-deploy-lido-template-and-bases.js
index b81518146..b2ec499b8 100644
--- a/scripts/multisig/01-deploy-lido-template-and-bases.js
+++ b/scripts/multisig/01-deploy-lido-template-and-bases.js
@@ -41,9 +41,6 @@ async function deployTemplate({ web3, artifacts }) {
await saveDeployTx('Lido', 'tx-01-2-deploy-lido-base.json', {
from: state.multisigAddress
})
- await saveDeployTx('LidoOracle', 'tx-01-3-deploy-oracle-base.json', {
- from: state.multisigAddress
- })
await saveDeployTx('NodeOperatorsRegistry', 'tx-01-4-deploy-nops-base.json', {
from: state.multisigAddress
})
@@ -55,7 +52,6 @@ async function deployTemplate({ web3, artifacts }) {
daoTemplateConstructorArgs,
daoTemplateDeployTx: '',
lidoBaseDeployTx: '',
- oracleBaseDeployTx: '',
nodeOperatorsRegistryBaseDeployTx: '',
eip712StETHDeployTx: '',
})
diff --git a/scripts/multisig/02-obtain-deployed-instances.js b/scripts/multisig/02-obtain-deployed-instances.js
index 88e15f683..853a32ad3 100644
--- a/scripts/multisig/02-obtain-deployed-instances.js
+++ b/scripts/multisig/02-obtain-deployed-instances.js
@@ -18,9 +18,8 @@ const REQUIRED_NET_STATE = [
'multisigAddress',
'daoTemplateDeployTx',
'lidoBaseDeployTx',
- 'oracleBaseDeployTx',
'nodeOperatorsRegistryBaseDeployTx',
- 'eip712StETHDeployTx'
+ 'eip712StETHDeployTx',
]
async function deployTemplate({ web3, artifacts }) {
@@ -48,18 +47,6 @@ async function deployTemplate({ web3, artifacts }) {
}
})
- logHeader('LidoOracle app base')
- const oracleBase = await useOrGetDeployed('LidoOracle', state.oracleBaseAddress, state.oracleBaseDeployTx)
- log(`Checking...`)
- await assertDeployedBytecode(oracleBase.address, 'LidoOracle')
- await assertAragonProxyBase(oracleBase, 'oracleBase')
- persistNetworkState(network.name, netId, state, {
- [`app:${APP_NAMES.ORACLE}`]: {
- ...state[`app:${APP_NAMES.ORACLE}`],
- baseAddress: oracleBase.address
- }
- })
-
logHeader('NodeOperatorsRegistry app base')
const nodeOperatorsRegistryBase = await useOrGetDeployed(
'NodeOperatorsRegistry',
diff --git a/scripts/multisig/07-create-app-repos.js b/scripts/multisig/07-create-app-repos.js
index 001bd37fe..7dfd1c872 100644
--- a/scripts/multisig/07-create-app-repos.js
+++ b/scripts/multisig/07-create-app-repos.js
@@ -13,7 +13,6 @@ const REQUIRED_NET_STATE = [
'multisigAddress',
'daoTemplateAddress',
`app:${APP_NAMES.LIDO}`,
- `app:${APP_NAMES.ORACLE}`,
`app:${APP_NAMES.NODE_OPERATORS_REGISTRY}`
]
@@ -37,7 +36,6 @@ async function createAppRepos({ web3, artifacts }) {
logSplitter()
const lidoAppState = state[`app:${APP_NAMES.LIDO}`]
- const oracleAppState = state[`app:${APP_NAMES.ORACLE}`]
const nodeOperatorsAppState = state[`app:${APP_NAMES.NODE_OPERATORS_REGISTRY}`]
await saveCallTxData(`createRepos`, template, 'createRepos', `tx-07-create-app-repos.json`, {
@@ -49,9 +47,6 @@ async function createAppRepos({ web3, artifacts }) {
// NodeOperatorsRegistry app
nodeOperatorsAppState.baseAddress,
nodeOperatorsAppState.contentURI,
- // LidoOracle app
- oracleAppState.baseAddress,
- oracleAppState.contentURI
],
from: state.multisigAddress
})
diff --git a/scripts/multisig/08-deploy-dao.js b/scripts/multisig/08-deploy-dao.js
index d99079322..4d1483f15 100644
--- a/scripts/multisig/08-deploy-dao.js
+++ b/scripts/multisig/08-deploy-dao.js
@@ -20,10 +20,10 @@ const REQUIRED_NET_STATE = [
'multisigAddress',
'daoTemplateAddress',
`app:${APP_NAMES.LIDO}`,
- `app:${APP_NAMES.ORACLE}`,
`app:${APP_NAMES.NODE_OPERATORS_REGISTRY}`,
'daoInitialSettings',
- 'eip712StETHAddress'
+ 'eip712StETHAddress',
+ 'lidoOracle',
]
const ARAGON_APM_ENS_DOMAIN = 'aragonpm.eth'
@@ -54,7 +54,7 @@ async function deployDAO({ web3, artifacts }) {
await checkAppRepos(state)
log.splitter()
- const { daoInitialSettings, depositContractAddress, eip712StETHAddress } = state
+ const { daoInitialSettings, eip712StETHAddress } = state
const votingSettings = [
daoInitialSettings.voting.minSupportRequired,
@@ -63,16 +63,8 @@ async function deployDAO({ web3, artifacts }) {
daoInitialSettings.voting.objectionPhaseDuration,
]
- const beaconSpec = [
- daoInitialSettings.beaconSpec.epochsPerFrame,
- daoInitialSettings.beaconSpec.slotsPerEpoch,
- daoInitialSettings.beaconSpec.secondsPerSlot,
- daoInitialSettings.beaconSpec.genesisTime
- ]
-
log(`Using DAO token settings:`, daoInitialSettings.token)
log(`Using DAO voting settings:`, daoInitialSettings.voting)
- log(`Using beacon spec:`, daoInitialSettings.beaconSpec)
log(`Using eip712StETHAddress:`, eip712StETHAddress)
await saveCallTxData(`newDAO`, template, 'newDAO', `tx-05-deploy-dao.json`, {
@@ -80,9 +72,8 @@ async function deployDAO({ web3, artifacts }) {
daoInitialSettings.token.name,
daoInitialSettings.token.symbol,
votingSettings,
- daoInitialSettings.beaconSpec.depositContractAddress || depositContractAddress,
- beaconSpec,
- eip712StETHAddress
+ eip712StETHAddress,
+ state.lidoOracle.proxy,
],
from: state.multisigAddress
})
diff --git a/scripts/multisig/09-obtain-deployed-dao.js b/scripts/multisig/09-obtain-deployed-dao.js
index 8964730e8..5e216635d 100644
--- a/scripts/multisig/09-obtain-deployed-dao.js
+++ b/scripts/multisig/09-obtain-deployed-dao.js
@@ -1,5 +1,7 @@
const path = require('path')
const chalk = require('chalk')
+const { hash: namehash } = require('eth-ens-namehash')
+const { toChecksumAddress } = require('web3-utils')
const runOrWrapScript = require('../helpers/run-or-wrap-script')
const { log } = require('../helpers/log')
@@ -13,10 +15,11 @@ const REQUIRED_NET_STATE = [
'lidoApmEnsName',
'daoTemplateAddress',
`app:${APP_NAMES.LIDO}`,
- `app:${APP_NAMES.ORACLE}`,
`app:${APP_NAMES.NODE_OPERATORS_REGISTRY}`
]
+const VALID_APP_NAMES = Object.entries(APP_NAMES).map((e) => e[1])
+
async function obtainDeployedAPM({ web3, artifacts }) {
const netId = await web3.eth.net.getId()
@@ -28,12 +31,26 @@ async function obtainDeployedAPM({ web3, artifacts }) {
log.splitter()
+
log(`Using LidoTemplate: ${chalk.yellow(state.daoTemplateAddress)}`)
const template = await artifacts.require('LidoTemplate').at(state.daoTemplateAddress)
if (state.daoTemplateDeployBlock) {
log(`Using LidoTemplate deploy block: ${chalk.yellow(state.daoTemplateDeployBlock)}`)
}
const daoDeployedEvt = await assertLastEvent(template, 'TmplDAOAndTokenDeployed', null, state.daoTemplateDeployBlock)
+
+ const lidoApmEnsName = state.lidoApmEnsName
+ const appIdNameEntries = VALID_APP_NAMES.map((name) => [namehash(`${name}.${lidoApmEnsName}`), name])
+ const appNameByAppId = Object.fromEntries(appIdNameEntries)
+
+ const fromBlock = state.daoTemplateDeployBlock // 4532202
+ const appInstalledEvents = (await template.getPastEvents('TmplAppInstalled', { fromBlock })).map((evt) => evt.args)
+ for (const evt of appInstalledEvents) {
+ const appName = appNameByAppId[evt.appId]
+ const proxyAddress = toChecksumAddress(evt.appProxy)
+ console.log(`${appName}: ${proxyAddress}`)
+ }
+
state.newDaoTx = daoDeployedEvt.transactionHash
log(`Using newDao transaction: ${chalk.yellow(state.newDaoTx)}`)
persistNetworkState(network.name, netId, state)
diff --git a/scripts/multisig/11-finalize-dao.js b/scripts/multisig/11-finalize-dao.js
index 6a19cdef2..f351e7233 100644
--- a/scripts/multisig/11-finalize-dao.js
+++ b/scripts/multisig/11-finalize-dao.js
@@ -70,12 +70,7 @@ async function finalizeDAO({ web3, artifacts }) {
await saveCallTxData(`finalizeDAO`, template, 'finalizeDAO', `tx-11-finalize-dao.json`, {
arguments: [
state.daoAragonId,
- percentToBP(fee.totalPercent),
- percentToBP(fee.treasuryPercent),
- percentToBP(fee.insurancePercent),
- percentToBP(fee.nodeOperatorsPercent),
state.vestingParams.unvestedTokensAmount,
- state.executionLayerRewardsVaultAddress,
state.executionLayerRewardsParams.withdrawalLimit
],
from: state.multisigAddress
diff --git a/scripts/multisig/12-check-dao.js b/scripts/multisig/12-check-dao.js
index 32aebd5a3..e4806e70a 100644
--- a/scripts/multisig/12-check-dao.js
+++ b/scripts/multisig/12-check-dao.js
@@ -102,7 +102,7 @@ async function checkDAO({ web3, artifacts }) {
const [lido, oracle, nopsRegistry, agent, finance, tokenManager, voting] = await Promise.all([
artifacts.require('Lido').at(apps[APP_NAMES.LIDO].proxyAddress),
- artifacts.require('LidoOracle').at(apps[APP_NAMES.ORACLE].proxyAddress),
+ artifacts.require('LidoOracleNew').at(state['lidoOracle'].proxy),
artifacts.require('NodeOperatorsRegistry').at(apps[APP_NAMES.NODE_OPERATORS_REGISTRY].proxyAddress),
artifacts.require('Agent').at(apps[APP_NAMES.ARAGON_AGENT].proxyAddress),
artifacts.require('Finance').at(apps[APP_NAMES.ARAGON_FINANCE].proxyAddress),
@@ -140,7 +140,6 @@ async function checkDAO({ web3, artifacts }) {
{
kernel: dao,
lido,
- oracle,
nopsRegistry,
agent,
finance,
@@ -290,7 +289,7 @@ async function assertDAOConfig({
)
// NB: votesLength depends on the presence of insurance and el-rewards modules
- DAO_LIVE || assert.log(assert.bnEqual, await voting.votesLength(), 1, `voting.votesLength is ${yl('1')}`)
+ // DAO_LIVE || assert.log(assert.bnEqual, await voting.votesLength(), 1, `voting.votesLength is ${yl('1')}`)
log.splitter()
await assertKernel(tokenManager, 'tokenManager')
@@ -330,60 +329,34 @@ async function assertDAOConfig({
DAO_LIVE ||
assert.log(assert.equal, await lido.isStopped(), PROTOCOL_PAUSED_AFTER_DEPLOY, `lido.isStopped is ${yl(PROTOCOL_PAUSED_AFTER_DEPLOY)}`)
- DAO_LIVE ||
- assert.log(
- assert.bnEqual,
- await lido.getWithdrawalCredentials(),
- ZERO_WITHDRAWAL_CREDENTIALS,
- `lido.getWithdrawalCredentials() is ${yl(ZERO_WITHDRAWAL_CREDENTIALS)}`
- )
+ // TODO: restore the check
+ // DAO_LIVE ||
+ // assert.log(
+ // assert.bnEqual,
+ // await lido.getWithdrawalCredentials(),
+ // ZERO_WITHDRAWAL_CREDENTIALS,
+ // `lido.getWithdrawalCredentials() is ${yl(ZERO_WITHDRAWAL_CREDENTIALS)}`
+ // )
- const expectedTotalFee = percentToBP(settings.fee.totalPercent)
- assert.log(assert.bnEqual, await lido.getFee(), expectedTotalFee, `lido.getFee() is ${yl(expectedTotalFee)}`)
- const feeDistr = await lido.getFeeDistribution()
- const expectedTreasuryFee = percentToBP(settings.fee.treasuryPercent)
- const expectedInsuranceFee = percentToBP(settings.fee.insurancePercent)
- const expectedOpsFee = percentToBP(settings.fee.nodeOperatorsPercent)
- assert.log(
- assert.bnEqual,
- feeDistr.treasuryFeeBasisPoints,
- expectedTreasuryFee,
- `lido.getFeeDistribution().treasuryFeeBasisPoints is ${yl(expectedTreasuryFee)}`
- )
- assert.log(
- assert.bnEqual,
- feeDistr.insuranceFeeBasisPoints,
- expectedInsuranceFee,
- `lido.getFeeDistribution().insuranceFeeBasisPoints is ${yl(expectedInsuranceFee)}`
- )
- assert.log(
- assert.bnEqual,
- feeDistr.operatorsFeeBasisPoints,
- expectedOpsFee,
- `lido.getFeeDistribution().operatorsFeeBasisPoints is ${yl(expectedOpsFee)}`
- )
-
- assert.log(
- assert.addressEqual,
- await lido.getDepositContract(),
- settings.beaconSpec.depositContractAddress,
- `lido.getValidatorRegistrationContract() is ${yl(settings.beaconSpec.depositContractAddress)}`
- )
+ // assert.log(
+ // assert.addressEqual,
+ // await lido.getDepositContract(),
+ // settings.beaconSpec.depositContractAddress,
+ // `lido.getValidatorRegistrationContract() is ${yl(settings.beaconSpec.depositContractAddress)}`
+ // )
assert.log(assert.addressEqual, await lido.getOracle(), oracle.address, `lido.getOracle() is ${yl(oracle.address)}`)
- assert.log(assert.addressEqual, await lido.getOperators(), nopsRegistry.address, `lido.getOperators() is ${yl(nopsRegistry.address)}`)
+ // assert.log(assert.addressEqual, await lido.getOperators(), nopsRegistry.address, `lido.getOperators() is ${yl(nopsRegistry.address)}`)
assert.log(assert.addressEqual, await lido.getTreasury(), agent.address, `lido.getTreasury() is ${yl(agent.address)}`)
- assert.log(assert.addressEqual, await lido.getInsuranceFund(), agent.address, `lido.getInsuranceFund() is ${yl(agent.address)}`)
-
assert.log(assert.addressEqual, await lido.getELRewardsVault(), elRewardsVault.address,
`lido.getELRewardsVault() is ${yl(elRewardsVault.address)}`)
log.splitter()
- await assertKernel(oracle, 'oracle')
+ // await assertKernel(oracle, 'oracle')
assert.log(assert.addressEqual, await oracle.getLido(), lido.address, `oracle.getLido() is ${yl(lido.address)}`)
@@ -616,18 +589,6 @@ async function assertDaoPermissions({ kernel, lido, oracle, nopsRegistry, agent,
log.splitter()
- await assertRoles({
- app: oracle,
- appName: 'oracle',
- manager: voting,
- groups: [
- {
- roleNames: ['MANAGE_MEMBERS', 'MANAGE_QUORUM', 'SET_BEACON_SPEC'],
- grantee: voting
- }
- ]
- })
-
log.splitter()
await assertRoles({
diff --git a/scripts/multisig/21-deploy-composite-post-rebase-beacon-receiver.js b/scripts/multisig/21-deploy-composite-post-rebase-beacon-receiver.js
index 6510069c3..c745bd13e 100644
--- a/scripts/multisig/21-deploy-composite-post-rebase-beacon-receiver.js
+++ b/scripts/multisig/21-deploy-composite-post-rebase-beacon-receiver.js
@@ -12,7 +12,7 @@ const REQUIRED_NET_STATE = [
'ensAddress',
'daoAddress',
`app:${APP_NAMES.ARAGON_VOTING}`,
- `app:${APP_NAMES.ORACLE}`
+ `lidoOracle`
]
async function upgradeApp({ web3, artifacts }) {
@@ -25,7 +25,7 @@ async function upgradeApp({ web3, artifacts }) {
const state = readNetworkState(network.name, netId)
assertRequiredNetworkState(state, REQUIRED_NET_STATE)
const votingAddress = state[`app:${APP_NAMES.ARAGON_VOTING}`].proxyAddress
- const lidoOracleAddress = state[`app:${APP_NAMES.ORACLE}`].proxyAddress
+ const lidoOracleAddress = state['lidoOracle'].proxy
log(`Using Voting address:`, yl(votingAddress))
log(`Using LidoOracle address:`, yl(lidoOracleAddress))
logSplitter()
diff --git a/scripts/multisig/22-obtain-composite-post-rebase-beacon-receiver.js b/scripts/multisig/22-obtain-composite-post-rebase-beacon-receiver.js
index 2800f5816..866af382f 100644
--- a/scripts/multisig/22-obtain-composite-post-rebase-beacon-receiver.js
+++ b/scripts/multisig/22-obtain-composite-post-rebase-beacon-receiver.js
@@ -14,7 +14,7 @@ const REQUIRED_NET_STATE = [
'ensAddress',
'daoAddress',
`app:${APP_NAMES.ARAGON_VOTING}`,
- `app:${APP_NAMES.ORACLE}`
+ 'lidoOracle',
]
async function obtainInstance({ web3, artifacts, appName = APP }) {
@@ -36,7 +36,7 @@ async function obtainInstance({ web3, artifacts, appName = APP }) {
)
log(`Checking...`)
const votingAddress = state[`app:${APP_NAMES.ARAGON_VOTING}`].proxyAddress
- const lidoOracleAddress = state[`app:${APP_NAMES.ORACLE}`].proxyAddress
+ const lidoOracleAddress = state['lidoOracle'].proxy
await assertAddresses({
votingAddress,
diff --git a/scripts/multisig/23-deploy-self-owned-steth-burner.js b/scripts/multisig/23-deploy-self-owned-steth-burner.js
index 86c137d91..c4ab7dc79 100644
--- a/scripts/multisig/23-deploy-self-owned-steth-burner.js
+++ b/scripts/multisig/23-deploy-self-owned-steth-burner.js
@@ -16,7 +16,7 @@ const REQUIRED_NET_STATE = [
'compositePostRebaseBeaconReceiverAddress',
'selfOwnedStETHBurnerParams',
`app:${APP_NAMES.ARAGON_VOTING}`,
- `app:${APP_NAMES.ORACLE}`,
+ 'lidoOracle',
`app:${APP_NAMES.ARAGON_AGENT}`
]
@@ -30,7 +30,7 @@ async function upgradeApp({ web3, artifacts }) {
const state = readNetworkState(network.name, netId)
assertRequiredNetworkState(state, REQUIRED_NET_STATE)
const votingAddress = state[`app:${APP_NAMES.ARAGON_VOTING}`].proxyAddress
- const lidoOracleAddress = state[`app:${APP_NAMES.ORACLE}`].proxyAddress
+ const lidoOracleAddress = state['lidoOracle'].proxy
const lidoAddress = state[`app:${APP_NAMES.LIDO}`].proxyAddress
const treasuryAddress = state[`app:${APP_NAMES.ARAGON_AGENT}`].proxyAddress
log(`Using Treasury address:`, yl(treasuryAddress))
@@ -51,8 +51,7 @@ async function upgradeApp({ web3, artifacts }) {
const lidoInstance = await artifacts.require(`${APP_ARTIFACTS.lido}`).at(lidoAddress)
- assert.addressEqual(await lidoInstance.getOracle(), lidoOracleAddress, 'Lido: wrong oracle address')
- assert.addressEqual(await lidoInstance.getInsuranceFund(), treasuryAddress, 'Lido: wrong treasury address')
+ // assert.addressEqual(await lidoInstance.getOracle(), lidoOracleAddress, 'Lido: wrong oracle address')
const args = [
treasuryAddress,
diff --git a/scripts/multisig/24-obtain-self-owned-steth-burner.js b/scripts/multisig/24-obtain-self-owned-steth-burner.js
index 039fc75e8..991d309b7 100644
--- a/scripts/multisig/24-obtain-self-owned-steth-burner.js
+++ b/scripts/multisig/24-obtain-self-owned-steth-burner.js
@@ -19,7 +19,6 @@ const REQUIRED_NET_STATE = [
'compositePostRebaseBeaconReceiverAddress',
'selfOwnedStETHBurnerParams',
`app:${APP_NAMES.ARAGON_VOTING}`,
- `app:${APP_NAMES.ORACLE}`,
`app:${APP_NAMES.ARAGON_AGENT}`
]
diff --git a/scripts/multisig/33-deploy-lido-oracle-new.js b/scripts/multisig/33-deploy-lido-oracle-new.js
new file mode 100644
index 000000000..9e22ae7f7
--- /dev/null
+++ b/scripts/multisig/33-deploy-lido-oracle-new.js
@@ -0,0 +1,24 @@
+const runOrWrapScript = require('../helpers/run-or-wrap-script')
+const { log, logSplitter, logWideSplitter, yl, gr } = require('../helpers/log')
+const { readNetworkState, assertRequiredNetworkState } = require('../helpers/persisted-network-state')
+const { deployBehindOssifiableProxy } = require('../helpers/deploy-shapella')
+const REQUIRED_NET_STATE = [
+]
+const DEPLOYER = process.env.DEPLOYER
+
+async function deployLidoOracleNew({ web3, artifacts }) {
+ const netId = await web3.eth.net.getId()
+ logWideSplitter()
+ log(`Network ID:`, yl(netId))
+ console.log({DEPLOYER})
+
+ let state = readNetworkState(network.name, netId)
+ assertRequiredNetworkState(state, REQUIRED_NET_STATE)
+
+ logWideSplitter()
+
+ await deployBehindOssifiableProxy("lidoOracle", "LidoOracleNew", DEPLOYER, DEPLOYER, [])
+ logWideSplitter()
+}
+
+module.exports = runOrWrapScript(deployLidoOracleNew, module)
diff --git a/scripts/multisig/34-deploy-shapella-upgrade-contracts.js b/scripts/multisig/34-deploy-shapella-upgrade-contracts.js
new file mode 100644
index 000000000..a895d394c
--- /dev/null
+++ b/scripts/multisig/34-deploy-shapella-upgrade-contracts.js
@@ -0,0 +1,157 @@
+const runOrWrapScript = require('../helpers/run-or-wrap-script')
+const { log, logSplitter, logWideSplitter, yl, gr } = require('../helpers/log')
+const { saveDeployTx } = require('../helpers/deploy')
+const { readNetworkState, assertRequiredNetworkState, persistNetworkState } = require('../helpers/persisted-network-state')
+const { deployWithoutProxy, deployBehindOssifiableProxy } = require('../helpers/deploy-shapella')
+const { ZERO_ADDRESS, bn } = require('@aragon/contract-helpers-test')
+
+const { APP_NAMES } = require('./constants')
+
+const DEPLOYER = process.env.DEPLOYER || ''
+const REQUIRED_NET_STATE = [
+ "depositContractAddress",
+ "app:lido",
+ "app:aragon-agent",
+ "app:aragon-voting",
+ "daoInitialSettings",
+]
+
+const e18 = 10 ** 18
+function toE18(value) {
+ return bn(value.toString()).mul(bn(e18.toString()))
+}
+
+function calcRateLimitParameters(maxRequestsPerDay) {
+ const blockDurationSeconds = 12
+ const secondsInDay = 24 * 60 * 60
+ const blocksInDay = secondsInDay / blockDurationSeconds
+
+ const maxRequestsPerDayE18 = toE18(maxRequestsPerDay)
+ return [toE18(maxRequestsPerDay), maxRequestsPerDayE18.div(bn(blocksInDay))]
+}
+
+async function deployNewContracts({ web3, artifacts }) {
+ const netId = await web3.eth.net.getId()
+ logWideSplitter()
+ log(`Network ID:`, yl(netId))
+ let state = readNetworkState(network.name, netId)
+ assertRequiredNetworkState(state, REQUIRED_NET_STATE)
+ const lido = state["app:lido"].proxyAddress
+ const agent = state["app:aragon-agent"].proxyAddress
+ const voting = state["app:aragon-voting"].proxyAddress
+ const beaconSpec = state["daoInitialSettings"]["beaconSpec"]
+ logWideSplitter()
+ const proxyContractsOwner = voting
+
+ //
+ // === WstETH ===
+ //
+ const wstETH = await deployWithoutProxy("wstETH", "WstETH", [lido])
+ logWideSplitter()
+
+ //
+ // === LidoExecutionLayerRewardsVault ===
+ //
+ const elRewardsVaultAddress = await deployWithoutProxy(
+ "executionLayerRewardsVault", "LidoExecutionLayerRewardsVault", [lido, agent]
+ )
+ logWideSplitter()
+
+ //
+ // === WithdrawalVault ===
+ //
+ const withdrawalVaultAddress = await deployWithoutProxy("withdrawalVault", "WithdrawalVault", [lido, agent])
+ logWideSplitter()
+
+ //
+ // === ValidatorExitBus ===
+ //
+ const validatorExitBusAddress = await deployBehindOssifiableProxy("validatorExitBus", "ValidatorExitBus", proxyContractsOwner, DEPLOYER, [])
+
+ const [maxRequestsPerDayE18, numRequestsLimitIncreasePerBlockE18] = calcRateLimitParameters(2000)
+ const busInitializationArgs = [
+ voting,
+ maxRequestsPerDayE18,
+ numRequestsLimitIncreasePerBlockE18,
+ beaconSpec.epochsPerFrame,
+ beaconSpec.slotsPerEpoch,
+ beaconSpec.secondsPerSlot,
+ beaconSpec.genesisTime,
+ ]
+ console.log(busInitializationArgs.map((x) => (x.toString())))
+ const validatorExitBus = await artifacts.require('ValidatorExitBus').at(validatorExitBusAddress)
+ await validatorExitBus.initialize(
+ ...busInitializationArgs,
+ { from: DEPLOYER }
+ )
+ logWideSplitter() // ValidatorExitBus
+
+ //
+ // === StakingRouter ===
+ //
+ const depositContract = state.depositContractAddress
+ const stakingRouterAddress =
+ await deployBehindOssifiableProxy("stakingRouter", "StakingRouter", proxyContractsOwner, DEPLOYER, [depositContract])
+
+ const withdrawalCredentials = `0x010000000000000000000000${withdrawalVaultAddress.slice(2)}`
+ console.log({withdrawalCredentials})
+ const stakingRouterInitArgs = [
+ voting,
+ lido,
+ withdrawalCredentials,
+ ]
+ console.log({ stakingRouterInitArgs })
+ const stakingRouter = await artifacts.require('StakingRouter').at(stakingRouterAddress)
+ await stakingRouter.initialize(
+ ...stakingRouterInitArgs,
+ { from: DEPLOYER },
+ )
+ logWideSplitter()
+
+ //
+ // === WithdrawalQueue ===
+ //
+ state = readNetworkState(network.name, netId)
+ const withdrawalQueueAddress =
+ await deployBehindOssifiableProxy("withdrawalQueue", "WithdrawalQueue", proxyContractsOwner, DEPLOYER, [lido, wstETH])
+ const withdrawalQueueInitArgs = [
+ voting,
+ lido,
+ voting,
+ voting,
+ ]
+ console.log({ withdrawalQueueInitArgs })
+ const withdrawalQueue = await artifacts.require('WithdrawalQueue').at(withdrawalQueueAddress)
+ await withdrawalQueue.initialize(
+ ...withdrawalQueueInitArgs,
+ { from: DEPLOYER },
+ )
+ logWideSplitter()
+
+ //
+ // === BeaconChainDepositor ===
+ //
+ const beaconChainDepositorAddress = await deployWithoutProxy(
+ "beaconChainDepositor", "BeaconChainDepositor", [depositContract])
+ logWideSplitter()
+
+ //
+ // === DepositSecurityModule ===
+ //
+ const maxDepositsPerBlock = 150 // as in mainnet
+ const minDepositBlockDistance = 25 // as in mainnet
+ const pauseIntentValidityPeriodBlocks = 6646 // as in mainnet
+ const depositSecurityModuleConstructorArgs = [
+ lido,
+ depositContract,
+ stakingRouterAddress,
+ maxDepositsPerBlock,
+ minDepositBlockDistance,
+ pauseIntentValidityPeriodBlocks,
+ ]
+ const depositSecurityModuleAddress =
+ await deployWithoutProxy("depositSecurityModule", "DepositSecurityModule", depositSecurityModuleConstructorArgs)
+ console.log({ depositSecurityModuleConstructorArgs })
+}
+
+module.exports = runOrWrapScript(deployNewContracts, module)
diff --git a/scripts/multisig/35-initialize-lido-and-oracle.js b/scripts/multisig/35-initialize-lido-and-oracle.js
new file mode 100644
index 000000000..62e4832b8
--- /dev/null
+++ b/scripts/multisig/35-initialize-lido-and-oracle.js
@@ -0,0 +1,85 @@
+const runOrWrapScript = require('../helpers/run-or-wrap-script')
+const { log, logSplitter, logWideSplitter, yl, gr } = require('../helpers/log')
+const { readNetworkState, assertRequiredNetworkState, persistNetworkState } = require('../helpers/persisted-network-state')
+const { deployWithoutProxy, deployBehindOssifiableProxy } = require('../helpers/deploy-shapella')
+const { ZERO_ADDRESS, bn } = require('@aragon/contract-helpers-test')
+
+const { APP_NAMES } = require('./constants')
+
+const DEPLOYER = process.env.DEPLOYER || ''
+const REQUIRED_NET_STATE = [
+ "app:lido",
+ "app:aragon-agent",
+ "app:aragon-voting",
+ "lidoOracle",
+ "stakingRouter",
+ "executionLayerRewardsVaultAddress",
+ "withdrawalQueue",
+ "depositSecurityModuleAddress",
+ "daoInitialSettings",
+ "compositePostRebaseBeaconReceiverAddress",
+]
+
+
+async function deployNewContracts({ web3, artifacts }) {
+ const netId = await web3.eth.net.getId()
+ logWideSplitter()
+ log(`Network ID:`, yl(netId))
+
+ let state = readNetworkState(network.name, netId)
+ assertRequiredNetworkState(state, REQUIRED_NET_STATE)
+ const agent = state["app:aragon-agent"].proxyAddress
+ const voting = state["app:aragon-voting"].proxyAddress
+ const lidoAddress = state["app:lido"].proxyAddress
+ const oracleAddress = state["lidoOracle"].proxy
+ const stakingRouter = state["stakingRouter"].proxy
+ const depositSecurityModule = state["depositSecurityModuleAddress"]
+ const withdrawalQueue = state["withdrawalQueue"].proxy
+ const executionLayerRewardsVault = state["executionLayerRewardsVaultAddress"]
+ const beaconSpec = state["daoInitialSettings"]["beaconSpec"]
+ const compositePostRebaseBeaconReceiverAddress = state["compositePostRebaseBeaconReceiverAddress"]
+
+
+ //
+ // === Lido: initialize ===
+ //
+ // TODO: deploy eip712 contract
+ const eip712StETH = ZERO_ADDRESS
+ const treasury = agent
+ const lidoInitArgs = [
+ oracleAddress,
+ treasury,
+ stakingRouter,
+ depositSecurityModule,
+ executionLayerRewardsVault,
+ withdrawalQueue,
+ eip712StETH,
+ ]
+ console.log({ lidoInitArgs })
+ const lido = await artifacts.require('Lido').at(lidoAddress)
+ let tx = await lido.initialize(...lidoInitArgs, { from: DEPLOYER })
+ logWideSplitter()
+
+
+ //
+ // === LidoOracleNew: initialize ===
+ //
+ const allowedBeaconBalanceAnnualRelativeIncrease = 3000 // just larger than in mainnet
+ const allowedBeaconBalanceRelativeDecrease = 1000 // just larger than in mainnet
+ const oracleInitArgs = [
+ voting,
+ lidoAddress,
+ beaconSpec.epochsPerFrame,
+ beaconSpec.slotsPerEpoch,
+ beaconSpec.secondsPerSlot,
+ beaconSpec.genesisTime,
+ allowedBeaconBalanceAnnualRelativeIncrease,
+ allowedBeaconBalanceRelativeDecrease,
+ compositePostRebaseBeaconReceiverAddress,
+ ]
+ const oracle = await artifacts.require('LidoOracleNew').at(oracleAddress)
+ tx = await oracle.initialize(...oracleInitArgs, { from: DEPLOYER })
+
+}
+
+module.exports = runOrWrapScript(deployNewContracts, module)
diff --git a/scripts/multisig/checks/apps.js b/scripts/multisig/checks/apps.js
index a0be3a489..02a235a4a 100644
--- a/scripts/multisig/checks/apps.js
+++ b/scripts/multisig/checks/apps.js
@@ -56,7 +56,9 @@ async function assertInstalledApps(
log.success(baseCheckDesc)
const instance = await AragonApp.at(proxyAddress)
- await assertInitializedAragonApp(instance, kernel, appName)
+ if (appName != 'lido') {
+ await assertInitializedAragonApp(instance, kernel, appName)
+ }
dataByAppName[appName] = {
name: appName,
diff --git a/scripts/multisig/constants.js b/scripts/multisig/constants.js
index d8684e4ec..005681065 100644
--- a/scripts/multisig/constants.js
+++ b/scripts/multisig/constants.js
@@ -1,8 +1,7 @@
-// See contracts/template/LidoTenplate.sol
+// See contracts/template/LidoTemplate.sol
const APP_NAMES = {
// Lido apps
LIDO: 'lido',
- ORACLE: 'oracle',
NODE_OPERATORS_REGISTRY: 'node-operators-registry',
// Aragon apps
ARAGON_AGENT: 'aragon-agent',
@@ -13,7 +12,6 @@ const APP_NAMES = {
const APP_ARTIFACTS = {
[APP_NAMES.LIDO]: 'Lido',
- [APP_NAMES.ORACLE]: 'LidoOracle',
[APP_NAMES.NODE_OPERATORS_REGISTRY]: 'NodeOperatorsRegistry',
[APP_NAMES.ARAGON_AGENT]: 'external:Agent',
[APP_NAMES.ARAGON_FINANCE]: 'external:Finance',
diff --git a/yarn.lock b/yarn.lock
index 12ac2a3b5..75898ce0f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -17470,44 +17470,6 @@ fsevents@~2.3.2:
languageName: unknown
linkType: soft
-"lidooracle-frontend@workspace:apps/lidooracle/app":
- version: 0.0.0-use.local
- resolution: "lidooracle-frontend@workspace:apps/lidooracle/app"
- dependencies:
- "@aragon/api": ^2.0.0
- "@aragon/api-react": ^2.0.0
- "@aragon/ui": ^1.7.0
- "@babel/core": ^7.11.6
- "@babel/preset-env": ^7.11.5
- "@babel/preset-react": ^7.10.1
- "@openzeppelin/contracts": 3.1.0
- babel-eslint: ^10.1.0
- babel-plugin-styled-components: ^1.11.1
- copyfiles: ^2.3.0
- core-js: ^3.6.5
- eslint: ^7.9.0
- eslint-config-prettier: ^6.11.0
- eslint-config-standard: ^14.1.1
- eslint-config-standard-react: ^9.2.0
- eslint-plugin-import: ^2.22.0
- eslint-plugin-node: ^11.1.0
- eslint-plugin-prettier: ^3.1.4
- eslint-plugin-promise: ^4.2.1
- eslint-plugin-react: ^7.20.6
- eslint-plugin-react-hooks: ^4.1.2
- eslint-plugin-standard: ^4.0.1
- formik: ^2.2.0
- parcel-bundler: ^1.12.4
- prettier: ^2.1.2
- react: ^16.13.1
- react-dom: ^16.13.1
- regenerator-runtime: ^0.13.7
- styled-components: ^5.2.0
- web3-utils: ^1.3.0
- yup: ^0.29.3
- languageName: unknown
- linkType: soft
-
"lines-and-columns@npm:^1.1.6":
version: 1.1.6
resolution: "lines-and-columns@npm:1.1.6"