Skip to content

Commit

Permalink
Add protoocl rewards disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
neokry committed Jan 31, 2024
1 parent 994a29c commit 1be78f4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/web/src/data/contract/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -60,6 +61,7 @@ export const ReviewAndDeploy: React.FC<ReviewAndDeploy> = ({ title }) => {
const [isPendingTransaction, setIsPendingTransaction] = useState<boolean>(false)
const [hasConfirmedTerms, setHasConfirmedTerms] = useState<boolean>(false)
const [hasConfirmedChain, setHasConfirmedChain] = useState<boolean>(false)
const [hasConfirmedRewards, setHasConfirmedRewards] = useState<boolean>(false)
const [deploymentError, setDeploymentError] = useState<string | undefined>()
const chain = useChainStore((x) => x.chain)
const { data: version, isLoading: isVersionLoading } = useContractRead({
Expand Down Expand Up @@ -360,6 +362,38 @@ export const ReviewAndDeploy: React.FC<ReviewAndDeploy> = ({ title }) => {
</Flex>
</Flex>

{L2_CHAINS.includes(chain.id) && (
<Flex mt="x4">
<Flex align={'center'} justify={'center'} gap={'x4'}>
<Flex
align={'center'}
justify={'center'}
className={
deployCheckboxStyleVariants[
hasConfirmedRewards ? 'confirmed' : 'default'
]
}
onClick={() => setHasConfirmedRewards((bool) => !bool)}
>
{hasConfirmedRewards && <Icon fill="background1" id="check" />}
</Flex>

<Flex className={deployCheckboxHelperText}>
I have read the{' '}
<a
href={'https://docs.zora.co/docs/guides/builder-protocol-rewards'}
target="_blank"
className={atoms({ color: 'accent' })}
rel="noreferrer"
>
Builder Protocol Rewards documentation
</a>{' '}
and understand how Protocol Rewards apply to this DAO.
</Flex>
</Flex>
</Flex>
)}

{deploymentError && (
<Flex mt={'x4'} color="negative">
{deploymentError}
Expand All @@ -386,6 +420,7 @@ export const ReviewAndDeploy: React.FC<ReviewAndDeploy> = ({ title }) => {
!address ||
!hasConfirmedTerms ||
!hasConfirmedChain ||
!hasConfirmedRewards ||
isPendingTransaction ||
isVersionLoading
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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._

0 comments on commit 1be78f4

Please sign in to comment.