From 1be78f4bcc60b9de74e1fca67c0ff1d03f9a6fa4 Mon Sep 17 00:00:00 2001 From: neokry Date: Wed, 31 Jan 2024 12:41:52 -0800 Subject: [PATCH] Add protoocl rewards disclaimer --- apps/web/src/data/contract/chains.ts | 6 ++++ .../ReviewAndDeploy/ReviewAndDeploy.tsx | 35 +++++++++++++++++++ .../components/Upgrade/versions/2.0.0.md | 2 ++ 3 files changed, 43 insertions(+) diff --git a/apps/web/src/data/contract/chains.ts b/apps/web/src/data/contract/chains.ts index 254c4929..9908148f 100644 --- a/apps/web/src/data/contract/chains.ts +++ b/apps/web/src/data/contract/chains.ts @@ -20,6 +20,12 @@ const MAINNET_CHAINS = [mainnet, zora, base, optimism] // Mainnet is required here due to hooks like useEnsData that only pull data from mainnet const TESTNET_CHAINS = [mainnet, sepolia, optimismSepolia, baseSepolia, zoraSepolia] +export const L1_CHAINS = PUBLIC_IS_TESTNET ? [CHAIN_ID.SEPOLIA] : [CHAIN_ID.ETHEREUM] + +export const L2_CHAINS = PUBLIC_IS_TESTNET + ? [CHAIN_ID.ZORA_SEPOLIA, CHAIN_ID.BASE_SEPOLIA, CHAIN_ID.OPTIMISM_SEPOLIA] + : [CHAIN_ID.ZORA, CHAIN_ID.BASE, CHAIN_ID.OPTIMISM] + const AVAILIBLE_CHAINS = PUBLIC_IS_TESTNET ? TESTNET_CHAINS : MAINNET_CHAINS const { chains, publicClient } = configureChains( diff --git a/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx b/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx index 3a0e815f..6fd145d3 100644 --- a/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx +++ b/apps/web/src/modules/create-dao/components/ReviewAndDeploy/ReviewAndDeploy.tsx @@ -18,6 +18,7 @@ import { PUBLIC_MANAGER_ADDRESS } from 'src/constants/addresses' import { NULL_ADDRESS } from 'src/constants/addresses' import { managerAbi } from 'src/data/contract/abis' import { managerV2Abi } from 'src/data/contract/abis/ManagerV2' +import { L2_CHAINS } from 'src/data/contract/chains' import { formatAuctionDuration, formatFounderAllocation } from 'src/modules/create-dao' import { useChainStore } from 'src/stores/useChainStore' import { @@ -60,6 +61,7 @@ export const ReviewAndDeploy: React.FC = ({ title }) => { const [isPendingTransaction, setIsPendingTransaction] = useState(false) const [hasConfirmedTerms, setHasConfirmedTerms] = useState(false) const [hasConfirmedChain, setHasConfirmedChain] = useState(false) + const [hasConfirmedRewards, setHasConfirmedRewards] = useState(false) const [deploymentError, setDeploymentError] = useState() const chain = useChainStore((x) => x.chain) const { data: version, isLoading: isVersionLoading } = useContractRead({ @@ -360,6 +362,38 @@ export const ReviewAndDeploy: React.FC = ({ title }) => { + {L2_CHAINS.includes(chain.id) && ( + + + setHasConfirmedRewards((bool) => !bool)} + > + {hasConfirmedRewards && } + + + + I have read the{' '} + + Builder Protocol Rewards documentation + {' '} + and understand how Protocol Rewards apply to this DAO. + + + + )} + {deploymentError && ( {deploymentError} @@ -386,6 +420,7 @@ export const ReviewAndDeploy: React.FC = ({ title }) => { !address || !hasConfirmedTerms || !hasConfirmedChain || + !hasConfirmedRewards || isPendingTransaction || isVersionLoading } diff --git a/apps/web/src/modules/create-proposal/components/Upgrade/versions/2.0.0.md b/apps/web/src/modules/create-proposal/components/Upgrade/versions/2.0.0.md index 0569f88a..4ad081e0 100644 --- a/apps/web/src/modules/create-proposal/components/Upgrade/versions/2.0.0.md +++ b/apps/web/src/modules/create-proposal/components/Upgrade/versions/2.0.0.md @@ -23,3 +23,5 @@ Allow current DAOs to set a new metadata renderer. Allow new deployments to choo ### Protocol Rewards: Rewards taken as a percent of protocol auctions distributed to bid referrals, DAO founders and BuilderDAO + +_Voting yes on this proposal confirms that you have read the [Builder Protocol Rewards documentation](https://docs.zora.co/docs/guides/builder-protocol-rewards) and understand how Protocol Rewards apply to this DAO._