diff --git a/packages/boba/gateway/.env.example b/packages/boba/gateway/.env.example
index f81434f3c3..58c03d7c08 100644
--- a/packages/boba/gateway/.env.example
+++ b/packages/boba/gateway/.env.example
@@ -8,8 +8,14 @@ REACT_APP_ENV=dev
REACT_APP_CHAIN=mainnet
REACT_APP_STATUS=normal
REACT_APP_SPEED_CHECK=
-REACT_APP_AIRDROP=
REACT_APP_GA4_MEASUREMENT_ID=
REACT_APP_SENTRY_DSN=
REACT_APP_ENABLE_LOCK_PAGE= # values can be 0 and 1
REACT_APP_ZENDESK_KEY= ## KEY for the zendesk widget.
+
+
+################
+### Ve Dao #####
+################
+# to disable the veDao set below flat to 1.
+REACT_APP_DISABLE_VE_DAO=1
diff --git a/packages/boba/gateway/package.json b/packages/boba/gateway/package.json
index c25f5b5eee..8155c972ba 100644
--- a/packages/boba/gateway/package.json
+++ b/packages/boba/gateway/package.json
@@ -26,8 +26,8 @@
"@mui/icons-material": "^5.3.1",
"@mui/material": "^5.4.0",
"@mui/styles": "^5.3.0",
- "@sentry/react": "^7.12.1",
- "@sentry/tracing": "^7.12.1",
+ "@sentry/react": "^7.20.1",
+ "@sentry/tracing": "^7.20.1",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"axios": "^0.21.1",
diff --git a/packages/boba/gateway/readme.md b/packages/boba/gateway/readme.md
index 0f918bd848..d00b0092a0 100644
--- a/packages/boba/gateway/readme.md
+++ b/packages/boba/gateway/readme.md
@@ -14,7 +14,6 @@ gateway.boba.betwork.
| REACT_APP_CHAIN | Yes | mainnet | Chain where we want to connect the app to like rinkeby, mainnet |
| REACT_APP_STATUS | NO | N/A | To notify the status about any maintainance activity going on. |
| REACT_APP_SPEED_CHECK | | | |
-| REACT_APP_AIRDROP | | | |
| REACT_APP_GA4_MEASUREMENT_ID | Yes | N/A | Google analytics api key |
| REACT_APP_SENTRY_DSN | Yes | N/A | Sentry DSN url to catch the error on frontend |
| REACT_APP_ENABLE_LOCK_PAGE | No | N/A | to enable the lock page on gateway menu |
diff --git a/packages/boba/gateway/src/actions/airdropAction.js b/packages/boba/gateway/src/actions/airdropAction.js
deleted file mode 100644
index b9548a20ad..0000000000
--- a/packages/boba/gateway/src/actions/airdropAction.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Varna - A Privacy-Preserving Marketplace
- Varna uses Fully Homomorphic Encryption to make markets fair.
- Copyright (C) 2021 Enya Inc. Palo Alto, CA
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-import networkService from 'services/networkService'
-import { createAction } from './createAction'
-
-export function fetchAirdropStatusL1() {return createAction('FETCH/AIRDROPL1/STATUS', ()=>networkService.fetchAirdropStatusL1())}
-export function fetchAirdropStatusL2() {return createAction('FETCH/AIRDROPL2/STATUS', ()=>networkService.fetchAirdropStatusL2())}
-
-export function initiateAirdrop(callData) {return createAction('AIRDROP/INITIATE',()=>{return networkService.initiateAirdrop(callData)})}
-
-export function getAirdropL1(callData) {return createAction('AIRDROPL1/CREATE',()=>{return networkService.getAirdropL1(callData)})}
-export function getAirdropL2(callData) {return createAction('AIRDROPL2/CREATE',()=>{return networkService.getAirdropL2(callData)})}
\ No newline at end of file
diff --git a/packages/boba/gateway/src/components/mainMenu/menuItems.js b/packages/boba/gateway/src/components/mainMenu/menuItems.js
index 0e478d2874..e3cb81e5ab 100644
--- a/packages/boba/gateway/src/components/mainMenu/menuItems.js
+++ b/packages/boba/gateway/src/components/mainMenu/menuItems.js
@@ -41,10 +41,10 @@ export const menuItems = [
key: 'Lock',
icon: "LockIcon",
title: "Lock",
- url: "/lock",
+ url: ROUTES_PATH.LOCK,
},
{
- key: 'Vote',
+ key: 'Vote&Dao',
icon: "VoteIcon",
title: "Vote&Dao",
url: ROUTES_PATH.VOTE_DAO
@@ -54,5 +54,11 @@ export const menuItems = [
icon: "LinksToBobaChainsIcon",
title: "BOBA Chains",
url: ROUTES_PATH.BOBA_CHAINS
- }
+ },
+ {
+ key: 'DAO',
+ icon: "VoteIcon",
+ title: "Dao",
+ url: ROUTES_PATH.DAO
+ },
]
diff --git a/packages/boba/gateway/src/components/mainMenu/menuItems/MenuItems.js b/packages/boba/gateway/src/components/mainMenu/menuItems/MenuItems.js
index 532593c79c..d34821f1bd 100644
--- a/packages/boba/gateway/src/components/mainMenu/menuItems/MenuItems.js
+++ b/packages/boba/gateway/src/components/mainMenu/menuItems/MenuItems.js
@@ -7,6 +7,7 @@ import { selectMonster } from 'selectors/setupSelector'
import { menuItems } from '../menuItems'
import * as S from './MenuItems.styles'
+import { DISABLE_VE_DAO } from 'util/constant'
const MenuItems = () => {
@@ -36,6 +37,9 @@ const MenuItems = () => {
return (
{menuList.map((item) => {
+ if (!!Number(DISABLE_VE_DAO) && (['Lock','Vote&Dao'].includes(item.key))) {
+ return null;
+ }
return (
{
diff --git a/packages/boba/gateway/src/components/pageFooter/PageFooter.js b/packages/boba/gateway/src/components/pageFooter/PageFooter.js
index 62a147bd3d..06389c137d 100644
--- a/packages/boba/gateway/src/components/pageFooter/PageFooter.js
+++ b/packages/boba/gateway/src/components/pageFooter/PageFooter.js
@@ -66,9 +66,6 @@ const PageFooter = ({maintenance}) => {
FAQs
- AirDropBobaScope
diff --git a/packages/boba/gateway/src/containers/VoteAndDao/Dao/Dao.js b/packages/boba/gateway/src/containers/VoteAndDao/Dao/Dao.js
index e2c6b5d8ef..b832b9aecc 100644
--- a/packages/boba/gateway/src/containers/VoteAndDao/Dao/Dao.js
+++ b/packages/boba/gateway/src/containers/VoteAndDao/Dao/Dao.js
@@ -35,6 +35,7 @@ import { selectLockRecords } from 'selectors/veBobaSelector'
import {DividerLine} from 'containers/Global.styles'
import * as S from './Dao.styles'
+import { setConnectBOBA } from 'actions/setupAction'
const PROPOSAL_STATES = [
{ value: 'All', label: 'All' },
@@ -48,9 +49,7 @@ const PROPOSAL_STATES = [
{ value: 'Executed', label: 'Executed' }
]
-function DAO({
- connectToBOBA
-}) {
+function DAO() {
const dispatch = useDispatch()
@@ -79,6 +78,10 @@ function DAO({
}
}, [ accountEnabled, nftRecords ]);
+ async function connectToBOBA() {
+ dispatch(setConnectBOBA(true))
+ }
+
return (
diff --git a/packages/boba/gateway/src/containers/VoteAndDao/Dao/OldDao.js b/packages/boba/gateway/src/containers/VoteAndDao/Dao/OldDao.js
new file mode 100644
index 0000000000..78953dbcab
--- /dev/null
+++ b/packages/boba/gateway/src/containers/VoteAndDao/Dao/OldDao.js
@@ -0,0 +1,207 @@
+/*
+Copyright 2021-present Boba Network.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */
+
+import React, { useEffect, useState } from 'react'
+import { useDispatch, useSelector } from 'react-redux'
+
+import { Box, Typography } from '@mui/material'
+import { openError, openModal } from 'actions/uiAction'
+import { orderBy } from 'lodash'
+
+import Button from 'components/button/Button'
+import ListProposal from 'components/listProposal/listProposal'
+
+import Select from 'components/select/Select'
+
+import { selectDaoBalance, selectDaoBalanceX, selectDaoVotes, selectDaoVotesX, selectProposals, selectProposalThreshold } from 'selectors/daoSelector'
+import { selectLoading } from 'selectors/loadingSelector'
+import { selectAccountEnabled, selectBaseEnabled, selectLayer } from 'selectors/setupSelector'
+
+import * as G from 'containers/Global.styles'
+import * as S from './OldDao.styles'
+import PageTitle from 'components/pageTitle/PageTitle'
+import Connect from 'containers/connect/Connect'
+import { fetchDaoBalance, fetchDaoBalanceX, fetchDaoProposals, fetchDaoVotes, fetchDaoVotesX, getProposalThreshold } from 'actions/daoAction'
+import { POLL_INTERVAL } from 'util/constant'
+import useInterval from 'hooks/useInterval'
+
+const PROPOSAL_STATES = [
+ { value: 'All', label: 'All' },
+ { value: 'Pending', label: 'Pending' },
+ { value: 'Active', label: 'Active' },
+ { value: 'Canceled', label: 'Canceled' },
+ { value: 'Defeated', label: 'Defeated' },
+ { value: 'Succeeded', label: 'Succeeded' },
+ { value: 'Queued', label: 'Queued' },
+ { value: 'Expired', label: 'Expired' },
+ { value: 'Executed', label: 'Executed' }
+]
+
+function OldDao() {
+
+ const dispatch = useDispatch()
+
+ const accountEnabled = useSelector(selectAccountEnabled())
+ const baseEnabled = useSelector(selectBaseEnabled())
+
+ const layer = useSelector(selectLayer());
+ const loading = useSelector(selectLoading([ 'PROPOSALS/GET' ]))
+
+ let proposals = useSelector(selectProposals)
+ proposals = orderBy(proposals, i => i.startTimestamp, 'desc')
+
+ const balance = useSelector(selectDaoBalance)
+ const balanceX = useSelector(selectDaoBalanceX)
+ const votes = useSelector(selectDaoVotes)
+ const votesX = useSelector(selectDaoVotesX)
+ const proposalThreshold = useSelector(selectProposalThreshold)
+
+ const [ selectedState, setSelectedState ] = useState(PROPOSAL_STATES[ 0 ])
+
+ useInterval(() => {
+ if(accountEnabled /*== MetaMask is connected*/) {
+ dispatch(fetchDaoBalance()) // account specific
+ dispatch(fetchDaoVotes()) // account specific
+ dispatch(fetchDaoBalanceX()) // account specific
+ dispatch(fetchDaoVotesX()) // account specific
+ }
+ if(baseEnabled /*== we only have have Base L1 and L2 providers*/) {
+ dispatch(getProposalThreshold())
+ dispatch(fetchDaoProposals())
+ }
+ }, POLL_INTERVAL)
+
+
+ useEffect(() => {
+ if (baseEnabled) {
+ dispatch(getProposalThreshold())
+ dispatch(fetchDaoProposals())
+ }
+ }, [dispatch, baseEnabled]);
+
+
+ return (
+
+
+
+
+
+
+ Balances
+ BOBA:
+ {!!layer ? Math.round(Number(balance)) : '--'}
+ xBOBA:
+ {!!layer ? Math.round(Number(balanceX)) : '--'}
+
+
+
+ Votes
+ Boba:
+ {!!layer ? Math.round(Number(votes)) : '--'}
+ xBoba:
+ {!!layer ? Math.round(Number(votesX)) : '--'}
+ Total:
+ {!!layer ? Math.round(Number(votes) + Number(votesX)) : '--'}
+ {layer === 'L2' &&
+
+
+
+
+ }
+
+ Only votes delegated BEFORE the start of the active voting period are counted in your vote
+
+
+
+
+
+
+ At least {proposalThreshold} BOBA + xBOBA are needed to create a new proposal
+
+
+
+
+
+ Proposals
+
+
+
+
+ {!!loading && !proposals.length ? Loading... : null}
+ {proposals
+ // eslint-disable-next-line array-callback-return
+ .filter((p) => {
+ if (selectedState.value === 'All') {
+ return true;
+ }
+ return selectedState.value === p.state;
+ })
+ .map((p, index) => {
+ return
+
+
+ })}
+
+
+
+
+ )
+}
+
+export default React.memo(OldDao)
diff --git a/packages/boba/gateway/src/containers/VoteAndDao/Dao/OldDao.styles.js b/packages/boba/gateway/src/containers/VoteAndDao/Dao/OldDao.styles.js
new file mode 100644
index 0000000000..d70538bca5
--- /dev/null
+++ b/packages/boba/gateway/src/containers/VoteAndDao/Dao/OldDao.styles.js
@@ -0,0 +1,103 @@
+import { styled } from '@mui/material/styles'
+import { Box } from "@mui/material"
+
+export const DaoPageContainer = styled(Box)(({ theme }) => ({
+ margin: '0px auto',
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent: 'space-around',
+ padding: '10px',
+ paddingTop: '0px',
+ width: '70%',
+ gap: '10px',
+ [theme.breakpoints.between('md', 'lg')]: {
+ width: '90%',
+ padding: '0px',
+ },
+ [theme.breakpoints.between('sm', 'md')]: {
+ width: '90%',
+ padding: '0px',
+ },
+ [theme.breakpoints.down('sm')]: {
+ width: '100%',
+ padding: '0px',
+ },
+
+}));
+
+export const DaoPageContent = styled(Box)(({ theme }) => ({
+ display: 'flex',
+ flexDirection: 'row',
+ justifyContent: 'center',
+ alignItems: 'flex-start',
+ paddingTop: '0px',
+ gap: '10px',
+ [theme.breakpoints.down('sm')]: {
+ flexDirection: 'column'
+ },
+}));
+
+export const DaoWalletContainer = styled(Box)(({ theme }) => ({
+ display: 'flex',
+ flexDirection: 'column',
+ padding: '0px 20px',
+ minHeight: '700px',
+ width: '30%',
+ gap: '10px',
+ borderRadius: theme.palette.primary.borderRadius,
+ background: theme.palette.background.secondary,
+ [theme.breakpoints.down('sm')]: {
+ width: '100%',
+ },
+}));
+
+export const DaoProposalContainer = styled(Box)(({ theme }) => ({
+ width: '70%',
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent: 'flex-start',
+ padding: '0 32px',
+ minHeight: '500px',
+ borderRadius: theme.palette.primary.borderRadius,
+ background: theme.palette.background.secondary,
+ [theme.breakpoints.down('sm')]: {
+ width: '100%',
+ padding: '0 20px',
+ },
+}));
+
+export const DaoProposalHead = styled(Box)(({ theme }) => ({
+ display: 'flex',
+ alignItems: 'center',
+ alignSelf: 'flex-start',
+ justifyContent: 'space-between',
+ padding: '15px 0px',
+ width: '100%',
+ margin: '5px',
+ [theme.breakpoints.down('sm')]: {
+ padding: '0px',
+ },
+}))
+
+export const DaoProposalListContainer = styled(Box)(({ theme }) => ({
+ overflowY: 'auto',
+ margin: '10px auto',
+ borderRadius: '8px',
+ padding: '20px 10px',
+ width: '100%',
+ height: '600px',
+ '.loadingContainer' : {
+ padding: '10px auto',
+ },
+ [theme.breakpoints.down('sm')]: {
+ padding: '0px',
+ },
+}))
+
+export const DaoWalletAction = styled(Box)(({ theme }) => ({
+ display: 'flex',
+ justifyContent: 'space-around',
+ width: '100%',
+ margin: '10px auto',
+ gap: '10px',
+}));
diff --git a/packages/boba/gateway/src/containers/VoteAndDao/index.js b/packages/boba/gateway/src/containers/VoteAndDao/index.js
index d6b5523e97..6717cb1054 100644
--- a/packages/boba/gateway/src/containers/VoteAndDao/index.js
+++ b/packages/boba/gateway/src/containers/VoteAndDao/index.js
@@ -95,9 +95,7 @@ function VoteAndDAO() {
- : }
+ : }
diff --git a/packages/boba/gateway/src/containers/airdrop/Airdrop.js b/packages/boba/gateway/src/containers/airdrop/Airdrop.js
deleted file mode 100644
index e2852b4394..0000000000
--- a/packages/boba/gateway/src/containers/airdrop/Airdrop.js
+++ /dev/null
@@ -1,385 +0,0 @@
-
-import React from 'react'
-import { connect } from 'react-redux'
-
-import { isEqual } from 'lodash'
-import moment from 'moment'
-import truncate from 'truncate-middle'
-
-import { Box, Grid, Typography } from '@mui/material'
-
-import * as S from './Airdrop.styles'
-
-import Button from 'components/button/Button'
-import PageTitle from 'components/pageTitle/PageTitle'
-
-import networkService from 'services/networkService'
-
-import { openAlert } from 'actions/uiAction'
-import { initiateAirdrop, getAirdropL1, getAirdropL2 } from 'actions/airdropAction'
-
-import { logAmount } from 'util/amountConvert'
-
-import Connect from 'containers/connect/Connect'
-
-class Airdrop extends React.Component {
-
- constructor(props) {
-
- super(props)
-
- const {
- claimDetailsL1,
- claimDetailsL2
- } = this.props.airdrop
-
- const {
- layer2,
- } = this.props.balance
-
- const {
- accountEnabled,
- netLayer
- } = this.props.setup
-
- this.state = {
- claimDetailsL1,
- claimDetailsL2,
- layer2,
- netLayer,
- accountEnabled,
- walletAddress: networkService.account ? truncate(networkService.account, 6, 4, '...') : ''
- }
-
- }
-
- componentDidUpdate(prevState) {
-
- const { claimDetailsL1, claimDetailsL2 } = this.props.airdrop
- const { layer2 } = this.props.balance
- const { accountEnabled, netLayer } = this.props.setup
-
- if (!isEqual(prevState.airdrop.claimDetailsL1, claimDetailsL1)) {
- this.setState({ claimDetailsL1 })
- }
-
- if (!isEqual(prevState.airdrop.claimDetailsL2, claimDetailsL2)) {
- this.setState({ claimDetailsL2 })
- }
-
- if (!isEqual(prevState.balance.layer2, layer2)) {
- this.setState({ layer2 })
- }
-
- if (!isEqual(prevState.setup.netLayer, netLayer)) {
- this.setState({ netLayer })
- }
-
- if (!isEqual(prevState.setup.accountEnabled, accountEnabled)) {
- this.setState({ accountEnabled })
- }
-
- }
-
- async initiateDrop() {
-
- console.log('initiateAirdrop:', this.state.claimDetailsL1)
-
- let res = await this.props.dispatch(initiateAirdrop(this.state.claimDetailsL1))
-
- if (res) {
- this.props.dispatch(openAlert(`Your claim for L1 snapshot balances has been initiated. You will receive your BOBA in 30 days.`))
- }
-
- }
-
- async airdropL1() {
-
- console.log('airdropL1:', this.state.claimDetailsL1)
-
- let res = await this.props.dispatch(getAirdropL1(this.state.claimDetailsL1))
-
- if (res) {
- this.props.dispatch(openAlert(`L1 claim successful.`))
- }
-
- }
-
- async airdropL2() {
-
- console.log('airdropL2')
-
- let res = await this.props.dispatch(getAirdropL2(this.state.claimDetailsL2))
-
- if (res) {
- this.props.dispatch(openAlert(`L2 claim successful.`))
- }
-
- }
-
- render() {
-
- const {
- claimDetailsL1,
- claimDetailsL2,
- layer2,
- walletAddress,
- netLayer,
- accountEnabled
- } = this.state
-
- let omgBalance = layer2.filter((i) => {
- if (i.symbol === 'OMG') return true
- return false
- })
-
- let omgWeiString = '0'
- if (typeof (omgBalance[ 0 ]) !== 'undefined') {
- console.log("omgBalance:", omgBalance[ 0 ])
- omgWeiString = omgBalance[ 0 ].balance.toString()
- }
-
- let l2BalanceOMG = Number(logAmount(omgWeiString, 18))
-
- let recordFoundL1 = false
- let snapValueL1 = 0
- let claimedL1 = false
- let claimedL1time = 0
- let unlockL1time = 0
- let isUnlocked = false
- if (claimDetailsL1 && claimDetailsL1.hasOwnProperty('amount') && claimDetailsL1.amount !== 0) {
- recordFoundL1 = true
- snapValueL1 = Number(logAmount(claimDetailsL1.amount, 18))
- console.log("L1 snapvalue:", snapValueL1)
- }
- if (claimDetailsL1 && claimDetailsL1.hasOwnProperty('claimed') && claimDetailsL1.claimed === 1) {
- claimedL1 = true
- claimedL1time = moment.unix(claimDetailsL1.claimedTimestamp).format('MM/DD/YYYY hh:mm a')
- }
- /*not yet claimed, but initiated*/
- if (claimDetailsL1 && claimDetailsL1.hasOwnProperty('claimUnlockTime') && claimDetailsL1.claimUnlockTime !== null && claimDetailsL1.claimed === 0) {
- unlockL1time = moment.unix(claimDetailsL1.claimUnlockTime).format('MM/DD/YYYY hh:mm a')
- isUnlocked = moment().isAfter(moment.unix(claimDetailsL1.claimUnlockTime))
- }
-
- let recordFoundL2 = false
- let snapValueL2 = 0
- let claimedL2 = false
- let claimedL2time = 0
- if (claimDetailsL2 && claimDetailsL2.hasOwnProperty('amount') && claimDetailsL2.amount !== 0) {
- recordFoundL2 = true
- snapValueL2 = Number(logAmount(claimDetailsL2.amount, 18))
- }
- if (claimDetailsL2 && claimDetailsL2.hasOwnProperty('claimed') && claimDetailsL2.claimed === 1) {
- claimedL2 = true
- claimedL2time = moment.unix(claimDetailsL2.claimedTimestamp).format('MM/DD/YYYY hh:mm a')
- }
-
- return (
-
-
-
-
-
- {netLayer === 'L2' &&
-
-
-
- L1 Airdrop
-
-
- {/* STATE 1 - NO OMG ON L1 DURING SNAPSHOT */}
- {!recordFoundL1 &&
-
- There is no record of OMG in this specific non-custodial address ({walletAddress}) on Ethereum during the snapshot.
-
If you had OMG on Ethereum during the snapshot,
- but are getting this message, please double check to make sure that you are accessing the gateway with
- the correct account/address.
-
Be advised that this claim tab has nothing to do with the exchanges.
- If you held OMG at an exchange during the L1 snapshot, the exchange, if it supported the airdrop, will
- drop your BOBA to you.
-
- }
-
- {/* STATE 2 - OMG ON L1 DURING SNAPSHOT AND NOT CLAIMED AND NOT INITIATED AND ENOUGH OMG ON L2 RIGHT NOW */}
- {recordFoundL1 && (snapValueL1 > 0) && (l2BalanceOMG > snapValueL1 * 0.97) && (claimedL1 === false) && (unlockL1time === 0) &&
- <>
-
- Yes, there was an OMG balance of {snapValueL1} on Ethereum during the snapshot.
- Also, you have enough OMG on Boba to claim your airdrop.
-
-
- >
- }
-
- {/* STATE 3 - OMG ON L1 DURING SNAPSHOT AND NOT CLAIMED AND NOT INITIATED BUT NOT ENOUGH OMG ON L2 */}
- {recordFoundL1 && (snapValueL1 > 0) && (l2BalanceOMG <= snapValueL1 * 0.97) && (claimedL1 === false) && (unlockL1time === 0) &&
-
- Yes, there was a balance of {snapValueL1} OMG on Ethereum during the snapshot.
- However, your current OMG balance on Boba is only {l2BalanceOMG}.
- Please bridge {(snapValueL1 - l2BalanceOMG) * 0.99} or more OMG to Boba to claim your airdrop.
-
- }
-
- {/* STATE 4 - INITIATED BUT TOO EARLY */}
- {recordFoundL1 && (unlockL1time !== 0) && (isUnlocked === false) &&
- <>
-
- Airdrop initiated
-
-
- The unlock time is {unlockL1time}.
- After that, you will be able to claim your L1 snapshot BOBA.
-
- >
- }
-
- {/* STATE 5 - INITIATED AND READY TO AIRDROP */}
- {isUnlocked &&
- <>
-
- The unlock time of {unlockL1time} has passed. You can now claim your L1 snapshot BOBA.
-
-
- >
- }
-
- {/* STATE 6 - CLAIMED */}
- {!!claimedL1 &&
- <>
-
- Airdrop completed
-
-
- You claimed your L1 snapshot BOBA at {claimedL1time}.
-
- >
- }
-
-
-
-
-
- L2 Airdrop
-
-
-
- {!recordFoundL2 &&
-
- There is no record of OMG in this specific non-custodial address ({walletAddress}) on Boba during the snapshot.
-
If you had OMG on Boba during the snapshot,
- but are getting this message, please double check to make sure that you are accessing the gateway with
- the correct account/address.
-
Be advised that this claim tab has nothing to do with the exchanges.
- If you held OMG at an exchange during the L1 snapshot, the exchange, if it supported the airdrop, will
- drop your BOBA to you.
-
- }
-
- {recordFoundL2 && snapValueL2 > 0 && claimedL2 === false &&
- <>
-
- There was a balance of {snapValueL2 * (100 / 105)} OMG on Boba during the snapshot.
- You will receive {snapValueL2} BOBA (OMG balance + 5%).
-
-
- >
- }
-
- {!!claimedL2 &&
- <>
-
- Airdrop completed
-
-
- You claimed your L2 snapshot BOBA at {claimedL2time}.
-
- >
- }
-
-
-
- }
-
- )
- }
-}
-
-const mapStateToProps = state => ({
- airdrop: state.airdrop,
- balance: state.balance,
- setup: state.setup,
-})
-
-export default connect(mapStateToProps)(Airdrop)
diff --git a/packages/boba/gateway/src/containers/airdrop/Airdrop.module.scss b/packages/boba/gateway/src/containers/airdrop/Airdrop.module.scss
deleted file mode 100644
index 56ef28ea26..0000000000
--- a/packages/boba/gateway/src/containers/airdrop/Airdrop.module.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-@import 'index.scss';
-
-.container {
- display: flex;
- flex-direction: column;
- padding: 10px;
- padding-top: 0px;
-
- .header {
- h2 {
- margin-bottom: 0;
- padding-left: 10px;
- color: $white;
- }
-
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- }
-
- .content {
- margin: 10px auto;
- display: flex;
- flex-direction: column;
- width: 100%;
-
- .action {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- align-items: center;
-
- .transferContainer, .delegateContainer {
- margin: auto;
- border-radius: 12px;
- padding: 20px;
- display: flex;
- flex-direction: column;
- background: $background400;
- max-width: 40%;
- width: 40%;
- min-width: 400px;
- .info {
- text-align: center;
- .title {
- font-size: 1.4em;
- color: $white;
- }
- .subTitle {
- font-size: 1.2em;
- color: $white700;
- margin: 10px;
- }
- .helpText {
- font-size: 0.8em;
- margin: 10px;
- color: $white700;
- margin: 10px;
- }
- }
- }
-
- }
- }
-
-}
\ No newline at end of file
diff --git a/packages/boba/gateway/src/containers/airdrop/Airdrop.styles.js b/packages/boba/gateway/src/containers/airdrop/Airdrop.styles.js
deleted file mode 100644
index 3650fa7913..0000000000
--- a/packages/boba/gateway/src/containers/airdrop/Airdrop.styles.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { styled } from '@mui/material/styles'
-import { Box } from "@mui/material"
-
-export const AirDropPageContainer = styled(Box)(({ theme }) => ({
- margin: '0px auto',
- display: 'flex',
- flexDirection: 'column',
- justifyContent: 'space-around',
- padding: '10px',
- paddingTop: '0px',
- width: '70%',
- [ theme.breakpoints.between('md', 'lg') ]: {
- width: '90%',
- padding: '0px',
- },
- [ theme.breakpoints.between('sm', 'md') ]: {
- width: '90%',
- padding: '0px',
- },
- [ theme.breakpoints.down('sm') ]: {
- width: '100%',
- padding: '0px',
- },
-}));
diff --git a/packages/boba/gateway/src/containers/home/Home.js b/packages/boba/gateway/src/containers/home/Home.js
index c5ce452525..9d261353c1 100644
--- a/packages/boba/gateway/src/containers/home/Home.js
+++ b/packages/boba/gateway/src/containers/home/Home.js
@@ -27,19 +27,7 @@ import networkService from 'services/networkService'
/**** ACTIONS and SELECTORS *****/
import { setBaseState } from 'actions/setupAction'
-import {
- fetchDaoBalance,
- fetchDaoVotes,
- fetchDaoBalanceX,
- fetchDaoVotesX,
- fetchDaoProposals,
- getProposalThreshold
-} from 'actions/daoAction'
-import {
- fetchAirdropStatusL1,
- fetchAirdropStatusL2
-} from 'actions/airdropAction'
import { checkVersion } from 'actions/serviceAction'
import { closeAlert, closeError } from 'actions/uiAction'
import { getFS_Saves, getFS_Info } from 'actions/fixedAction'
@@ -165,8 +153,6 @@ function Home() {
if (initialized === 'enabled') {
console.log("Network Base Providers are up")
dispatch(setBaseState(true))
- // load DAO to speed up the process
- dispatch(fetchDaoProposals())
return true
}
}
@@ -176,28 +162,17 @@ function Home() {
useInterval(() => {
if(accountEnabled /*== MetaMask is connected*/) {
dispatch(fetchBalances()) // account specific
- dispatch(fetchAirdropStatusL1()) // account specific
- dispatch(fetchAirdropStatusL2()) // account specific
- dispatch(fetchDaoBalance()) // account specific
- dispatch(fetchDaoVotes()) // account specific
- dispatch(fetchDaoBalanceX()) // account specific
- dispatch(fetchDaoVotesX()) // account specific
dispatch(fetchExits()) // account specific
dispatch(getFS_Saves()) // account specific
dispatch(getFS_Info()) // account specific
dispatch(getMonsterInfo()) // account specific
}
- if(baseEnabled /*== we only have have Base L1 and L2 providers*/) {
- dispatch(getProposalThreshold())
- dispatch(fetchDaoProposals())
- }
}, POLL_INTERVAL)
useEffect(() => {
if (maintenance) return
// load the following functions when the home page is open
checkVersion()
- dispatch(getProposalThreshold())
}, [ dispatch, maintenance ])
useEffect(() => {
diff --git a/packages/boba/gateway/src/containers/modals/dao/old/NewProposalModalOldDao.js b/packages/boba/gateway/src/containers/modals/dao/old/NewProposalModalOldDao.js
new file mode 100644
index 0000000000..4bfddb550e
--- /dev/null
+++ b/packages/boba/gateway/src/containers/modals/dao/old/NewProposalModalOldDao.js
@@ -0,0 +1,268 @@
+/*
+Copyright 2021-present Boba Network.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */
+
+import React, { useState } from 'react'
+import { Box, Typography } from '@mui/material'
+
+import { useDispatch, useSelector } from 'react-redux'
+import { closeModal, openAlert } from 'actions/uiAction'
+import Modal from 'components/modal/Modal'
+import Button from 'components/button/Button'
+import Input from 'components/input/Input'
+// import Select from 'react-select'
+import Select from 'components/select/Select'
+
+import { createDaoProposal } from 'actions/daoAction'
+import { selectProposalThreshold } from 'selectors/daoSelector'
+import BobaGlassIcon from 'components/icons/BobaGlassIcon'
+
+function NewProposalModal({ open }) {
+
+ const dispatch = useDispatch()
+
+ const [ action, setAction ] = useState('')
+ const [ votingThreshold, setVotingThreshold ] = useState('')
+
+ const [ LPfeeMin, setLPfeeMin ] = useState('')
+ const [ LPfeeMax, setLPfeeMax ] = useState('')
+ const [ LPfeeOwn, setLPfeeOwn ] = useState('')
+
+ const [ proposeText, setProposeText ] = useState('')
+ const [ proposalUri, setProposalUri ] = useState('')
+
+ const loading = false //ToDo useSelector(selectLoading([ 'PROPOSAL_DAO/CREATE' ]))
+
+
+ const proposalThreshold = useSelector(selectProposalThreshold)
+
+ const onActionChange = (e) => {
+ setVotingThreshold('')
+ setLPfeeMin('')
+ setLPfeeMax('')
+ setLPfeeOwn('')
+ setProposeText('')
+ setProposalUri('')
+ setAction(e.target.value)
+ }
+
+ function handleClose() {
+ setVotingThreshold('')
+ setLPfeeMin('')
+ setLPfeeMax('')
+ setLPfeeOwn('')
+ setAction('')
+ setProposeText('')
+ setProposalUri('')
+ dispatch(closeModal('newProposalModal'))
+ }
+
+ const options = [
+ { value: 'change-threshold', label: 'Change Voting Threshold', title: 'Change Voting Threshold' },
+ { value: 'text-proposal', label: 'Freeform Text Proposal', title: 'Freeform Text Proposal' },
+ { value: 'change-lp1-fee', label: 'Change L1 LP fees', title: 'Change L1 LP fees' },
+ { value: 'change-lp2-fee', label: 'Change L2 LP fees', title: 'Change L2 LP fees' }
+ ]
+
+ const customStyles = {
+ option: (provided, state) => ({
+ ...provided,
+ color: state.isSelected ? '#282828' : '#909090',
+ }),
+ }
+
+ const submit = async () => {
+
+ let res = null
+
+ if (action === 'change-threshold') {
+ res = await dispatch(createDaoProposal({
+ action,
+ value: [ votingThreshold ],
+ text: '' //extra text if any
+ }))
+ } else if (action === 'text-proposal') {
+ res = await dispatch(createDaoProposal({
+ action,
+ text: `${proposeText}@@${proposalUri}`
+ }))
+ } else if (action === 'change-lp1-fee' || action === 'change-lp2-fee') {
+ res = await dispatch(createDaoProposal({
+ action,
+ value: [ Math.round(Number(LPfeeMin) * 10), Math.round(Number(LPfeeMax) * 10), Math.round(Number(LPfeeOwn) * 10) ],
+ text: '' //extra text if any
+ }))
+ }
+
+ if (res) {
+ dispatch(openAlert(`Proposal has been submitted. It will be listed soon`))
+ }
+ handleClose()
+ }
+
+ const disabled = () => {
+ if (action === 'change-threshold') {
+ return !votingThreshold
+ } else if (action === 'text-proposal') {
+ return !proposeText
+ } else if (action === 'change-lp1-fee' || action === 'change-lp2-fee') {
+ if (Number(LPfeeMin) < 0.0 || Number(LPfeeMin) > 5.0) {
+ return true //aka disabled
+ }
+ if (Number(LPfeeMax) < 0.0 || Number(LPfeeMax) > 5.0) {
+ return true //aka disabled
+ }
+ if (Number(LPfeeMax) <= Number(LPfeeMin)) {
+ return true //aka disabled
+ }
+ if (Number(LPfeeOwn) < 0.0 || Number(LPfeeOwn) > 5.0) {
+ return true
+ }
+ if (LPfeeMin === '') {
+ return true
+ }
+ if (LPfeeMax === '') {
+ return true
+ }
+ if (LPfeeOwn === '') {
+ return true
+ }
+ return false
+ }
+ }
+
+ return (
+
+
+
+
+
+ New Proposal
+
+
+
+
+ {action === '' &&
+
+ Currently, the DAO can change the voting threshold, propose free-form text proposals, and
+ change to the bridge fee limits for the L1 and L2 bridge pools.
+
+ }
+
+ {action === 'change-threshold' &&
+ <>
+
+ The minimum number of votes required for an account to create a proposal. The current value is {proposalThreshold}.
+
+ setVotingThreshold(i.target.value)}
+ fullWidth
+ sx={{ marginBottom: '20px' }}
+ />
+ >
+ }
+ {(action === 'change-lp1-fee' || action === 'change-lp2-fee') &&
+ <>
+
+ Possible settings range from 0.0% to 5.0%.
+ All three values must be specified and the maximum fee must be larger than the minimum fee.
+
+ setLPfeeMin(i.target.value)}
+ fullWidth
+ />
+ setLPfeeMax(i.target.value)}
+ fullWidth
+ />
+ setLPfeeOwn(i.target.value)}
+ fullWidth
+ />
+ >
+ }
+ {action === 'text-proposal' &&
+ <>
+
+ Your proposal title is limited to 100 characters. Use the link field below to provide more information.
+
+ setProposeText(i.target.value.slice(0, 100))}
+ />
+
+ You should provide additional information (technical specifications, diagrams, forum threads, and other material) on a seperate
+ website. The link length is limited to 150 characters. You may need to use a link shortener.
+
+ setProposalUri(i.target.value.slice(0, 150))}
+ />
+ >
+ }
+
+
+
+
+
+
+ )
+}
+
+export default React.memo(NewProposalModal)
diff --git a/packages/boba/gateway/src/deployment/contracts/BobaAirdrop.json b/packages/boba/gateway/src/deployment/contracts/BobaAirdrop.json
deleted file mode 100644
index 6eb774afa8..0000000000
--- a/packages/boba/gateway/src/deployment/contracts/BobaAirdrop.json
+++ /dev/null
@@ -1,229 +0,0 @@
-{
- "_format": "hh-sol-artifact-1",
- "contractName": "BobaAirdrop",
- "sourceName": "contracts/BobaAirdrop.sol",
- "abi": [
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token_",
- "type": "address"
- },
- {
- "internalType": "bytes32",
- "name": "merkleRoot_",
- "type": "bytes32"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "Claimed",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "OwnerWithdraw",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "previousOwner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "bytes32",
- "name": "newRoot",
- "type": "bytes32"
- }
- ],
- "name": "RootUpdated",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "bytes32[]",
- "name": "merkleProof",
- "type": "bytes32[]"
- }
- ],
- "name": "claim",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- }
- ],
- "name": "isClaimed",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "merkleRoot",
- "outputs": [
- {
- "internalType": "bytes32",
- "name": "",
- "type": "bytes32"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "token",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes32",
- "name": "newMerkleRoot",
- "type": "bytes32"
- }
- ],
- "name": "updateRoot",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "withdrawFunds",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
- ],
- "bytecode": "0x608060405234801561001057600080fd5b50604051610e37380380610e3783398101604081905261002f916100bc565b61003f61003a610068565b61006c565b600180546001600160a01b0319166001600160a01b0393909316929092179091556002556100f4565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100ce578182fd5b82516001600160a01b03811681146100e4578283fd5b6020939093015192949293505050565b610d34806101036000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063715018a6116100765780639e34070f1161005b5780639e34070f1461011e578063f2fde38b1461013e578063fc0c546a14610151576100a3565b8063715018a6146101015780638da5cb5b14610109576100a3565b8063155dd5ee146100a857806321ff9970146100bd5780632e7ba6ef146100d05780632eb4a7ab146100e3575b600080fd5b6100bb6100b6366004610965565b610159565b005b6100bb6100cb366004610965565b6102ef565b6100bb6100de36600461097d565b610397565b6100eb6105a9565b6040516100f89190610aa9565b60405180910390f35b6100bb6105af565b61011161062e565b6040516100f89190610a57565b61013161012c366004610965565b61064a565b6040516100f89190610a9e565b6100bb61014c366004610924565b61068d565b610111610759565b610161610775565b73ffffffffffffffffffffffffffffffffffffffff1661017f61062e565b73ffffffffffffffffffffffffffffffffffffffff16146101d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b60405180910390fd5b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb9061022d9033908590600401610a78565b602060405180830381600087803b15801561024757600080fd5b505af115801561025b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027f9190610945565b6102b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610b7d565b7fa20809e697380eaea0fd13bf4d14b00e2ef29559ef361501189d3be2e9b0ec85816040516102e49190610aa9565b60405180910390a150565b6102f7610775565b73ffffffffffffffffffffffffffffffffffffffff1661031561062e565b73ffffffffffffffffffffffffffffffffffffffff1614610362576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b60028190556040517f2cbc14f49c068133583f7cb530018af451c87c1cf1327cf2a4ff4698c4730aa4906102e4908390610aa9565b6103a08561064a565b156103d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610be9565b60008585856040516020016103ee93929190610a1c565b604051602081830303815290604052805190602001209050610447838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610779565b61047d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610b46565b6104868661084d565b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906104de9088908890600401610a78565b602060405180830381600087803b1580156104f857600080fd5b505af115801561050c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105309190610945565b610566576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610b0f565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02686868660405161059993929190610c46565b60405180910390a1505050505050565b60025481565b6105b7610775565b73ffffffffffffffffffffffffffffffffffffffff166105d561062e565b73ffffffffffffffffffffffffffffffffffffffff1614610622576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b61062c600061088b565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60008061065961010084610c72565b9050600061066961010085610ce4565b60009283526003602052604090922054600190921b9182169091149150505b919050565b610695610775565b73ffffffffffffffffffffffffffffffffffffffff166106b361062e565b73ffffffffffffffffffffffffffffffffffffffff1614610700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b73ffffffffffffffffffffffffffffffffffffffff811661074d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610ab2565b6107568161088b565b50565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b600081815b85518110156108425760008682815181106107c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116108035782816040516020016107e6929190610a0e565b60405160208183030381529060405280519060200120925061082f565b8083604051602001610816929190610a0e565b6040516020818303038152906040528051906020012092505b508061083a81610c86565b91505061077e565b509092149392505050565b600061085b61010083610c72565b9050600061086b61010084610ce4565b6000928352600360205260409092208054600190931b9092179091555050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461068857600080fd5b600060208284031215610935578081fd5b61093e82610900565b9392505050565b600060208284031215610956578081fd5b8151801515811461093e578182fd5b600060208284031215610976578081fd5b5035919050565b600080600080600060808688031215610994578081fd5b853594506109a460208701610900565b935060408601359250606086013567ffffffffffffffff808211156109c7578283fd5b818801915088601f8301126109da578283fd5b8135818111156109e8578384fd5b89602080830285010111156109fb578384fd5b9699959850939650602001949392505050565b918252602082015260400190565b92835260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166020830152603482015260540190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b90815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f426f626141697264726f703a205472616e73666572206661696c65642e000000604082015260600190565b6020808252601b908201527f426f626141697264726f703a20496e76616c69642070726f6f662e0000000000604082015260600190565b6020808252601d908201527f426f626141697264726f703a205769746864726177204661696c65642e000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526022908201527f426f626141697264726f703a2044726f7020616c726561647920636c61696d6560408201527f642e000000000000000000000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b600082610c8157610c81610cf8565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610cdd577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b5060010190565b600082610cf357610cf3610cf8565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c6343000800000a",
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063715018a6116100765780639e34070f1161005b5780639e34070f1461011e578063f2fde38b1461013e578063fc0c546a14610151576100a3565b8063715018a6146101015780638da5cb5b14610109576100a3565b8063155dd5ee146100a857806321ff9970146100bd5780632e7ba6ef146100d05780632eb4a7ab146100e3575b600080fd5b6100bb6100b6366004610965565b610159565b005b6100bb6100cb366004610965565b6102ef565b6100bb6100de36600461097d565b610397565b6100eb6105a9565b6040516100f89190610aa9565b60405180910390f35b6100bb6105af565b61011161062e565b6040516100f89190610a57565b61013161012c366004610965565b61064a565b6040516100f89190610a9e565b6100bb61014c366004610924565b61068d565b610111610759565b610161610775565b73ffffffffffffffffffffffffffffffffffffffff1661017f61062e565b73ffffffffffffffffffffffffffffffffffffffff16146101d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b60405180910390fd5b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb9061022d9033908590600401610a78565b602060405180830381600087803b15801561024757600080fd5b505af115801561025b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027f9190610945565b6102b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610b7d565b7fa20809e697380eaea0fd13bf4d14b00e2ef29559ef361501189d3be2e9b0ec85816040516102e49190610aa9565b60405180910390a150565b6102f7610775565b73ffffffffffffffffffffffffffffffffffffffff1661031561062e565b73ffffffffffffffffffffffffffffffffffffffff1614610362576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b60028190556040517f2cbc14f49c068133583f7cb530018af451c87c1cf1327cf2a4ff4698c4730aa4906102e4908390610aa9565b6103a08561064a565b156103d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610be9565b60008585856040516020016103ee93929190610a1c565b604051602081830303815290604052805190602001209050610447838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610779565b61047d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610b46565b6104868661084d565b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906104de9088908890600401610a78565b602060405180830381600087803b1580156104f857600080fd5b505af115801561050c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105309190610945565b610566576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610b0f565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02686868660405161059993929190610c46565b60405180910390a1505050505050565b60025481565b6105b7610775565b73ffffffffffffffffffffffffffffffffffffffff166105d561062e565b73ffffffffffffffffffffffffffffffffffffffff1614610622576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b61062c600061088b565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60008061065961010084610c72565b9050600061066961010085610ce4565b60009283526003602052604090922054600190921b9182169091149150505b919050565b610695610775565b73ffffffffffffffffffffffffffffffffffffffff166106b361062e565b73ffffffffffffffffffffffffffffffffffffffff1614610700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610bb4565b73ffffffffffffffffffffffffffffffffffffffff811661074d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101cc90610ab2565b6107568161088b565b50565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b600081815b85518110156108425760008682815181106107c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116108035782816040516020016107e6929190610a0e565b60405160208183030381529060405280519060200120925061082f565b8083604051602001610816929190610a0e565b6040516020818303038152906040528051906020012092505b508061083a81610c86565b91505061077e565b509092149392505050565b600061085b61010083610c72565b9050600061086b61010084610ce4565b6000928352600360205260409092208054600190931b9092179091555050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461068857600080fd5b600060208284031215610935578081fd5b61093e82610900565b9392505050565b600060208284031215610956578081fd5b8151801515811461093e578182fd5b600060208284031215610976578081fd5b5035919050565b600080600080600060808688031215610994578081fd5b853594506109a460208701610900565b935060408601359250606086013567ffffffffffffffff808211156109c7578283fd5b818801915088601f8301126109da578283fd5b8135818111156109e8578384fd5b89602080830285010111156109fb578384fd5b9699959850939650602001949392505050565b918252602082015260400190565b92835260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166020830152603482015260540190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b90815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f426f626141697264726f703a205472616e73666572206661696c65642e000000604082015260600190565b6020808252601b908201527f426f626141697264726f703a20496e76616c69642070726f6f662e0000000000604082015260600190565b6020808252601d908201527f426f626141697264726f703a205769746864726177204661696c65642e000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526022908201527f426f626141697264726f703a2044726f7020616c726561647920636c61696d6560408201527f642e000000000000000000000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b600082610c8157610c81610cf8565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610cdd577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b5060010190565b600082610cf357610cf3610cf8565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c6343000800000a",
- "linkReferences": {},
- "deployedLinkReferences": {}
-}
diff --git a/packages/boba/gateway/src/deployment/contracts/BobaAirdropSecond.json b/packages/boba/gateway/src/deployment/contracts/BobaAirdropSecond.json
deleted file mode 100644
index 7ca7c0f88a..0000000000
--- a/packages/boba/gateway/src/deployment/contracts/BobaAirdropSecond.json
+++ /dev/null
@@ -1,306 +0,0 @@
-{
- "_format": "hh-sol-artifact-1",
- "contractName": "BobaAirdropSecond",
- "sourceName": "contracts/BobaAirdropSecond.sol",
- "abi": [
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token_",
- "type": "address"
- },
- {
- "internalType": "bytes32",
- "name": "merkleRoot_",
- "type": "bytes32"
- },
- {
- "internalType": "address",
- "name": "omgL2Token_",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "Claimed",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "OwnerWithdraw",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "previousOwner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "bytes32[]",
- "name": "merkleProof",
- "type": "bytes32[]"
- }
- ],
- "name": "claim",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "bytes32[]",
- "name": "merkleProof",
- "type": "bytes32[]"
- }
- ],
- "name": "initiateClaim",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "initiateTimestamp",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- }
- ],
- "name": "isClaimed",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "merkleRoot",
- "outputs": [
- {
- "internalType": "bytes32",
- "name": "",
- "type": "bytes32"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "omgL2Token",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "timestamp",
- "type": "uint256"
- }
- ],
- "name": "setInitiateClaim",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "components": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "timestamp",
- "type": "uint256"
- }
- ],
- "internalType": "struct BobaAirdropSecond.claimBatch[]",
- "name": "_claims",
- "type": "tuple[]"
- }
- ],
- "name": "setInitiateClaimBatch",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "token",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "withdrawFunds",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
- ],
- "bytecode": "0x60806040523480156200001157600080fd5b50604051620014b0380380620014b08339810160408190526200003491620000f1565b620000486200004262000080565b62000084565b600180546001600160a01b039485166001600160a01b0319918216179091556002929092556003805491909316911617905562000131565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000ec57600080fd5b919050565b60008060006060848603121562000106578283fd5b6200011184620000d4565b9250602084015191506200012860408501620000d4565b90509250925092565b61136f80620001416000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80639e34070f1161008c578063c025fa8e11610066578063c025fa8e146101a0578063c15cf3c0146101b3578063f2fde38b146101bb578063fc0c546a146101ce576100df565b80639e34070f1461015a578063a69b0b991461017a578063bbce08411461018d576100df565b806368bf9a38116100bd57806368bf9a381461012a578063715018a61461013d5780638da5cb5b14610145576100df565b8063155dd5ee146100e45780632e7ba6ef146100f95780632eb4a7ab1461010c575b600080fd5b6100f76100f2366004610db7565b6101d6565b005b6100f7610107366004610de7565b610338565b610114610593565b6040516101219190610f39565b60405180910390f35b610114610138366004610c62565b610599565b6100f76105ab565b61014d610610565b6040516101219190610ee7565b61016d610168366004610db7565b61062c565b6040516101219190610f2e565b6100f7610188366004610c83565b61066f565b6100f761019b366004610cac565b6106f1565b6100f76101ae366004610e4d565b6107eb565b61014d61099a565b6100f76101c9366004610c62565b6109b6565b61014d610a4e565b6101de610a6a565b73ffffffffffffffffffffffffffffffffffffffff166101fc610610565b73ffffffffffffffffffffffffffffffffffffffff16146102385760405162461bcd60e51b815260040161022f90611190565b60405180910390fd5b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906102909033908590600401610f08565b602060405180830381600087803b1580156102aa57600080fd5b505af11580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e29190610d1c565b6102fe5760405162461bcd60e51b815260040161022f90611159565b7fa20809e697380eaea0fd13bf4d14b00e2ef29559ef361501189d3be2e9b0ec858160405161032d9190610f39565b60405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260056020526040902054849061037c5760405162461bcd60e51b815260040161022f9061106a565b6103858661062c565b156103a25760405162461bcd60e51b815260040161022f906111c5565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600560205260409020546103d59062278d0061124e565b4210156103f45760405162461bcd60e51b815260040161022f906110fc565b600086868660405160200161040b93929190610eac565b604051602081830303815290604052805190602001209050610464848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610a6e565b6104805760405162461bcd60e51b815260040161022f90611033565b61048987610b42565b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906104e19089908990600401610f08565b602060405180830381600087803b1580156104fb57600080fd5b505af115801561050f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105339190610d1c565b61054f5760405162461bcd60e51b815260040161022f90610ffc565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02687878760405161058293929190611222565b60405180910390a150505050505050565b60025481565b60056020526000908152604090205481565b6105b3610a6a565b73ffffffffffffffffffffffffffffffffffffffff166105d1610610565b73ffffffffffffffffffffffffffffffffffffffff16146106045760405162461bcd60e51b815260040161022f90611190565b61060e6000610b80565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60008061063b61010084611266565b9050600061064b610100856112f0565b60009283526004602052604090922054600190921b9182169091149150505b919050565b610677610a6a565b73ffffffffffffffffffffffffffffffffffffffff16610695610610565b73ffffffffffffffffffffffffffffffffffffffff16146106c85760405162461bcd60e51b815260040161022f90611190565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260056020526040902055565b6106f9610a6a565b73ffffffffffffffffffffffffffffffffffffffff16610717610610565b73ffffffffffffffffffffffffffffffffffffffff161461074a5760405162461bcd60e51b815260040161022f90611190565b60005b818110156107e6576000838383818110610790577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050604002018036038101906107a69190610d3c565b602080820151915173ffffffffffffffffffffffffffffffffffffffff1660009081526005909152604090205550806107de816112b7565b91505061074d565b505050565b8260646107f982605f61127a565b6108039190611266565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190610859903390600401610ee7565b60206040518083038186803b15801561087157600080fd5b505afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190610dcf565b10156108c75760405162461bcd60e51b815260040161022f9061109f565b33600090815260056020526040902054156108f45760405162461bcd60e51b815260040161022f90610f42565b600085338660405160200161090b93929190610eac565b604051602081830303815290604052805190602001209050610964848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610a6e565b6109805760405162461bcd60e51b815260040161022f90611033565b505033600090815260056020526040902042905550505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6109be610a6a565b73ffffffffffffffffffffffffffffffffffffffff166109dc610610565b73ffffffffffffffffffffffffffffffffffffffff1614610a0f5760405162461bcd60e51b815260040161022f90611190565b73ffffffffffffffffffffffffffffffffffffffff8116610a425760405162461bcd60e51b815260040161022f90610f9f565b610a4b81610b80565b50565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b600081815b8551811015610b37576000868281518110610ab7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101519050808311610af8578281604051602001610adb929190610e9e565b604051602081830303815290604052805190602001209250610b24565b8083604051602001610b0b929190610e9e565b6040516020818303038152906040528051906020012092505b5080610b2f816112b7565b915050610a73565b509092149392505050565b6000610b5061010083611266565b90506000610b60610100846112f0565b6000928352600460205260409092208054600190931b9092179091555050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461066a57600080fd5b60008083601f840112610c2a578182fd5b50813567ffffffffffffffff811115610c41578182fd5b6020830191508360208083028501011115610c5b57600080fd5b9250929050565b600060208284031215610c73578081fd5b610c7c82610bf5565b9392505050565b60008060408385031215610c95578081fd5b610c9e83610bf5565b946020939093013593505050565b60008060208385031215610cbe578182fd5b823567ffffffffffffffff80821115610cd5578384fd5b818501915085601f830112610ce8578384fd5b813581811115610cf6578485fd5b866020604083028501011115610d0a578485fd5b60209290920196919550909350505050565b600060208284031215610d2d578081fd5b81518015158114610c7c578182fd5b600060408284031215610d4d578081fd5b6040516040810181811067ffffffffffffffff82111715610d95577f4e487b710000000000000000000000000000000000000000000000000000000083526041600452602483fd5b604052610da183610bf5565b8152602083013560208201528091505092915050565b600060208284031215610dc8578081fd5b5035919050565b600060208284031215610de0578081fd5b5051919050565b600080600080600060808688031215610dfe578081fd5b85359450610e0e60208701610bf5565b935060408601359250606086013567ffffffffffffffff811115610e30578182fd5b610e3c88828901610c19565b969995985093965092949392505050565b60008060008060608587031215610e62578384fd5b8435935060208501359250604085013567ffffffffffffffff811115610e86578283fd5b610e9287828801610c19565b95989497509550505050565b918252602082015260400190565b92835260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166020830152603482015260540190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b90815260200190565b60208082526024908201527f426f626141697264726f703a20436c61696d20616c726561647920696e69746960408201527f6174656400000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f426f626141697264726f703a205472616e73666572206661696c65642e000000604082015260600190565b6020808252601b908201527f426f626141697264726f703a20496e76616c69642070726f6f662e0000000000604082015260600190565b6020808252818101527f426f626141697264726f703a20436c61696d206e6f7420696e69746961746564604082015260600190565b6020808252602b908201527f426f626141697264726f703a20636f727265637420616d6f756e74204f4d472060408201527f6e6f742062726964676564000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f426f626141697264726f703a20436c61696d20706572696f64206e6f7420656c60408201527f6170736564000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f426f626141697264726f703a205769746864726177204661696c65642e000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526022908201527f426f626141697264726f703a2044726f7020616c726561647920636c61696d6560408201527f642e000000000000000000000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b6000821982111561126157611261611304565b500190565b60008261127557611275611333565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156112b2576112b2611304565b500290565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156112e9576112e9611304565b5060010190565b6000826112ff576112ff611333565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c6343000800000a",
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80639e34070f1161008c578063c025fa8e11610066578063c025fa8e146101a0578063c15cf3c0146101b3578063f2fde38b146101bb578063fc0c546a146101ce576100df565b80639e34070f1461015a578063a69b0b991461017a578063bbce08411461018d576100df565b806368bf9a38116100bd57806368bf9a381461012a578063715018a61461013d5780638da5cb5b14610145576100df565b8063155dd5ee146100e45780632e7ba6ef146100f95780632eb4a7ab1461010c575b600080fd5b6100f76100f2366004610db7565b6101d6565b005b6100f7610107366004610de7565b610338565b610114610593565b6040516101219190610f39565b60405180910390f35b610114610138366004610c62565b610599565b6100f76105ab565b61014d610610565b6040516101219190610ee7565b61016d610168366004610db7565b61062c565b6040516101219190610f2e565b6100f7610188366004610c83565b61066f565b6100f761019b366004610cac565b6106f1565b6100f76101ae366004610e4d565b6107eb565b61014d61099a565b6100f76101c9366004610c62565b6109b6565b61014d610a4e565b6101de610a6a565b73ffffffffffffffffffffffffffffffffffffffff166101fc610610565b73ffffffffffffffffffffffffffffffffffffffff16146102385760405162461bcd60e51b815260040161022f90611190565b60405180910390fd5b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906102909033908590600401610f08565b602060405180830381600087803b1580156102aa57600080fd5b505af11580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e29190610d1c565b6102fe5760405162461bcd60e51b815260040161022f90611159565b7fa20809e697380eaea0fd13bf4d14b00e2ef29559ef361501189d3be2e9b0ec858160405161032d9190610f39565b60405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260056020526040902054849061037c5760405162461bcd60e51b815260040161022f9061106a565b6103858661062c565b156103a25760405162461bcd60e51b815260040161022f906111c5565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600560205260409020546103d59062278d0061124e565b4210156103f45760405162461bcd60e51b815260040161022f906110fc565b600086868660405160200161040b93929190610eac565b604051602081830303815290604052805190602001209050610464848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610a6e565b6104805760405162461bcd60e51b815260040161022f90611033565b61048987610b42565b6001546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906104e19089908990600401610f08565b602060405180830381600087803b1580156104fb57600080fd5b505af115801561050f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105339190610d1c565b61054f5760405162461bcd60e51b815260040161022f90610ffc565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02687878760405161058293929190611222565b60405180910390a150505050505050565b60025481565b60056020526000908152604090205481565b6105b3610a6a565b73ffffffffffffffffffffffffffffffffffffffff166105d1610610565b73ffffffffffffffffffffffffffffffffffffffff16146106045760405162461bcd60e51b815260040161022f90611190565b61060e6000610b80565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60008061063b61010084611266565b9050600061064b610100856112f0565b60009283526004602052604090922054600190921b9182169091149150505b919050565b610677610a6a565b73ffffffffffffffffffffffffffffffffffffffff16610695610610565b73ffffffffffffffffffffffffffffffffffffffff16146106c85760405162461bcd60e51b815260040161022f90611190565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260056020526040902055565b6106f9610a6a565b73ffffffffffffffffffffffffffffffffffffffff16610717610610565b73ffffffffffffffffffffffffffffffffffffffff161461074a5760405162461bcd60e51b815260040161022f90611190565b60005b818110156107e6576000838383818110610790577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050604002018036038101906107a69190610d3c565b602080820151915173ffffffffffffffffffffffffffffffffffffffff1660009081526005909152604090205550806107de816112b7565b91505061074d565b505050565b8260646107f982605f61127a565b6108039190611266565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190610859903390600401610ee7565b60206040518083038186803b15801561087157600080fd5b505afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190610dcf565b10156108c75760405162461bcd60e51b815260040161022f9061109f565b33600090815260056020526040902054156108f45760405162461bcd60e51b815260040161022f90610f42565b600085338660405160200161090b93929190610eac565b604051602081830303815290604052805190602001209050610964848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610a6e565b6109805760405162461bcd60e51b815260040161022f90611033565b505033600090815260056020526040902042905550505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6109be610a6a565b73ffffffffffffffffffffffffffffffffffffffff166109dc610610565b73ffffffffffffffffffffffffffffffffffffffff1614610a0f5760405162461bcd60e51b815260040161022f90611190565b73ffffffffffffffffffffffffffffffffffffffff8116610a425760405162461bcd60e51b815260040161022f90610f9f565b610a4b81610b80565b50565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b600081815b8551811015610b37576000868281518110610ab7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101519050808311610af8578281604051602001610adb929190610e9e565b604051602081830303815290604052805190602001209250610b24565b8083604051602001610b0b929190610e9e565b6040516020818303038152906040528051906020012092505b5080610b2f816112b7565b915050610a73565b509092149392505050565b6000610b5061010083611266565b90506000610b60610100846112f0565b6000928352600460205260409092208054600190931b9092179091555050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461066a57600080fd5b60008083601f840112610c2a578182fd5b50813567ffffffffffffffff811115610c41578182fd5b6020830191508360208083028501011115610c5b57600080fd5b9250929050565b600060208284031215610c73578081fd5b610c7c82610bf5565b9392505050565b60008060408385031215610c95578081fd5b610c9e83610bf5565b946020939093013593505050565b60008060208385031215610cbe578182fd5b823567ffffffffffffffff80821115610cd5578384fd5b818501915085601f830112610ce8578384fd5b813581811115610cf6578485fd5b866020604083028501011115610d0a578485fd5b60209290920196919550909350505050565b600060208284031215610d2d578081fd5b81518015158114610c7c578182fd5b600060408284031215610d4d578081fd5b6040516040810181811067ffffffffffffffff82111715610d95577f4e487b710000000000000000000000000000000000000000000000000000000083526041600452602483fd5b604052610da183610bf5565b8152602083013560208201528091505092915050565b600060208284031215610dc8578081fd5b5035919050565b600060208284031215610de0578081fd5b5051919050565b600080600080600060808688031215610dfe578081fd5b85359450610e0e60208701610bf5565b935060408601359250606086013567ffffffffffffffff811115610e30578182fd5b610e3c88828901610c19565b969995985093965092949392505050565b60008060008060608587031215610e62578384fd5b8435935060208501359250604085013567ffffffffffffffff811115610e86578283fd5b610e9287828801610c19565b95989497509550505050565b918252602082015260400190565b92835260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166020830152603482015260540190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b90815260200190565b60208082526024908201527f426f626141697264726f703a20436c61696d20616c726561647920696e69746960408201527f6174656400000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f426f626141697264726f703a205472616e73666572206661696c65642e000000604082015260600190565b6020808252601b908201527f426f626141697264726f703a20496e76616c69642070726f6f662e0000000000604082015260600190565b6020808252818101527f426f626141697264726f703a20436c61696d206e6f7420696e69746961746564604082015260600190565b6020808252602b908201527f426f626141697264726f703a20636f727265637420616d6f756e74204f4d472060408201527f6e6f742062726964676564000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f426f626141697264726f703a20436c61696d20706572696f64206e6f7420656c60408201527f6170736564000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f426f626141697264726f703a205769746864726177204661696c65642e000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526022908201527f426f626141697264726f703a2044726f7020616c726561647920636c61696d6560408201527f642e000000000000000000000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b6000821982111561126157611261611304565b500190565b60008261127557611275611333565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156112b2576112b2611304565b500290565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156112e9576112e9611304565b5060010190565b6000826112ff576112ff611333565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c6343000800000a",
- "linkReferences": {},
- "deployedLinkReferences": {}
-}
diff --git a/packages/boba/gateway/src/layout/index.js b/packages/boba/gateway/src/layout/index.js
index 90890ff3bd..ee58d333bc 100644
--- a/packages/boba/gateway/src/layout/index.js
+++ b/packages/boba/gateway/src/layout/index.js
@@ -28,7 +28,6 @@ import Notification from 'containers/notification/Notification'
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom"
import { selectModalState } from 'selectors/uiSelector'
-import Airdrop from 'containers/airdrop/Airdrop'
import Transactions from 'containers/history/History'
import BobaScope from 'containers/bobaScope/BobaScope'
import Help from 'containers/help/Help'
@@ -40,8 +39,9 @@ import Lock from 'containers/veboba/Lock'
import FarmWrapper from 'containers/farm/FarmWrapper'
import SaveWrapper from 'containers/save/SaveWrapper'
import Projects from 'containers/ecosystem/Projects'
-import { ROUTES_PATH } from 'util/constant'
+import { DISABLE_VE_DAO, ROUTES_PATH } from 'util/constant'
import VoteAndDao from 'containers/VoteAndDao'
+import OldDao from 'containers/VoteAndDao/Dao/OldDao'
function App() {
@@ -299,15 +299,18 @@ function App() {
} />
} />
} />
- } />
} />
- } />
} />
} />
} >
} />
- } />
+ {/* FIXME: On setting flag below to 1 below routes will not be available to user. */}
+ {!Number(DISABLE_VE_DAO) && } />}
+ {!Number(DISABLE_VE_DAO) && } />}
+
+ } />
+
} />
diff --git a/packages/boba/gateway/src/reducers/airdropReducer.js b/packages/boba/gateway/src/reducers/airdropReducer.js
deleted file mode 100644
index dec6ee0c5c..0000000000
--- a/packages/boba/gateway/src/reducers/airdropReducer.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2021-present Boba Network.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. */
-
-const initialState = {
- claimDetailsL1: {},
- claimDetailsL2: {}
-}
-
-function airdropReducer(state = initialState, action) {
- switch (action.type) {
- case 'FETCH/AIRDROPL1/STATUS/SUCCESS':
- return {
- ...state,
- claimDetailsL1: action.payload
- }
- case 'FETCH/AIRDROPL2/STATUS/SUCCESS':
- return {
- ...state,
- claimDetailsL2: action.payload
- }
- default:
- return state
- }
-}
-
-export default airdropReducer
diff --git a/packages/boba/gateway/src/reducers/index.js b/packages/boba/gateway/src/reducers/index.js
index 966ebe10cc..cf329a71fb 100644
--- a/packages/boba/gateway/src/reducers/index.js
+++ b/packages/boba/gateway/src/reducers/index.js
@@ -33,7 +33,6 @@ import farmReduer from './farmReducer'
import lookupReducer from './lookupReducer'
import signatureReducer from './signatureReducer'
import daoReducer from './daoReducer'
-import airdropReducer from './airdropReducer'
import fixedReducer from './fixedReducer'
import verifierReducer from './verifierReducer';
import bridgeReducer from './bridgeReducer';
@@ -58,7 +57,6 @@ const rootReducer = combineReducers({
farm: farmReduer,
lookup: lookupReducer,
dao: daoReducer,
- airdrop: airdropReducer,
fixed: fixedReducer,
verifier: verifierReducer,
bridge: bridgeReducer,
diff --git a/packages/boba/gateway/src/services/graphQLService.js b/packages/boba/gateway/src/services/graphQLService.js
index 6d53a82351..d0ddc87154 100644
--- a/packages/boba/gateway/src/services/graphQLService.js
+++ b/packages/boba/gateway/src/services/graphQLService.js
@@ -16,7 +16,7 @@ class GraphQLService {
async queryBridgeProposalCreated() {
- const query = gql(`query { governorProposalCreateds { proposalId values description proposer to startTimestamp endTimestamp proposer } }`)
+ const query = gql(`query { governorProposalCreateds { proposalId values description proposer } }`)
/*
curl -g -X POST \
diff --git a/packages/boba/gateway/src/services/networkService.js b/packages/boba/gateway/src/services/networkService.js
index a4c768a8ea..21affbdb81 100644
--- a/packages/boba/gateway/src/services/networkService.js
+++ b/packages/boba/gateway/src/services/networkService.js
@@ -65,8 +65,7 @@ import L2BillingContractJson from "@boba/contracts/artifacts/contracts/L2Billing
//special one-off locations
import L1ERC20Json from '../deployment/contracts/L1ERC20.json'
import OMGJson from '../deployment/contracts/OMG.json'
-import BobaAirdropJson from "../deployment/contracts/BobaAirdrop.json"
-import BobaAirdropL1Json from "../deployment/contracts/BobaAirdropSecond.json"
+
import TuringMonsterJson from "../deployment/contracts/NFTMonsterV2.json"
import AuthenticatedFaucetJson from "../deployment/contracts/AuthenticatedFaucet.json"
import Boba_GasPriceOracleJson from "../deployment/contracts/Boba_GasPriceOracle.json"
@@ -106,7 +105,7 @@ import layerZeroMainnet from "@boba/register/addresses/layerZeroMainnet"
import tokenInfo from "@boba/register/addresses/tokenInfo"
import { bobaBridges } from 'util/bobaBridges'
-import { APP_AIRDROP, APP_CHAIN, SPEED_CHECK } from 'util/constant'
+import { APP_CHAIN, SPEED_CHECK } from 'util/constant'
import { getPoolDetail } from 'util/poolDetails'
const ERROR_ADDRESS = '0x0000000000000000000000000000000000000000'
@@ -265,208 +264,6 @@ class NetworkService {
}
}
- async fetchAirdropStatusL1() {
-
- // NOT SUPPORTED on LOCAL
- if (this.networkGateway === 'local') return
-
- const response = await omgxWatcherAxiosInstance(
- this.networkGateway
- ).post('get.l1.airdrop', {
- address: this.account,
- key: APP_AIRDROP
- })
-
- if (response.status === 201) {
- const status = response.data
- return status
- } else {
- console.log("Bad gateway response")
- return false
- }
-
- }
-
- async fetchAirdropStatusL2() {
-
- // NOT SUPPORTED on LOCAL
- if (this.networkGateway === 'local') return
-
- const response = await omgxWatcherAxiosInstance(
- this.networkGateway
- ).post('get.l2.airdrop', {
- address: this.account,
- key: APP_AIRDROP
- })
-
- if (response.status === 201) {
- const status = response.data
- return status
- } else {
- console.log("Bad gateway response")
- return false
- }
-
- }
-
- async initiateAirdrop(callData) {
-
- console.log("Initiating airdrop")
- console.log("getAirdropL1(callData)",callData.merkleProof)
-
- // NOT SUPPORTED on LOCAL
- if (this.networkGateway === 'local') return
-
- const airdropContract = new ethers.Contract(
- allAddresses.BobaAirdropL1,
- BobaAirdropL1Json.abi,
- this.provider.getSigner()
- )
-
- console.log("airdropL1Contract.address:", airdropContract.address)
-
- try {
-
- //function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof)
- let claim = await airdropContract.initiateClaim(
- callData.merkleProof.index, //Spec - 1 - Type Number,
- callData.merkleProof.amount, //Spec 101 Number - this is Number in the spec but an StringHexWei in the payload
- callData.merkleProof.proof //proof1
- )
-
- await claim.wait()
-
- //Interact with API if the contract interaction was successful
- //success of this this call has no bearing on the airdrop itself, since the api is just
- //used for user status updates etc.
- //send.l1.airdrop
- const response = await omgxWatcherAxiosInstance(
- this.networkGateway
- ).post('initiate.l1.airdrop', {
- address: this.account,
- key: APP_AIRDROP
- })
-
- if (response.status === 201) {
- console.log("L1 Airdrop gateway response:",response.data)
- } else {
- console.log("L1 Airdrop gateway response:",response)
- }
-
- return claim
-
- } catch (error) {
- console.log(error)
- return error
- }
-
- }
-
- async getAirdropL1(callData) {
-
- console.log("getAirdropL1")
- console.log("getAirdropL1(callData)",callData.merkleProof)
- console.log("this.account:",this.account)
-
- //Interact with contract
- const airdropContract = new ethers.Contract(
- allAddresses.BobaAirdropL1,
- BobaAirdropL1Json.abi,
- this.provider.getSigner()
- )
-
- console.log("airdropL1Contract.address:", airdropContract.address)
-
- try {
-
- //function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof)
- let claim = await airdropContract.claim(
- callData.merkleProof.index, //Spec - 1 - Type Number,
- this.account, //wallet address
- callData.merkleProof.amount, //Spec 101 Number - this is Number in the spec but an StringHexWei in the payload
- callData.merkleProof.proof //proof1
- )
-
- await claim.wait()
-
- //Interact with API if the contract interaction was successful
- //success of this this call has no bearing on the airdrop itself, since the api is just
- //used for user status updates etc.
- //send.l1.airdrop
- const response = await omgxWatcherAxiosInstance(
- this.networkGateway
- ).post('send.l1.airdrop', {
- address: this.account,
- key: APP_AIRDROP
- })
-
- if (response.status === 201) {
- console.log("L1 Airdrop gateway response:",response.data)
- } else {
- console.log("L1 Airdrop gateway response:",response)
- }
-
- return claim
-
- } catch (error) {
- console.log(error)
- return error
- }
-
- }
-
- async getAirdropL2(callData) {
-
- console.log("getAirdropL2(callData)",callData)
- console.log("this.account:",this.account)
-
- //Interact with contract
- const airdropContract = new ethers.Contract(
- allAddresses.BobaAirdropL2,
- BobaAirdropJson.abi,
- this.provider.getSigner()
- )
-
- console.log("airdropL2Contract.address:", airdropContract.address)
-
- try {
-
- //function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof)
- let claim = await airdropContract.claim(
- callData.merkleProof.index, //Spec - 1 - Type Number,
- this.account, //wallet address
- callData.merkleProof.amount, //Spec 101 Number - this is Number in the spec but an StringHexWei in the payload
- callData.merkleProof.proof //proof1
- )
-
- await claim.wait()
-
- //Interact with API if the contract interaction was successful
- //success of this this call has no bearing on the airdrop itself, since the api is just
- //used for user status updates etc.
- //send.l2.airdrop
- const response = await omgxWatcherAxiosInstance(
- this.networkGateway
- ).post('send.l2.airdrop', {
- address: this.account,
- key: APP_AIRDROP
- })
-
- if (response.status === 201) {
- console.log("L2 Airdrop gateway response:",response.data)
- } else {
- console.log("L2 Airdrop gateway response:",response)
- }
-
- return claim
-
- } catch (error) {
- console.log(error)
- return error
- }
-
- }
-
async getBobaFeeChoice() {
const bobaFeeContract = new ethers.Contract(
allAddresses.Boba_GasPriceOracle,
@@ -770,14 +567,6 @@ class NetworkService {
this.getAddressCached(addresses, 'DiscretionaryExitFee', 'DiscretionaryExitFee')
console.log("DiscretionaryExitFee:",allAddresses.DiscretionaryExitFee)
- // not critical
- this.getAddressCached(addresses, 'BobaAirdropL1', 'BobaAirdropL1')
- console.log("BobaAirdropL1:",allAddresses.BobaAirdropL1)
-
- // not critical
- this.getAddressCached(addresses, 'BobaAirdropL2', 'BobaAirdropL2')
- console.log("BobaAirdropL2:",allAddresses.BobaAirdropL2)
-
//L2CrossDomainMessenger is a predeploy, so add by hand....
allAddresses = {
...allAddresses,
@@ -4077,9 +3866,15 @@ class NetworkService {
let description = ''
let address = ['']
let callData = ['']
- let tokenIds = payload.tokenIds
- // create proposal only on latest contracts.
- const delegateCheck = await this.delegateContract.attach(allAddresses.GovernorBravoDelegatorV2)
+
+ /****
+ // FIXME :Disable for veDao.
+ let tokenIds = payload.tokenIds
+ // create proposal only on latest contracts.
+ const delegateCheck = await this.delegateContract.attach(allAddresses.GovernorBravoDelegatorV2)
+ */
+
+ const delegateCheck = await this.delegateContract.attach(allAddresses.GovernorBravoDelegator)
if( payload.action === 'text-proposal' ) {
address = ['0x000000000000000000000000000000000000dEaD']
@@ -4132,7 +3927,6 @@ class NetworkService {
values,
signatures,
callData,
- tokenIds,
description
)
@@ -4151,7 +3945,7 @@ class NetworkService {
*
*/
- async fetchProposals() {
+ async fetchProposalsVeDao() {
if (!this.delegateContract) return
@@ -4265,7 +4059,7 @@ class NetworkService {
}
//Cast vote for proposal
- async castProposalVote({id, userVote,tokenIds}) {
+ async castProposalVoteVeDao({id, userVote,tokenIds}) {
if( !this.delegateContract ) return
@@ -5244,6 +5038,116 @@ class NetworkService {
}
}
+
+ /****************************************
+ ************* STARTS HERE **************
+ ***********OLD DAO REMOVE ME ***********
+ *****************************************/
+
+ // FIXME: remove me once deprecated old dao.
+
+ async fetchProposals() {
+
+ if (!this.delegateContract) return
+
+ const delegateCheck = await this.delegateContract.attach(allAddresses.GovernorBravoDelegator)
+
+ try {
+
+ let proposalList = []
+
+ const proposalCounts = await delegateCheck.proposalCount()
+ const totalProposals = await proposalCounts.toNumber()
+
+ /// @notice An event emitted when a new proposal is created
+ // event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startTimestamp, uint endTimestamp, string description);
+
+ let descriptionList = await GraphQLService.queryBridgeProposalCreated()
+
+ for (let i = 0; i < totalProposals; i++) {
+ const proposalRaw = descriptionList.data.governorProposalCreateds[i]
+
+ if(typeof(proposalRaw) === 'undefined') continue
+
+ let proposalID = proposalRaw.proposalId
+
+ //this is a number such as 2
+ let proposalData = await delegateCheck.proposals(proposalID)
+
+ const proposalStates = [
+ 'Pending',
+ 'Active',
+ 'Canceled',
+ 'Defeated',
+ 'Succeeded',
+ 'Queued',
+ 'Expired',
+ 'Executed',
+ ]
+
+ let state = await delegateCheck.state(proposalID)
+
+ let againstVotes = parseInt(formatEther(proposalData.againstVotes))
+ let forVotes = parseInt(formatEther(proposalData.forVotes))
+ let abstainVotes = parseInt(formatEther(proposalData.abstainVotes))
+
+ let startTimestamp = proposalData.startTimestamp.toString()
+ let endTimestamp = proposalData.endTimestamp.toString()
+
+ let proposal = await delegateCheck.getActions(i+2)
+
+ let hasVoted = null
+
+ let description = proposalRaw.description.toString()
+
+ proposalList.push({
+ id: proposalID?.toString(),
+ proposal,
+ description,
+ totalVotes: forVotes + againstVotes,
+ forVotes,
+ againstVotes,
+ abstainVotes,
+ state: proposalStates[state],
+ startTimestamp,
+ endTimestamp,
+ hasVoted: hasVoted
+ })
+
+ }
+ return { proposalList }
+ } catch(error) {
+ console.log("NS: fetchProposals error:",error)
+ return error
+ }
+ }
+
+
+ async castProposalVote({id, userVote}) {
+
+ if( !this.delegateContract ) return
+
+ if( !this.account ) {
+ console.log('NS: castProposalVote() error - called but account === null')
+ return
+ }
+ try {
+ const delegateCheck = await this.delegateContract
+ .connect(this.provider.getSigner())
+ .attach(allAddresses.GovernorBravoDelegator)
+ return delegateCheck.castVote(id, userVote)
+ } catch(error) {
+ console.log("NS: castProposalVote error:",error)
+ return error
+ }
+ }
+
+
+ /****************************************
+ ************* END HERE *****************
+ ***********OLD DAO REMOVE ME TILL HERE *
+ *****************************************/
+
}
const networkService = new NetworkService()
diff --git a/packages/boba/gateway/src/util/constant.js b/packages/boba/gateway/src/util/constant.js
index b199ecd64d..b44614f7f9 100644
--- a/packages/boba/gateway/src/util/constant.js
+++ b/packages/boba/gateway/src/util/constant.js
@@ -20,10 +20,11 @@ export const WALLET_VERSION = process.env.REACT_APP_WALLET_VERSION
export const APP_STATUS = process.env.REACT_APP_STATUS || 'normal'
export const SELLER_OPTIMISM_API_URL = process.env.REACT_APP_SELLER_OPTIMISM_API_URL
export const SERVICE_OPTIMISM_API_URL = process.env.REACT_APP_SERVICE_OPTIMISM_API_URL
-export const APP_AIRDROP = process.env.REACT_APP_AIRDROP
export const SPEED_CHECK = process.env.REACT_APP_SPEED_CHECK
export const TARGET_CHAIN_URL = process.env.REACT_APP_TARGET_CHAIN_URL
+export const DISABLE_VE_DAO = process.env.REACT_APP_DISABLE_VE_DAO
+
export const BRIDGE_TYPE = {
FAST_BRIDGE: "FAST_BRIDGE",
CLASSIC_BRIDGE: "CLASSIC_BRIDGE",
@@ -67,8 +68,8 @@ export const ROUTES_PATH = {
STAKE: '/stake',
HELP: '/help',
BOBASCOPE: '/bobascope',
- AIRDROP: '/airdrop',
MONSTER: '/monster',
VOTE_DAO: '/votedao',
+ DAO: '/dao',
}
export const PER_PAGE = 8
diff --git a/yarn.lock b/yarn.lock
index 7247223179..bf9810abaa 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4186,14 +4186,14 @@
"@noble/hashes" "~1.1.1"
"@scure/base" "~1.1.0"
-"@sentry/browser@7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.12.1.tgz#2be6fa5c2529a2a75abac4d00aca786362302a1a"
- integrity sha512-pgyL65CrGFLe8sKcEG8KXAuVTE8zkAsyTlv/AuME06cSdxzO/memPK/r3BI6EM7WupIdga+V5tQUldeT1kgHNA==
- dependencies:
- "@sentry/core" "7.12.1"
- "@sentry/types" "7.12.1"
- "@sentry/utils" "7.12.1"
+"@sentry/browser@7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.20.1.tgz#bce606db24fa02fb72e71187e510ff890f8be903"
+ integrity sha512-SE6mI4LkMzjEi5KB02Py24e2bKYZc/HZI/ZlTn36BuUQX/KYhzzKwzXucOJ5Qws9Ar9CViyKJDb07LxVQLYCGw==
+ dependencies:
+ "@sentry/core" "7.20.1"
+ "@sentry/types" "7.20.1"
+ "@sentry/utils" "7.20.1"
tslib "^1.9.3"
"@sentry/core@5.30.0":
@@ -4218,14 +4218,13 @@
"@sentry/utils" "6.17.5"
tslib "^1.9.3"
-"@sentry/core@7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.12.1.tgz#a22f1c530ed528a699ed204c36eb5fc8d308103d"
- integrity sha512-DFHbzHFjukhlkRZ5xzfebx0IBzblW43kmfnalBBq7xEMscUvnhsYnlvL9Y20tuPZ/PrTcq4JAHbFluAvw6M0QQ==
+"@sentry/core@7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.20.1.tgz#b06f36dddba96e2cc7dfa2d24cb72ff39ecd7a59"
+ integrity sha512-Sc7vtNgO4QcE683qrR+b+KFQkkhvQv7gizN46QQPOWeqLDrai7x0+NspTFDLJyvdDuDh2rjoLfRwNsgbwe7Erw==
dependencies:
- "@sentry/hub" "7.12.1"
- "@sentry/types" "7.12.1"
- "@sentry/utils" "7.12.1"
+ "@sentry/types" "7.20.1"
+ "@sentry/utils" "7.20.1"
tslib "^1.9.3"
"@sentry/hub@5.30.0":
@@ -4246,15 +4245,6 @@
"@sentry/utils" "6.17.5"
tslib "^1.9.3"
-"@sentry/hub@7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.12.1.tgz#dffad40cd2b8f44df2d5f20a89df87879cbbf1c3"
- integrity sha512-KLVnVqXf+CRmXNy9/T8K2/js7QvOQ94xtgP5KnWJbu2rl+JhxnIGiBRF51lPXFIatt7zWwB9qNdMS8lVsvLMGQ==
- dependencies:
- "@sentry/types" "7.12.1"
- "@sentry/utils" "7.12.1"
- tslib "^1.9.3"
-
"@sentry/minimal@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b"
@@ -4303,14 +4293,14 @@
lru_map "^0.3.3"
tslib "^1.9.3"
-"@sentry/react@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.12.1.tgz#075162d39ea05c58217597d5242f7046c3152ea9"
- integrity sha512-CmdiRzhPpjD29GxlDJs+VIoLlQcKp1BfISQOfPUZNppWbKyRad+J5Z8tgg5MCNPHjQtcOT+0V+MsSdRNqtXg4g==
+"@sentry/react@^7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.20.1.tgz#8daef21da5706f5ce68147c555aa19dc12f8b2cf"
+ integrity sha512-5oTRFVkfOe8t7dQtN6oi6WZVFE9iBZKgYcLTaPTCg/5yl5RehitHDxXQRCmv8h1XWF9t3AAopf6rMR/tSdOI1A==
dependencies:
- "@sentry/browser" "7.12.1"
- "@sentry/types" "7.12.1"
- "@sentry/utils" "7.12.1"
+ "@sentry/browser" "7.20.1"
+ "@sentry/types" "7.20.1"
+ "@sentry/utils" "7.20.1"
hoist-non-react-statics "^3.3.2"
tslib "^1.9.3"
@@ -4336,14 +4326,14 @@
"@sentry/utils" "6.17.5"
tslib "^1.9.3"
-"@sentry/tracing@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.12.1.tgz#9f92985f152054ac90b6ec83a33c44e8084a008e"
- integrity sha512-WnweIt//IqkEkJSjA8DtnIeCdItYIqJSxNQ6qK+r546/ufxRYFBck2fbmM0oKZJVg2evbwhadrBTIUzYkqNj4A==
+"@sentry/tracing@^7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.20.1.tgz#7bb44ec7b00ec1623d2ab2d95f2016e9ee119493"
+ integrity sha512-LAiQcJMcOFkUwkGvqLghcVOtVVglHBQ2r7kRo75kqI0OTn/xMPRyPBGo94G+9zAKm+w7dGF5AUqq/4VUm7DJ+g==
dependencies:
- "@sentry/hub" "7.12.1"
- "@sentry/types" "7.12.1"
- "@sentry/utils" "7.12.1"
+ "@sentry/core" "7.20.1"
+ "@sentry/types" "7.20.1"
+ "@sentry/utils" "7.20.1"
tslib "^1.9.3"
"@sentry/types@5.30.0":
@@ -4356,10 +4346,10 @@
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.17.5.tgz#3b6a591c8059d577b51ba2e71f4717aadbea923f"
integrity sha512-mn7qKuOvmZRTomJ7BiJEw6DM8femAVQcuHa8hdvK1F6ldMfFVLen5Z2LYGE7iY36GEa1Ba/AGGEKyF8D29y2/Q==
-"@sentry/types@7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.12.1.tgz#eff76d938f9effc62a2ec76cd5c3f04de37f5c15"
- integrity sha512-VGZs39SZgMcCGv7H0VyFy1LEFGsnFZH590JUopmz6nG63EpeYQ2xzhIoPNAiLKbyUvBEwukn+faCg3u3MGqhgQ==
+"@sentry/types@7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.20.1.tgz#26c6fc94dd25a66aeabbd795fa8985d768190970"
+ integrity sha512-bI4t5IXGLIQYH5MegKRl4x2LDSlPVbQJ5eE6NJCMrCm8PcFUo3WgkwP6toG9ThQwpTx/DhUo1sVNKrr0oW4cpA==
"@sentry/utils@5.30.0":
version "5.30.0"
@@ -4377,12 +4367,12 @@
"@sentry/types" "6.17.5"
tslib "^1.9.3"
-"@sentry/utils@7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.12.1.tgz#fcf80fdc332d0bd288e21b13efc7a2f0d604f75a"
- integrity sha512-Dh8B13pC0u8uLM/zf+oZngyg808c6BDEO94F7H+h3IciCVVd92A0cOQwLGAEdf8srnJgpZJNAlSC8lFDhbFHzQ==
+"@sentry/utils@7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.20.1.tgz#01b881b82598fca5c04af771ffe44663b66dee6f"
+ integrity sha512-wToW0710OijQLUZnbbOx1pxwJ4mXUZ5ZFl4/x7ubNftkOz5NwJ+F3ylRqHXpZJaR9pUfR5CNdInTFZn05h/KeQ==
dependencies:
- "@sentry/types" "7.12.1"
+ "@sentry/types" "7.20.1"
tslib "^1.9.3"
"@sindresorhus/is@^0.14.0":