diff --git a/package.json b/package.json index 27c524d83..63e97f60f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "davi", - "version": "2.3.0", + "version": "2.4.0", "description": "Decentralized Autonomous Voting Interface", "scripts": { "dev": "./scripts/dev.sh", @@ -44,8 +44,11 @@ "@nomiclabs/hardhat-truffle5": "^2.0.5", "@nomiclabs/hardhat-web3": "^2.0.0", "@orbisclub/orbis-sdk": "^0.3.80", + "@sentry/integrations": "^7.30.0", + "@sentry/react": "^7.30.0", "@tiptap/extension-focus": "^2.0.0-beta.39", "@tiptap/extension-highlight": "^2.0.0-beta.32", + "@tiptap/extension-link": "^2.0.0-beta.209", "@tiptap/extension-placeholder": "^2.0.0-beta.48", "@tiptap/react": "^2.0.0-beta.105", "@tiptap/starter-kit": "^2.0.0-beta.171", @@ -90,7 +93,7 @@ "react": "^18.2.0", "react-app-rewired": "^2.1.8", "react-countdown": "^2.3.2", - "react-datetime": "^3.1.1", + "react-datepicker": "^4.8.0", "react-device-detect": "^2.1.2", "react-diff-viewer": "^3.1.1", "react-dom": "^18.2.0", @@ -202,4 +205,4 @@ "text-summary" ] } -} \ No newline at end of file +} diff --git a/public/assets/thumb.png b/public/assets/thumb.png index 3d1293432..647fb7020 100644 Binary files a/public/assets/thumb.png and b/public/assets/thumb.png differ diff --git a/public/index.html b/public/index.html index 34ed952c5..162161f4c 100644 --- a/public/index.html +++ b/public/index.html @@ -6,14 +6,14 @@ - + - + - + @@ -21,7 +21,7 @@ - + diff --git a/src/Modules/Guilds/Hooks/useProposalCalls.ts b/src/Modules/Guilds/Hooks/useProposalCalls.ts index 8196ce0bd..a97e13751 100644 --- a/src/Modules/Guilds/Hooks/useProposalCalls.ts +++ b/src/Modules/Guilds/Hooks/useProposalCalls.ts @@ -88,9 +88,12 @@ const useProposalCalls = (guildId: string, proposalId: `0x${string}`) => { }, [calls, callsPerOption, totalOptionsNum]); useEffect(() => { + let cancelled = false; + if (!guildId || !proposalId || !splitCalls || !loaded) { setOptions([]); - return; + + return () => {}; } async function decodeOptions() { const encodedOptions: Option[] = await Promise.all( @@ -152,10 +155,16 @@ const useProposalCalls = (guildId: string, proposalId: `0x${string}`) => { return bulkDecodeCallsFromOptions(encodedOptions, contracts, chain?.id); } - decodeOptions().then(options => - // Return options putting default against-call last - setOptions([...options.slice(1), options[0]]) - ); + decodeOptions().then(options => { + if (!cancelled) { + // Return options putting default against-call last + setOptions([...options.slice(1), options[0]]); + } + }); + + return () => { + cancelled = true; + }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [ guildId, diff --git a/src/Modules/Guilds/pages/AllDiscussions/AllDiscussions.tsx b/src/Modules/Guilds/pages/AllDiscussions/AllDiscussions.tsx index f392b8dbc..fc03de2db 100644 --- a/src/Modules/Guilds/pages/AllDiscussions/AllDiscussions.tsx +++ b/src/Modules/Guilds/pages/AllDiscussions/AllDiscussions.tsx @@ -6,23 +6,19 @@ import { UnstyledLink } from 'components/primitives/Links'; import { Button } from 'components/primitives/Button'; import { ProposalsList } from './AllDiscussions.styled'; import Discussions from 'Modules/Social/Discussions'; -import useIsProposalCreationAllowed from 'Modules/Guilds/Hooks/useIsProposalCreationAllowed'; const AllDiscussions = ({ guildId }) => { const { t } = useTranslation(); const { chainName } = useTypedParams(); - const isProposalCreationAllowed = useIsProposalCreationAllowed(); return ( <> - {isProposalCreationAllowed && ( - - - - )} + + + diff --git a/src/Modules/Guilds/pages/CreateDiscussion.tsx b/src/Modules/Guilds/pages/CreateDiscussion.tsx index 06550be18..c24d1f62c 100644 --- a/src/Modules/Guilds/pages/CreateDiscussion.tsx +++ b/src/Modules/Guilds/pages/CreateDiscussion.tsx @@ -25,10 +25,10 @@ import { postTemplate, } from 'components/Forum'; import { DiscussionContent } from 'components/Forum/types'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; const CreateDiscussionPage: React.FC = () => { - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const { guildId, chainName: chain } = useTypedParams(); const { isLoading: isGuildAvailabilityLoading } = useContext( diff --git a/src/Modules/Guilds/pages/CreateProposal.tsx b/src/Modules/Guilds/pages/CreateProposal.tsx index c21559084..5d833d9e4 100644 --- a/src/Modules/Guilds/pages/CreateProposal.tsx +++ b/src/Modules/Guilds/pages/CreateProposal.tsx @@ -45,7 +45,7 @@ import { createPost, postTemplate, } from 'components/Forum'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { DiscussionContent } from 'components/Forum/types'; export const EMPTY_CALL: Call = { @@ -63,7 +63,7 @@ const CreateProposalPage: React.FC = () => { const { isLoading: isGuildAvailabilityLoading } = useContext( GuildAvailabilityContext ); - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const navigate = useNavigate(); const { t } = useTranslation(); diff --git a/src/Modules/Guilds/pages/Discussion/Discussion.styled.tsx b/src/Modules/Guilds/pages/Discussion/Discussion.styled.tsx index a22e130de..8d279d76d 100644 --- a/src/Modules/Guilds/pages/Discussion/Discussion.styled.tsx +++ b/src/Modules/Guilds/pages/Discussion/Discussion.styled.tsx @@ -49,3 +49,17 @@ export const HeaderTopRow = styled(Box)` align-items: center; margin-bottom: 1rem; `; + +export const ActionsGroup = styled(Box)` + margin-top: 1rem; + display: flex; + flex-direction: row; + gap: 1rem; + margin: 1rem; +`; + +export const PostDetailsRow = styled(Box)` + display: flex; + align-items: center; + gap: 1rem; +`; diff --git a/src/Modules/Guilds/pages/Discussion/Discussion.tsx b/src/Modules/Guilds/pages/Discussion/Discussion.tsx index 87dec4c09..59d27ed80 100644 --- a/src/Modules/Guilds/pages/Discussion/Discussion.tsx +++ b/src/Modules/Guilds/pages/Discussion/Discussion.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import AddressButton from 'components/AddressButton/AddressButton'; import { ProposalDescription } from 'components/ProposalDescription'; import { UnstyledLink } from 'components/primitives/Links'; @@ -8,11 +8,13 @@ import { FaChevronLeft } from 'react-icons/fa'; import { useGuildConfig } from 'Modules/Guilds/Hooks/useGuildConfig'; import { IOrbisPost } from 'types/types.orbis'; import { + ActionsGroup, HeaderTopRow, PageContainer, PageContent, PageHeader, PageTitle, + PostDetailsRow, StyledIconButton, } from './Discussion.styled'; import { useTranslation } from 'react-i18next'; @@ -20,8 +22,10 @@ import { SidebarCard, SidebarCardHeaderSpaced } from 'components/SidebarCard'; import { Header as CardHeader } from 'components/Card'; import { Discussion } from 'components/Discussion'; import useDiscussionContext from 'Modules/Guilds/Hooks/useDiscussionContext'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { StyledButton } from 'Modules/Guilds/styles'; +import PostActions from 'components/Discussion/Post/PostActions'; +import moment from 'moment'; const DiscussionPage: React.FC = () => { const { t } = useTranslation(); @@ -30,7 +34,7 @@ const DiscussionPage: React.FC = () => { const [op, setOp] = useState(); const { data: guildConfig } = useGuildConfig(guildId); - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const { context } = useDiscussionContext( `${guildId}-${discussionId}-discussions` ); @@ -45,6 +49,15 @@ const DiscussionPage: React.FC = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + const handleDelete = () => { + const confirmed = window.confirm( + `${t('deletionMessage1')}'\r\n${t('deletionMessage2')}` + ); + if (confirmed) { + orbis.deletePost(discussionId); + } + }; + return ( @@ -74,14 +87,24 @@ const DiscussionPage: React.FC = () => { )} - - + + + {op?.timestamp && moment.unix(op.timestamp).fromNow()} + + + + + diff --git a/src/Modules/Guilds/pages/Governance/Governance.tsx b/src/Modules/Guilds/pages/Governance/Governance.tsx index 21182e11c..cf6be2694 100644 --- a/src/Modules/Guilds/pages/Governance/Governance.tsx +++ b/src/Modules/Guilds/pages/Governance/Governance.tsx @@ -16,7 +16,6 @@ import { Button } from 'components/primitives/Button'; import { ProposalsList, StyledHeading, StyledLink } from './Governance.styled'; import { ProposalState } from 'types/types.guilds.d'; import Discussions from 'Modules/Social/Discussions'; -import useIsProposalCreationAllowed from 'Modules/Guilds/Hooks/useIsProposalCreationAllowed'; const Governance = ({ guildId }) => { const { isLoading } = useContext(GuildAvailabilityContext); @@ -24,7 +23,6 @@ const Governance = ({ guildId }) => { const { t } = useTranslation(); const { data: activeProposals } = useActiveProposalsNow(guildId); const { chainName } = useTypedParams(); - const isProposalCreationAllowed = useIsProposalCreationAllowed(); /* Since filters are a global state, we need to reset all of them @@ -88,13 +86,11 @@ const Governance = ({ guildId }) => { icon={} placeholder={t('searchTitleEnsAddress')} /> - {isProposalCreationAllowed && ( - - - - )} + + + {t('proposals')} diff --git a/src/Modules/Social/Discussions.tsx b/src/Modules/Social/Discussions.tsx index aa8742112..4d42f867f 100644 --- a/src/Modules/Social/Discussions.tsx +++ b/src/Modules/Social/Discussions.tsx @@ -1,5 +1,4 @@ -import { useContext, useEffect, useMemo, useState } from 'react'; -// import { Orbis } from '@orbisclub/orbis-sdk'; +import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Virtuoso } from 'react-virtuoso'; import { DiscussionCard } from 'components/DiscussionCard'; @@ -11,10 +10,10 @@ import { ErrorLabel } from 'components/primitives/Forms/ErrorLabel'; import { Button } from 'components/primitives/Button'; import { DISCUSSIONS_TO_SHOW, REFRESH_DISCUSSIONS_INTERVAL } from './constants'; import { Box } from 'components/primitives/Layout'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; const Discussions = () => { - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const [discussions, setDiscussions] = useState([]); const [error, setError] = useState(null); diff --git a/src/components/ActionsBuilder/CallDetails/CallDetails.tsx b/src/components/ActionsBuilder/CallDetails/CallDetails.tsx index 1d5584886..6096aaca4 100644 --- a/src/components/ActionsBuilder/CallDetails/CallDetails.tsx +++ b/src/components/ActionsBuilder/CallDetails/CallDetails.tsx @@ -155,7 +155,7 @@ export const CallDetails: React.FC = ({ variant={'secondary'} onClick={() => setDisplayRichData(v => !v)} > - {displayRichData ? t('displayRawData') : t('displayFormatedData')} + {displayRichData ? t('displayRawData') : t('displayFormattedData')} )} diff --git a/src/components/ActionsBuilder/SupportedActions/ERC20Transfer/ERC20TransferEditor.tsx b/src/components/ActionsBuilder/SupportedActions/ERC20Transfer/ERC20TransferEditor.tsx index 99e64e8f5..25927c57d 100644 --- a/src/components/ActionsBuilder/SupportedActions/ERC20Transfer/ERC20TransferEditor.tsx +++ b/src/components/ActionsBuilder/SupportedActions/ERC20Transfer/ERC20TransferEditor.tsx @@ -79,7 +79,7 @@ const ERC20TransferEditor: React.FC = ({ } }, [decodedCall, tokens]); - const { control, handleSubmit } = useForm({ + const { control, handleSubmit, getValues } = useForm({ resolver: validateERC20Transfer, context: { t }, defaultValues: parsedData, @@ -158,7 +158,7 @@ const ERC20TransferEditor: React.FC = ({ diff --git a/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx b/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx index 9cb108993..5113f499f 100644 --- a/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx +++ b/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx @@ -4,7 +4,7 @@ import { ChildrenNode, Matcher, MatchResponse, Node } from 'interweave'; import moment from 'moment'; import { BlockExplorerLink } from 'components/primitives/Links'; import { FunctionParamWithValue } from 'components/ActionsBuilder/SupportedActions/GenericCall/GenericCallInfoLine'; -import { capitalizeFirstLetter } from 'utils'; +import { getDurationData } from 'hooks/Guilds/useDuration/getDurationData'; interface MatcherOptions { params: FunctionParamWithValue[]; } @@ -37,9 +37,9 @@ export const renderGenericCallParamValue = ( return `${moment.unix(Number(param.value)).utc().format('LLLL')} UTC`; case 'duration': case 'time': - return capitalizeFirstLetter( - moment.duration(Number(param.value), 'seconds').humanize() - ); + return param.value === '0' + ? '0 seconds' + : getDurationData(Number(param.value))?.string; case 'boolean': return `${param.value}`; case 'tokenAmount': diff --git a/src/components/ActionsBuilder/SupportedActions/GenericCall/__snapshots__/GenericCallParamsMatcher.test.tsx.snap b/src/components/ActionsBuilder/SupportedActions/GenericCall/__snapshots__/GenericCallParamsMatcher.test.tsx.snap index d06ba6a0a..074586f3f 100644 --- a/src/components/ActionsBuilder/SupportedActions/GenericCall/__snapshots__/GenericCallParamsMatcher.test.tsx.snap +++ b/src/components/ActionsBuilder/SupportedActions/GenericCall/__snapshots__/GenericCallParamsMatcher.test.tsx.snap @@ -169,7 +169,7 @@ exports[`GenericCallParamsMatcher Should match snapshot for all component types exports[`GenericCallParamsMatcher Should match snapshot for all component types 5`] = `
- 52 years + 53 years, 2 months, 1 day, 18 hours, 17 minutes and 18 seconds
`; @@ -399,7 +399,7 @@ exports[`GenericCallParamsMatcher replaces all component types correctly 5`] = ` matchedparam="timeParam" style="display: inline-block;" > - 52 years + 53 years, 2 months, 1 day, 18 hours, 17 minutes and 18 seconds diff --git a/src/components/Discussion/Discussion.tsx b/src/components/Discussion/Discussion.tsx index fd829503c..1dcd8a06a 100644 --- a/src/components/Discussion/Discussion.tsx +++ b/src/components/Discussion/Discussion.tsx @@ -1,7 +1,7 @@ -import { useState, useEffect, useContext } from 'react'; +import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { VscCommentDiscussion } from 'react-icons/vsc'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { useInterval } from 'utils'; import { Postbox } from './Postbox'; @@ -28,7 +28,7 @@ function Discussion({ algorithm?: keyof typeof IOrbisGetPostsAlgorithm; }) { const { t } = useTranslation(); - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const [posts, setPosts] = useState([]); const [page, setPage] = useState(0); const [isFetching, setIsFetching] = useState(false); @@ -81,7 +81,7 @@ function Discussion({ const handleDeletion = async (post: IOrbisPost) => { const confirmed = window.confirm( - 'Are you sure you want to delete this post?\r\nIf you ask for deletion your post might be removed from the Ceramic nodes hosting it.' + `${t('deletionMessage1')}'\r\n${t('deletionMessage2')}` ); if (confirmed) { const res = await orbis.deletePost(post.stream_id); diff --git a/src/components/Discussion/DiscussionMasterPost.tsx b/src/components/Discussion/DiscussionMasterPost.tsx index bb8e94890..950d10786 100644 --- a/src/components/Discussion/DiscussionMasterPost.tsx +++ b/src/components/Discussion/DiscussionMasterPost.tsx @@ -1,12 +1,12 @@ -import { useState, useRef, useEffect, useContext } from 'react'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useState, useRef, useEffect } from 'react'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { DiscussionMasterPost } from './Discussion.styled'; import { Post } from './Post'; import { Thread } from './Thread'; import { IOrbisPost } from 'types/types.orbis'; const MasterPost = ({ post, onDeletion }) => { - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const threadPostbox = useRef(null); const discussionMasterPost = useRef(null); diff --git a/src/components/Discussion/Post/Post.tsx b/src/components/Discussion/Post/Post.tsx index 36e830996..05a928212 100644 --- a/src/components/Discussion/Post/Post.tsx +++ b/src/components/Discussion/Post/Post.tsx @@ -1,7 +1,7 @@ -import { useState, useContext, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import moment from 'moment'; import { IOrbisPost } from 'types/types.orbis'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { getUsername, getBadgeContent, formatMessage } from 'utils/orbis'; import { Avatar } from 'components/Avatar'; import { @@ -37,7 +37,7 @@ const Post = ({ onDeletion: () => void; }) => { const { t } = useTranslation(); - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const [postClone, setPostClone] = useState(null); const [isEditing, setIsEditing] = useState(false); diff --git a/src/components/Discussion/Post/PostActions.tsx b/src/components/Discussion/Post/PostActions.tsx index 4a00cf241..cf5f53020 100644 --- a/src/components/Discussion/Post/PostActions.tsx +++ b/src/components/Discussion/Post/PostActions.tsx @@ -1,11 +1,6 @@ -import { useState, useContext, useRef, useEffect } from 'react'; -import { - BsEmojiLaughing, - BsEmojiLaughingFill, - BsHandThumbsDown, - BsHandThumbsDownFill, -} from 'react-icons/bs'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useState, useRef, useEffect } from 'react'; +import { BsHandThumbsDown, BsHandThumbsDownFill } from 'react-icons/bs'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { IoArrowUndoOutline, IoChatboxOutline, @@ -25,6 +20,9 @@ import { useTranslation } from 'react-i18next'; import { useAccount } from 'wagmi'; import { isReadOnly } from 'provider/wallets'; import { IOrbisPost } from 'types/types.orbis'; +import { FaLaughSquint, FaRegLaughSquint } from 'react-icons/fa'; +import { moderators } from 'configs'; +import { ImHammer2 } from 'react-icons/im'; const PostActions = ({ post, @@ -36,14 +34,14 @@ const PostActions = ({ }: { post: IOrbisPost; showThreadButton?: boolean; - toggleThread: () => void; - toggleReply: () => void; - onClickEdit: () => void; - onClickDelete: () => void; + toggleThread?: () => void; + toggleReply?: () => void; + onClickEdit?: () => void; + onClickDelete?: () => void; }) => { const { t } = useTranslation(); - const { orbis, profile, checkOrbisConnection } = useContext(OrbisContext); - const { isConnected, connector } = useAccount(); + const { orbis, profile, checkOrbisConnection } = useOrbisContext(); + const { isConnected, connector, address } = useAccount(); const [reacted, setReacted] = useState(null); const [likes, setLikes] = useState(0); @@ -94,6 +92,15 @@ const PostActions = ({ } }; + const handleModeratorRemove = () => { + const confirmed = window.confirm( + `${t('removalMessage1')}'\r\n${t('removalMessage2')}` + ); + if (confirmed) { + react('downvote'); + } + }; + useEffect(() => { const getReaction = async () => { const { data } = await orbis.getReaction(post?.stream_id, profile?.did); @@ -111,13 +118,15 @@ const PostActions = ({ return ( <> {/* Reply to post button */} - - - + {toggleReply && ( + + + + )} {/* Toggle Thread */} {showThreadButton && ( @@ -153,9 +162,9 @@ const PostActions = ({ disabled={isConnected && isReadOnly(connector)} > {reacted === 'haha' ? ( - + ) : ( - + )} {haha} @@ -165,7 +174,9 @@ const PostActions = ({ title={t('postActions.downvote')} active={reacted === 'downvote'} onClick={() => react('downvote')} - disabled={isConnected && isReadOnly(connector)} + disabled={ + (isConnected && isReadOnly(connector)) || moderators.includes(address) + } > {reacted === 'downvote' ? ( @@ -174,6 +185,15 @@ const PostActions = ({ )} {downvotes} + {moderators.includes(address) && ( + handleModeratorRemove()} + > + + + )} {post?.creator_details?.did === profile?.did && ( @@ -182,23 +202,27 @@ const PostActions = ({ {showPopover && ( - { - onClickEdit(); - setShowPopover(false); - }} - > - {t('postOptions.edit')} - - { - onClickDelete(); - setShowPopover(false); - }} - > - {t('postOptions.delete')} - + {onClickEdit && ( + { + onClickEdit(); + setShowPopover(false); + }} + > + {t('postOptions.edit')} + + )} + {onClickDelete && ( + { + onClickDelete(); + setShowPopover(false); + }} + > + {t('postOptions.delete')} + + )} )} diff --git a/src/components/Discussion/Postbox/Postbox.tsx b/src/components/Discussion/Postbox/Postbox.tsx index bad858090..b9112171d 100644 --- a/src/components/Discussion/Postbox/Postbox.tsx +++ b/src/components/Discussion/Postbox/Postbox.tsx @@ -1,11 +1,11 @@ -import { useState, useRef, useContext, useEffect, KeyboardEvent } from 'react'; +import { useState, useRef, useEffect, KeyboardEvent } from 'react'; import { debounce } from 'lodash'; import { IOrbisPost, IOrbisProfile, IOrbisPostMention, } from 'types/types.orbis'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { PostboxWrapper, PostboxInput, @@ -52,7 +52,7 @@ const Postbox = ({ }) => { const { t } = useTranslation(); const { orbis, profile, connectOrbis, checkOrbisConnection } = - useContext(OrbisContext); + useOrbisContext(); const { isConnected, connector } = useAccount(); const postboxArea = useRef(null); diff --git a/src/components/Discussion/Thread/Thread.tsx b/src/components/Discussion/Thread/Thread.tsx index d85f79e04..af27f4d30 100644 --- a/src/components/Discussion/Thread/Thread.tsx +++ b/src/components/Discussion/Thread/Thread.tsx @@ -1,17 +1,11 @@ -import { - useState, - useMemo, - useRef, - useEffect, - useContext, - LegacyRef, -} from 'react'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useState, useMemo, useRef, useEffect, LegacyRef } from 'react'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; import { useInterval } from 'utils'; import { MasterGroup, MasterGroupPostbox, ThreadGroup } from './Thread.styled'; import { Post } from '../Post'; import { Postbox } from '../Postbox'; import { IOrbisPost } from 'types/types.orbis'; +import { useTranslation } from 'react-i18next'; const Group = ({ items, @@ -69,7 +63,8 @@ const Thread = ({ onNewPost: (el: HTMLElement) => void; onThreadUpdated: (posts: IOrbisPost[]) => void; }) => { - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); + const { t } = useTranslation(); const mainGroup = useRef(null); @@ -141,7 +136,7 @@ const Thread = ({ const handleDeletion = async (post: IOrbisPost) => { const confirmed = window.confirm( - 'Are you sure you want to delete this post?\r\nIf you ask for deletion your post might be removed from the Ceramic nodes hosting it.' + `${t('deletionMessage1')}'\r\n${t('deletionMessage2')}` ); if (confirmed) { const res = await orbis.deletePost(post.stream_id); diff --git a/src/components/DiscussionCard/DiscussionCard.test.tsx b/src/components/DiscussionCard/DiscussionCard.test.tsx index e938c047c..1dc7fc6da 100644 --- a/src/components/DiscussionCard/DiscussionCard.test.tsx +++ b/src/components/DiscussionCard/DiscussionCard.test.tsx @@ -10,6 +10,18 @@ jest.mock('hooks/Guilds/ens/useENSAvatar', () => ({ }), })); +jest.mock('contexts/Guilds/orbis', () => ({ + useOrbisContext: () => ({ + orbis: { + getPosts: () => ({ + data: [1, 2, 3], + }), + }, + }), +})); + +jest.mock('@orbisclub/orbis-sdk', () => {}); + jest.mock('wagmi', () => ({ useNetwork: () => ({ chain: { id: 1 } }), chain: { diff --git a/src/components/DiscussionCard/DiscussionCard.tsx b/src/components/DiscussionCard/DiscussionCard.tsx index 8ae436eb5..99fc4600e 100644 --- a/src/components/DiscussionCard/DiscussionCard.tsx +++ b/src/components/DiscussionCard/DiscussionCard.tsx @@ -5,14 +5,32 @@ import { CardTitle, MainWrapper, FooterElement } from './DiscussionCard.styled'; import useENSAvatar from 'hooks/Guilds/ens/useENSAvatar'; import { DiscussionCardProps } from './types'; import { useTypedParams } from 'Modules/Guilds/Hooks/useTypedParams'; +import { MdReply } from 'react-icons/md'; +import { useEffect, useState } from 'react'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; +import { BsHandThumbsDown } from 'react-icons/bs'; +import { IoHeartOutline } from 'react-icons/io5'; +import { Avatar } from 'components/Avatar'; +import { FaRegLaughSquint } from 'react-icons/fa'; export const DiscussionCard: React.FC = ({ discussion, }) => { - console.log({ discussion }); const { guildId, chainName } = useTypedParams(); + const { orbis } = useOrbisContext(); const creatorAddress = discussion.creator_details.metadata?.address; const { ensName } = useENSAvatar(creatorAddress, 1); + const [replyCount, setReplyCount] = useState(0); + + useEffect(() => { + const fetchData = async () => { + let { data } = await orbis.getPosts({ + context: `DAVI-${guildId}-${discussion.stream_id}-discussions`, + }); + setReplyCount(data?.length); + }; + fetchData(); + }, [discussion, guildId, orbis]); return ( = ({ {discussion.content?.title} + {ensName || shortenAddress(creatorAddress)} + + {discussion?.count_likes} + + + {discussion?.count_haha} + + + {discussion?.count_downvotes} + + + {replyCount} + diff --git a/src/components/DiscussionCard/__snapshots__/DiscussionCard.test.tsx.snap b/src/components/DiscussionCard/__snapshots__/DiscussionCard.test.tsx.snap index f3edf4096..f293093c1 100644 --- a/src/components/DiscussionCard/__snapshots__/DiscussionCard.test.tsx.snap +++ b/src/components/DiscussionCard/__snapshots__/DiscussionCard.test.tsx.snap @@ -134,8 +134,145 @@ exports[`DiscussionCard should render with full parameters 1`] = `
+
+ + + + + + +
test.eth
+
+ + + + + 7 +
+
+ + + + + 0 +
+
+ + + + + 0 +
+
+ + + + + + 0 +
diff --git a/src/components/Editor/useTextEditor.tsx b/src/components/Editor/useTextEditor.tsx index d23da4105..dc94a89ba 100644 --- a/src/components/Editor/useTextEditor.tsx +++ b/src/components/Editor/useTextEditor.tsx @@ -3,6 +3,7 @@ import StarterKit from '@tiptap/starter-kit'; import Focus from '@tiptap/extension-focus'; import Highlight from '@tiptap/extension-highlight'; import Placeholder from '@tiptap/extension-placeholder'; +import Link from '@tiptap/extension-link'; import { Editor } from './components/Editor'; import TurndownService from 'turndown'; import useLocalStorageWithExpiry from 'hooks/Guilds/useLocalStorageWithExpiry'; @@ -44,6 +45,7 @@ export const useTextEditor = ( placeholder, }), Highlight, + Link, ], onUpdate: ({ editor }) => { const html = editor.getHTML(); diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index 5172f899b..037e02f31 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -21,7 +21,7 @@ const Footer = () => { )} diff --git a/src/components/ProposalDescription/ProposalDescription.tsx b/src/components/ProposalDescription/ProposalDescription.tsx index 075e1b50b..dfe0f3711 100644 --- a/src/components/ProposalDescription/ProposalDescription.tsx +++ b/src/components/ProposalDescription/ProposalDescription.tsx @@ -21,7 +21,15 @@ export const ProposalDescription: React.FC = ({ return ( {metadata?.description ? ( - {metadata.description} + + {metadata.description} + ) : ( )} diff --git a/src/components/StakeTokensModal/components/StakeTokensButton/StakeTokenButton.tsx b/src/components/StakeTokensModal/components/StakeTokensButton/StakeTokenButton.tsx index 1cb45918d..ae87a31f2 100644 --- a/src/components/StakeTokensModal/components/StakeTokensButton/StakeTokenButton.tsx +++ b/src/components/StakeTokensModal/components/StakeTokensButton/StakeTokenButton.tsx @@ -74,7 +74,7 @@ const StakeTokensButton = ({ ) ) : ( - navigate('create-proposal')}> + navigate('create')}> {t('mintRep')} )} diff --git a/src/components/TokenPickerInput/TokenPickerInput.tsx b/src/components/TokenPickerInput/TokenPickerInput.tsx index dd6bed0a2..3076958e9 100644 --- a/src/components/TokenPickerInput/TokenPickerInput.tsx +++ b/src/components/TokenPickerInput/TokenPickerInput.tsx @@ -29,23 +29,26 @@ const TokenPickerInput: React.FC = ({ }, [tokens, token]); return ( -
setIsTokenPickerOpen(true)}> - - {token && ( - - )} -
- } - iconRight={} - /> + <> +
setIsTokenPickerOpen(true)}> + + {token && ( + + )} +
+ } + iconRight={} + /> + + = ({ setIsTokenPickerOpen(false); }} /> - + ); }; diff --git a/src/components/primitives/Forms/DateInput/DateInput.tsx b/src/components/primitives/Forms/DateInput/DateInput.tsx index 66a01d514..94d3bf8fb 100644 --- a/src/components/primitives/Forms/DateInput/DateInput.tsx +++ b/src/components/primitives/Forms/DateInput/DateInput.tsx @@ -1,86 +1,77 @@ -import styled from 'styled-components'; -import DateTime from 'react-datetime'; -import { Moment } from 'moment'; -import 'react-datetime/css/react-datetime.css'; +import { createGlobalStyle } from 'styled-components'; +import DatePicker from 'react-datepicker'; +import moment, { Moment } from 'moment'; +import 'react-datepicker/dist/react-datepicker.css'; import { Input, InputProps } from 'components/primitives/Forms/Input'; -import { useMemo } from 'react'; +import { forwardRef } from 'react'; -const StyledDateTime = styled(DateTime)` - .rdtPicker { - background: ${({ theme }) => theme.colors.bg3}; - box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25); +const GlobalDatePickerStyles = createGlobalStyle` + .react-datepicker { + background-color: ${({ theme }) => theme.colors.bg3}; + box-shadow: 0 0 1rem rgba(0, 0, 0, 0.4); border: 1px solid ${({ theme }) => theme.colors.border1}; - padding: 1.5rem; border-radius: 0.625rem; font-family: ${({ theme }) => theme.fonts.body}; - color: ${({ theme }) => theme.colors.grey}; - position: fixed; + color: ${({ theme }) => theme.colors.white}; } - - .rdtPicker .rdtMonths td, - .rdtPicker .rdtYears td { - height: 3.5rem; + .react-datepicker__day, .react-datepicker__day-name { + color: ${({ theme }) => theme.colors.white}; + width: 2.5rem; + line-height: 2.5rem; + } + .react-datepicker__header { + color: ${({ theme }) => theme.colors.white}; + background-color: transparent; + border-bottom: none; + padding-top: 16px; } - .rdtPicker .rdtDays td, - .rdtPicker .rdtDays th, - .rdtPicker .rdtMonths th, - .rdtPicker .rdtYears th { - height: 2.5rem; - width: 2.5rem; + .react-datepicker__navigation--previous { + left: 8px; + top: 10px; } - .rdtPicker td.rdtYear:hover, - .rdtPicker td.rdtMonth:hover, - .rdtPicker td.rdtDay:hover, - .rdtPicker td.rdtHour:hover, - .rdtPicker td.rdtMinute:hover, - .rdtPicker td.rdtSecond:hover { - background: ${({ theme }) => theme.colors.bg4}; - border-radius: 50%; - outline: 1px solid ${({ theme }) => theme.colors.text}; + .react-datepicker__navigation--next { + right: 8px; + top: 8.5px; } - .rdtPicker td.rdtTimeToggle:hover, - .rdtPicker td.rdtSwitch:hover { - background: ${({ theme }) => theme.colors.bg4}; - cursor: pointer; + .react-datepicker__day-names { + margin-top: 16px; + margin-bottom: -16px; + } + + .react-datepicker__day--keyboard-selected { + background-color: transparent; } - .rdtPicker td.rdtOld, - .rdtPicker td.rdtNew { - color: ${({ theme }) => theme.colors.grey}; + .react-datepicker__current-month, .react-datepicker__day-name { + color: ${({ theme }) => theme.colors.white}; } - .rdtPicker td.rdtToday:before { - display: none; + .react-datepicker__day:hover { + background: ${({ theme }) => theme.colors.bg4}; + border-radius: 50%; + outline: 1px solid ${({ theme }) => theme.colors.text}; } - .rdtPicker td.rdtActive, - .rdtPicker td.rdtActive:hover { + .react-datepicker__day--selected { border-radius: 50%; background-color: ${({ theme }) => theme.colors.bg1}; cursor: pointer; } - .rdtPicker th { - border: none; - } - - .rdtPicker th.rdtNext, - .rdtPicker th.rdtPrev { - vertical-align: middle; + .react-datepicker__day--outside-month { + color: ${({ theme }) => theme.colors.grey}; } - .rdtPicker th.rdtSwitch:hover, - .rdtPicker th.rdtNext:hover, - .rdtPicker th.rdtPrev:hover, - .rdtPicker .rdtCounter .rdtBtn:hover { - background: ${({ theme }) => theme.colors.bg4}; - cursor: pointer; + .react-datepicker__triangle::before, .react-datepicker__triangle::after{ + border-top-color: ${({ theme }) => theme.colors.bg3} !important; + border-bottom-color: ${({ theme }) => theme.colors.bg3} !important; } `; +// TODO: Implement time and datetime export enum InputType { DATE, TIME, @@ -101,36 +92,23 @@ export const DateInput: React.FC = ({ isValidDate = () => true, ...rest }) => { - const { dateFormat, timeFormat } = useMemo(() => { - if (inputType === InputType.DATETIME) { - return { - dateFormat: 'DD/MM/YYYY', - timeFormat: 'HH:mm:ss A', - }; - } else if (inputType === InputType.TIME) { - return { - dateFormat: false, - timeFormat: 'HH:mm:ss A', - }; - } - - return { - dateFormat: 'DD/MM/YYYY', - timeFormat: false, - }; - }, [inputType]); + const CustomInput = forwardRef(({ value, onClick }: any, ref) => ( + + )); return ( - ( - - )} - /> + <> + + { + onChange(moment(date)); + }} + dateFormat={'dd/MM/yyyy'} + onMonthChange={() => {}} + closeOnScroll={true} + customInput={} + /> + ); }; diff --git a/src/components/primitives/Forms/TokenAmountInput.tsx b/src/components/primitives/Forms/TokenAmountInput.tsx index 44e0f8369..4a427c4a3 100644 --- a/src/components/primitives/Forms/TokenAmountInput.tsx +++ b/src/components/primitives/Forms/TokenAmountInput.tsx @@ -4,6 +4,7 @@ import useStringToBigNumber from 'hooks/Guilds/conversions/useStringToBigNumber' import { useEffect, useState } from 'react'; import { InputProps } from 'components/primitives/Forms/Input'; import { NumericalInput } from 'components/primitives/Forms/NumericalInput'; +import { usePrevious } from 'utils'; export interface TokenAmountInputProps extends InputProps { decimals?: number; @@ -22,6 +23,16 @@ export const TokenAmountInput: React.FC = ({ const valueAsString = useBigNumberToString(value, decimals); + const prevDecimals = usePrevious(decimals); + useEffect(() => { + if (prevDecimals && decimals && prevDecimals !== decimals && value) { + const valueNew = BigNumber.from(value) + .div(BigNumber.from(10).pow(prevDecimals)) + .mul(BigNumber.from(10).pow(decimals)); + onChange(valueNew); + } + }, [prevDecimals, decimals, value, onChange]); + useEffect(() => { if (localAmount === '' && localAmount !== valueAsString) { setLocalAmount(valueAsString); diff --git a/src/configs/arbitrum/config.json b/src/configs/arbitrum/config.json index 9598cbc5c..0fb077d0f 100644 --- a/src/configs/arbitrum/config.json +++ b/src/configs/arbitrum/config.json @@ -1,441 +1,8 @@ { - "cache": { - "fromBlock": 338923, - "ipfsHash": "QmRvp9A9FUVzoYdyDd7mbvz3x6oJSwRqPDcH7JFiNKFmRN", - "toBlock": "10026660" - }, "contracts": { - "avatar": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "controller": "0xdB0015Fd30309D0AcB7184DD7F9Db9C46ae85674", - "permissionRegistry": "0x4f42BA46fD4d194CA63C40496E78f939EdC99e8C", - "reputation": "0x7552Bdc956947E8caa340B4E76E6eFE40764Beeb", - "token": "0xC3Ae0333F0F34aa734D5493276223d95B8F9Cb37", "utils": { - "multicall": "0x9645D0CEC58F0D28Be9660b9a4D464AB193817B3" - }, - "votingMachines": { - "0x02F93D46C2B56777e9C82CF40917979375C2c711": { - "token": "0xC3Ae0333F0F34aa734D5493276223d95B8F9Cb37", - "type": "DXDVotingMachine" - } + "guildRegistry": "" } }, - "proposalTemplates": [ - { - "description": "# Background\n \n - If this is your first contributor proposal, state any context for making the proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Who you have been in contact with regarding the position (add their DAOtalk usernames)\n - If you are a continuing contributor, state which products and areas you are working on / any other relevant background information\n # Timeframe\n \n - State the date range, typically 2 months (2.5 months for first-time workers)\n # Scope of Contribution\n \n - **Goals** :\n - State the products and /or strategy areas you will be working under. E.g. Omen and Governance. Include both short-term goals that you seek to accomplish during the working period and long-term goals.\n - **Responsibilities:**\n - List the specific deliverables you will be either completing and / or working on during the working period. Try to state which deliverables you intend to complete within the period and which are long-term or ongoing projects.\n \n # Reflection\n \n - If You Are A Returning Contributor, Write a Self-Reflection\n - State what you did well, what you did okay, and what you need to improve on\n # Compensation\n \n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For 2 months of work at level [LEVEL], to be sent half on the first payment proposal and half on the second payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP] : For 2 months of work , to be sent half on the first payment proposal and half on the second payment proposal\n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described deliverables\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n", - "name": "Contributor Proposal", - "title": "[NAME] Contributor Proposal [DATE - DATE]" - }, - { - "description": "# Timeframe\n \n - State the contributor proposal date range\n \n # Background\n \n - State the context for making the contributor payment proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Proposed Scope of Contribution\n - Self-Reflection on Scope of Contribution\n - Include the URL to the original proposal forum post\n \n # Deliverables\n\n - Include information around deliverables that were completed during your worker period\n \n # Compensation\n\n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For second half payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP]: For 2 second half payment proposal\n \n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n \n", - "name": "Payment Proposal", - "title": "[NAME] Payment Proposal [DATE - DATE]" - }, - { - "description": "## Description \n\n## Proposition \n\n## Action Plan", - "name": "Signal Proposal", - "title": "Signal Proposal for [DAO_ACTION]" - }, - { - "calls": [ - { - "functionName": "approve(address,uint256)", - "params": [ - "0xecA7F78d59D16812948849663b26FE10E320f80C", - "" - ], - "to": "0xdE903E2712288A1dA82942DDdF2c20529565aC30" - }, - { - "functionName": "createDistribution(address[],address,uint256[],uint64,uint64,bool,uint256)", - "params": [ - "[0xdE903E2712288A1dA82942DDdF2c20529565aC30]", - "", - "[]", - "", - "", - "false", - "0" - ], - "to": "0xecA7F78d59D16812948849663b26FE10E320f80C" - } - ], - "description": "Simple description", - "name": "SWPR Farming Campaign", - "title": "[PAIR X/Y] Farming Campaign [DATE - DATE]]" - } - ], - "proposalTypes": [ - { - "id": "custom", - "title": "Custom" - } - ], - "recommendedCalls": [ - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set vote refund to [PARAM_0] gas and [PARAM_1] max gas price", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setOrganizationRefund(uint256,uint256)", - "params": [ - { - "defaultValue": "", - "name": "_voteGas", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "_maxGasPrice", - "type": "uint256" - } - ], - "to": "0x02F93D46C2B56777e9C82CF40917979375C2c711", - "toName": "DXD Voting Machine" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set boosted required percentage for scheme [PARAM_0] to ([PARAM_2]/100) %", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setBoostedVoteRequiredPercentage(address,bytes32,uint256)", - "params": [ - { - "defaultValue": "", - "name": "_scheme", - "type": "address" - }, - { - "defaultValue": "", - "name": "_paramsHash", - "type": "bytes32" - }, - { - "defaultValue": "", - "name": "_boostedVotePeriodLimit", - "type": "uint256" - } - ], - "to": "0x5786e7a0A1aB6a4040a77fcbcD144E649A6d4939", - "toName": "DXD Voting Machine" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Registrar Wallet Scheme to [PARAM_0] seconds", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0x628eC805A9FB5B79D21867f5fda9DEFA3967aA71", - "toName": "RegistrarWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Master Wallet Scheme to [PARAM_0] seconds", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0xc0071bd6CD9ce77A7F5270A90664A88A1A664A8c", - "toName": "MasterWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Quick Wallet Scheme to [PARAM_0] seconds", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0x6Bb0c340d6Fb4Fb5731Bf6EeE0D12bb60cFEDb47", - "toName": "QuickWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Quick Wallet Scheme to [PARAM_0] seconds", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0x3172eDDa6ff8B2b2Fa7FeD40EE1fD92F1F4dd424", - "toName": "SWPRWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Quick Wallet Scheme to [PARAM_0] seconds", - "from": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0xcab5367De13B5409Ee85689465B4553C375FB20d", - "toName": "TestWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Transfer swpr pair [PARAM_0] ownership to [PARAM_1]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "transferPairOwnership(address,address)", - "params": [ - { - "defaultValue": "", - "name": "pair", - "type": "address" - }, - { - "defaultValue": "", - "name": "newOwner", - "type": "address" - } - ], - "to": "0x56F53CB6c0a80947C9Be239A62bc65fA20d4b41d", - "toName": "Swpr Fee Setter" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set swpr protocol fee denominator to [PARAM_0]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "setProtocolFee(uint8)", - "params": [ - { - "defaultValue": "", - "name": "protocolFeeDenominator", - "type": "uint8" - } - ], - "to": "0x56F53CB6c0a80947C9Be239A62bc65fA20d4b41d", - "toName": "Swpr Fee Setter" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set swpr fee for pair [PARAM_0] to [PARAM_1]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "setSwapFee(address,uint32)", - "params": [ - { - "defaultValue": "", - "name": "pair", - "type": "address" - }, - { - "defaultValue": "", - "name": "swapFee", - "type": "uint32" - } - ], - "to": "0x56F53CB6c0a80947C9Be239A62bc65fA20d4b41d", - "toName": "Swpr Fee Setter" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Take protocol fee from swpr pairs [PARAM_0]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "takeProtocolFee(address[])", - "params": [ - { - "defaultValue": "", - "name": "pairs", - "type": "address[]" - } - ], - "to": "0x1D7C7cb66fB2d75123351FD0d6779E8d7724a1ae", - "toName": "Swpr Fee Receiver" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Add liquidity with [PARAM_2] value of token [PARAM_0] and [PARAM_4] value of token [PARAM_1] to address [PARAM_6]", - "from": "0x3172eDDa6ff8B2b2Fa7FeD40EE1fD92F1F4dd424", - "functionName": "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)", - "params": [ - { - "defaultValue": "", - "name": "tokenA", - "type": "address" - }, - { - "defaultValue": "", - "name": "tokenB", - "type": "address" - }, - { - "defaultValue": "", - "name": "amountADesired", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountBDesired", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountAMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountBMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "to", - "type": "address" - }, - { - "defaultValue": "", - "name": "deadline", - "type": "uint256" - } - ], - "to": "0x530476d5583724A89c8841eB6Da76E7Af4C0F17E", - "toName": "Swpr Router" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Remove and send [PARAM_2] liquidity tokens from pool with tokens [PARAM_0] - [PARAM_1] to address [PARAM_5]", - "from": "0x3172eDDa6ff8B2b2Fa7FeD40EE1fD92F1F4dd424", - "functionName": "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)", - "params": [ - { - "defaultValue": "", - "name": "tokenA", - "type": "address" - }, - { - "defaultValue": "", - "name": "tokenB", - "type": "address" - }, - { - "defaultValue": "", - "name": "liquidity", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountAMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountBMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "to", - "type": "address" - }, - { - "defaultValue": "", - "name": "deadline", - "type": "uint256" - } - ], - "to": "0x530476d5583724A89c8841eB6Da76E7Af4C0F17E", - "toName": "Swpr Router" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Create liquidity mining campaign on pair [PARAM_1] starting at [PARAM_3] and ending at [PARAM_4], with reward tokens [PARAM_0], reward amounts [PARAM_2]. Cap put at [PARAM_6] and locked status [PARAM_5]", - "from": "0x3172eDDa6ff8B2b2Fa7FeD40EE1fD92F1F4dd424", - "functionName": "createDistribution(address[],address,uint256[],uint64,uint64,bool,uint256)", - "params": [ - { - "defaultValue": "", - "name": "rewardTokensAddresses", - "type": "address[]" - }, - { - "defaultValue": "", - "name": "stakableTokenAddress", - "type": "address" - }, - { - "defaultValue": "", - "name": "rewardAmounts", - "type": "uint256[]" - }, - { - "defaultValue": "", - "name": "startingTimestamp", - "type": "uint64" - }, - { - "defaultValue": "", - "name": "endingTimestamp", - "type": "uint64" - }, - { - "defaultValue": "", - "name": "locked", - "type": "bool" - }, - { - "defaultValue": "", - "name": "stakingCap", - "type": "uint256" - } - ], - "to": "0xecA7F78d59D16812948849663b26FE10E320f80C", - "toName": "Swapr liquidity mining campaigns factory" - } - ], - "tokens": [ - { - "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e/logo.png", - "name": "Wrapped Ether", - "symbol": "WETH" - }, - { - "address": "0xC3Ae0333F0F34aa734D5493276223d95B8F9Cb37", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/11148/thumb/dxdao.png?1607999331", - "name": "DXdao", - "symbol": "DXD" - }, - { - "address": "0xdE903E2712288A1dA82942DDdF2c20529565aC30", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://ipfs.io/ipfs/QmWF6nPb4y2DehfGRzKGaekXQzShSQ11uzMNmxsLJQxBUQ", - "name": "SWPR Token", - "symbol": "SWPR" - }, - { - "address": "0x9f20de1fc9b161b34089cbEAE888168B44b03461", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/18594/small/NcAIaWlc_400x400_%281%29.jpg", - "name": "ARBIS", - "symbol": "ARBIS" - } - ], "version": 1 } \ No newline at end of file diff --git a/src/configs/arbitrumTestnet/config.json b/src/configs/arbitrumTestnet/config.json index bc74ad513..0fb077d0f 100644 --- a/src/configs/arbitrumTestnet/config.json +++ b/src/configs/arbitrumTestnet/config.json @@ -1,441 +1,8 @@ { - "cache": { - "fromBlock": 3995726, - "ipfsHash": "QmXavj3tchxsqpXCPB4g18NikoyGd2c22syDF4Sijn3f8n", - "toBlock": "11296050" - }, "contracts": { - "avatar": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "controller": "0x91509d26D0218D15C19eB341a25B57f302792765", - "permissionRegistry": "0x13f3A639f4c83723675672B2C7084413eea01D48", - "reputation": "0x12cCaa029F525fB4262e40D1a6dDdf2817af3fE9", - "token": "0x5d47100B0854525685907D5D773b92c22c0c745e", "utils": { - "dxDaoNFT": "0xDC50FE5862D5541C6D0b9B07f15Fe016Cdacb431", - "dxdVestingFactory": "0xA5431A66874627948d4Ab68E033177f8982C3A2C", - "multicall": "0xac380E8434Db942B5902956E8Dc7cD9d6A66bc74" - }, - "votingMachines": { - "0x5786e7a0A1aB6a4040a77fcbcD144E649A6d4939": { - "token": "0x5d47100B0854525685907D5D773b92c22c0c745e", - "type": "DXDVotingMachine" - } + "guildRegistry": "" } }, - "proposalTemplates": [ - { - "description": "# Background\n \n - If this is your first contributor proposal, state any context for making the proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Who you have been in contact with regarding the position (add their DAOtalk usernames)\n - If you are a continuing contributor, state which products and areas you are working on / any other relevant background information\n # Timeframe\n \n - State the date range, typically 2 months (2.5 months for first-time workers)\n # Scope of Contribution\n \n - **Goals** :\n - State the products and /or strategy areas you will be working under. E.g. Omen and Governance. Include both short-term goals that you seek to accomplish during the working period and long-term goals.\n - **Responsibilities:**\n - List the specific deliverables you will be either completing and / or working on during the working period. Try to state which deliverables you intend to complete within the period and which are long-term or ongoing projects.\n \n # Reflection\n \n - If You Are A Returning Contributor, Write a Self-Reflection\n - State what you did well, what you did okay, and what you need to improve on\n # Compensation\n \n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For 2 months of work at level [LEVEL], to be sent half on the first payment proposal and half on the second payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP] : For 2 months of work , to be sent half on the first payment proposal and half on the second payment proposal\n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described deliverables\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n", - "name": "Contributor Proposal", - "title": "[NAME] Contributor Proposal [DATE - DATE]" - }, - { - "description": "# Timeframe\n \n - State the contributor proposal date range\n \n # Background\n \n - State the context for making the contributor payment proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Proposed Scope of Contribution\n - Self-Reflection on Scope of Contribution\n - Include the URL to the original proposal forum post\n \n # Deliverables\n\n - Include information around deliverables that were completed during your worker period\n \n # Compensation\n\n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For second half payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP]: For 2 second half payment proposal\n \n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n \n", - "name": "Payment Proposal", - "title": "[NAME] Payment Proposal [DATE - DATE]" - }, - { - "description": "## Description \n\n## Proposition \n\n## Action Plan", - "name": "Signal Proposal", - "title": "Signal Proposal for [DAO_ACTION]" - }, - { - "calls": [ - { - "functionName": "approve(address,uint256)", - "params": [ - "0xecA7F78d59D16812948849663b26FE10E320f80C", - "" - ], - "to": "0xdE903E2712288A1dA82942DDdF2c20529565aC30" - }, - { - "functionName": "createDistribution(address[],address,uint256[],uint64,uint64,bool,uint256)", - "params": [ - "[0xdE903E2712288A1dA82942DDdF2c20529565aC30]", - "", - "[]", - "", - "", - "false", - "0" - ], - "to": "0xecA7F78d59D16812948849663b26FE10E320f80C" - } - ], - "description": "Simple description", - "name": "SWPR Farming Campaign", - "title": "[PAIR X/Y] Farming Campaign [DATE - DATE]]" - } - ], - "proposalTypes": [ - { - "id": "custom", - "title": "Custom" - } - ], - "recommendedCalls": [ - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set vote refund to [PARAM_0] gas and [PARAM_1] max gas price", - "from": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "functionName": "setOrganizationRefund(uint256,uint256)", - "params": [ - { - "defaultValue": "", - "name": "_voteGas", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "_maxGasPrice", - "type": "uint256" - } - ], - "to": "0x5786e7a0A1aB6a4040a77fcbcD144E649A6d4939", - "toName": "DXD Voting Machine" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set boosted required percentage for scheme [PARAM_0] to ([PARAM_2]/100) %", - "from": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "functionName": "setBoostedVoteRequiredPercentage(address,bytes32,uint256)", - "params": [ - { - "defaultValue": "", - "name": "_scheme", - "type": "address" - }, - { - "defaultValue": "", - "name": "_paramsHash", - "type": "bytes32" - }, - { - "defaultValue": "", - "name": "_boostedVotePeriodLimit", - "type": "uint256" - } - ], - "to": "0x5786e7a0A1aB6a4040a77fcbcD144E649A6d4939", - "toName": "DXD Voting Machine" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Registrar Wallet Scheme to [PARAM_0] seconds", - "from": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0x3d432D43805AF80733CF492b6C42DB0ff3eB185e", - "toName": "RegistrarWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Master Wallet Scheme to [PARAM_0] seconds", - "from": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0x39405F3f7F2c3E72c1B21544F2539fAD83F7dD4c", - "toName": "MasterWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Quick Wallet Scheme to [PARAM_0] seconds", - "from": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0x8a6428Ccb48FFEb8619cbc18a479feCA22d784d3", - "toName": "QuickWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set max seconds for execution in Quick Wallet Scheme to [PARAM_0] seconds", - "from": "0x6370B3Ba7D9bAd94b35dC9073540E562bDe5Fdc3", - "functionName": "setMaxSecondsForExecution(uint256)", - "params": [ - { - "defaultValue": "", - "name": "_maxSecondsForExecution", - "type": "uint256" - } - ], - "to": "0xA28A7e5D8E4BE7175aCB817D5b89ED88bD1e30B5", - "toName": "SWPRWalletScheme" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Transfer swpr pair [PARAM_0] ownership to [PARAM_1]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "transferPairOwnership(address,address)", - "params": [ - { - "defaultValue": "", - "name": "pair", - "type": "address" - }, - { - "defaultValue": "", - "name": "newOwner", - "type": "address" - } - ], - "to": "0x876BE4A79d154d4B2edE7c593B2E048756049B26", - "toName": "Swpr Fee Setter" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set swpr protocol fee denominator to [PARAM_0]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "setProtocolFee(uint8)", - "params": [ - { - "defaultValue": "", - "name": "protocolFeeDenominator", - "type": "uint8" - } - ], - "to": "0x876BE4A79d154d4B2edE7c593B2E048756049B26", - "toName": "Swpr Fee Setter" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Set swpr fee for pair [PARAM_0] to [PARAM_1]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "setSwapFee(address,uint32)", - "params": [ - { - "defaultValue": "", - "name": "pair", - "type": "address" - }, - { - "defaultValue": "", - "name": "swapFee", - "type": "uint32" - } - ], - "to": "0x876BE4A79d154d4B2edE7c593B2E048756049B26", - "toName": "Swpr Fee Setter" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Take protocol fee from swpr pairs [PARAM_0]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "takeProtocolFee(address[])", - "params": [ - { - "defaultValue": "", - "name": "pairs", - "type": "address[]" - } - ], - "to": "0xB01988E0039230B52256BB4Db4496a6C79092B4f", - "toName": "Swpr Fee Receiver" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Add liquidity with [PARAM_2] value of token [PARAM_0] and [PARAM_4] value of token [PARAM_1] to address [PARAM_6]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)", - "params": [ - { - "defaultValue": "", - "name": "tokenA", - "type": "address" - }, - { - "defaultValue": "", - "name": "tokenB", - "type": "address" - }, - { - "defaultValue": "", - "name": "amountADesired", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountBDesired", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountAMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountBMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "to", - "type": "address" - }, - { - "defaultValue": "", - "name": "deadline", - "type": "uint256" - } - ], - "to": "0xb5a35165047fed7440D3a75909c0949bf1943696", - "toName": "Swpr Router" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Remove and send [PARAM_2] liquidity tokens from pool with tokens [PARAM_0] - [PARAM_1] to address [PARAM_5]", - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "functionName": "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)", - "params": [ - { - "defaultValue": "", - "name": "tokenA", - "type": "address" - }, - { - "defaultValue": "", - "name": "tokenB", - "type": "address" - }, - { - "defaultValue": "", - "name": "liquidity", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountAMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "amountBMin", - "type": "uint256" - }, - { - "defaultValue": "", - "name": "to", - "type": "address" - }, - { - "defaultValue": "", - "name": "deadline", - "type": "uint256" - } - ], - "to": "0xb5a35165047fed7440D3a75909c0949bf1943696", - "toName": "Swpr Router" - }, - { - "asset": "0x0000000000000000000000000000000000000000", - "decodeText": "Create liquidity mining campaign on pair [PARAM_1] starting at [PARAM_3] and ending at [PARAM_4], with reward tokens [PARAM_0], reward amounts [PARAM_2]. Cap put at [PARAM_6] and locked status [PARAM_5]", - "from": "0xA28A7e5D8E4BE7175aCB817D5b89ED88bD1e30B5", - "functionName": "createDistribution(address[],address,uint256[],uint64,uint64,bool,uint256)", - "params": [ - { - "defaultValue": "", - "name": "rewardTokensAddresses", - "type": "address[]" - }, - { - "defaultValue": "", - "name": "stakableTokenAddress", - "type": "address" - }, - { - "defaultValue": "", - "name": "rewardAmounts", - "type": "uint256[]" - }, - { - "defaultValue": "", - "name": "startingTimestamp", - "type": "uint64" - }, - { - "defaultValue": "", - "name": "endingTimestamp", - "type": "uint64" - }, - { - "defaultValue": "", - "name": "locked", - "type": "bool" - }, - { - "defaultValue": "", - "name": "stakingCap", - "type": "uint256" - } - ], - "to": "0x41e657cAdE74f45b7E2F0F4a5AeE0239f2fB4E1F", - "toName": "Swapr liquidity mining campaigns factory" - } - ], - "tokens": [ - { - "address": "0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e/logo.png", - "name": "Wrapped Ether", - "symbol": "WETH" - }, - { - "address": "0x5d47100B0854525685907D5D773b92c22c0c745e", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/11148/thumb/dxdao.png?1607999331", - "name": "DXdao", - "symbol": "DXD" - }, - { - "address": "0x8f2072c2142D9fFDc785955E0Ce71561753D44Fb", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://ipfs.io/ipfs/QmWF6nPb4y2DehfGRzKGaekXQzShSQ11uzMNmxsLJQxBUQ", - "name": "SWPR Token", - "symbol": "SWPR" - }, - { - "address": "0x5c6e8F8B4f657b1aC81BFA1aF9145ed048bB1E48", - "decimals": 18, - "fetchPrice": true, - "name": "Weenus", - "symbol": "WEENUS" - }, - { - "address": "0xE76c8D027f54882ab1B0Ae8C193ac4Cb791A456a", - "decimals": 18, - "fetchPrice": true, - "name": "Xeenus", - "symbol": "XEENUS" - }, - { - "address": "0x409318c1a5b3Abd1058fe4b91402268A26b9b159", - "decimals": 8, - "fetchPrice": true, - "name": "Yeenus", - "symbol": "YEENUS" - } - ], "version": 1 } \ No newline at end of file diff --git a/src/configs/goerli/config.json b/src/configs/goerli/config.json index 13d6986ab..1d7d05c3c 100644 --- a/src/configs/goerli/config.json +++ b/src/configs/goerli/config.json @@ -1,29 +1,8 @@ { "contracts": { "utils": { - "dxDaoNFT": "0xF7A2f72E8f6aeb884905a1fE515c1BB5752D342f", - "dxdVestingFactory": "0xB5D42c8cA3B04479200E3782C41D99b46Cf8A6E1", - "guildRegistry": "0x304de4fd740e73db7f8a4fC11f41680d51dB1aF2", - "multicall": "0x1FDD273e0B7E0d921Bda044Ebf64811428A79f15" + "guildRegistry": "0x304de4fd740e73db7f8a4fC11f41680d51dB1aF2" } }, - "tokens": [ - { - "address": "0x2f9343cf18baacf57ac4a4e20188b9b00cfce3f1", - "name": "SWAPR", - "decimals": 18, - "symbol": "SWPR", - "fetchPrice": true, - "logoURI": "https://s2.coinmarketcap.com/static/img/coins/200x200/12368.png" - }, - { - "address": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", - "name": "Wrapped ETH", - "decimals": 18, - "symbol": "WETH", - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1547036627" - } - ], "version": 1 } \ No newline at end of file diff --git a/src/configs/index.ts b/src/configs/index.ts index ab7c4f463..1dc582cc7 100644 --- a/src/configs/index.ts +++ b/src/configs/index.ts @@ -1,2 +1,13 @@ -export const RICH_CONTRACT_DATA_REGISTRY = 'QmeacC3QZgWaYYrd6m4b7dbBQVEZcgei5XFhxrq5czn5u3'; -export const SITE_ID = 'NYKJUYYQ' +export const RICH_CONTRACT_DATA_REGISTRY = + 'QmeacC3QZgWaYYrd6m4b7dbBQVEZcgei5XFhxrq5czn5u3'; +export const SITE_ID = 'NYKJUYYQ'; +export const SENTRY_ID = '4504496775561216' +export const moderators = [ + '0x0b17cf48420400e1D71F8231d4a8e43B3566BB5B', + '0x91aef3c3b9bab2c306548269ff9b6771f2b107d8', + '0x95a223299319022a842d0dfe4851c145a2f615b9', + '0x29e1a61fccd40408f489336993e798d14d57d77f', + '0x08eec580ad41e9994599bad7d2a74a9874a2852c', + '0x1861974f32eaCDCceD0F81b0f8eCcFeD58153a9D', +]; + diff --git a/src/configs/mainnet/config.json b/src/configs/mainnet/config.json index b95c4090a..940109bdd 100644 --- a/src/configs/mainnet/config.json +++ b/src/configs/mainnet/config.json @@ -1,963 +1,8 @@ { - "cache": { - "fromBlock": 7219912, - "ipfsHash": "QmSiUzqh2W8EvBJWJ5BUQbzBZiYwN5JsotrZ6RjEueMeJD", - "toBlock": "14831037" - }, "contracts": { - "avatar": "0x519b70055af55a007110b4ff99b0ea33071c720a", - "controller": "0x9f828ac3baa9003e8a4e0b24bcae7b027b6740b0", - "daostack": { - "0x08cC7BBa91b849156e9c44DEd51896B38400f55B": { - "contractToCall": "0x9f828ac3baa9003e8a4e0b24bcae7b027b6740b0", - "creationLogEncoding": [ - [ - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_reputationChange", - "type": "int256" - }, - { - "name": "_rewards", - "type": "uint256[5]" - }, - { - "name": "_externalToken", - "type": "address" - }, - { - "name": "_beneficiary", - "type": "address" - } - ] - ], - "name": "ContributionReward", - "newProposalTopics": [ - [ - "0xcbdcbf9aaeb1e9eff0f75d74e1c1e044bc87110164baec7d18d825b0450d97df", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "redeemer": "0x406bfD9cDb247432fEEA52edD218F2a4Bd238C9b", - "supported": true, - "type": "ContributionReward", - "voteParams": "0x399141801e9e265d79f1f1759dd67932980664ea28c2ba7e0e4dba8719e47118", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x0f4775722a72FA85230c63598e661eC52563Fb4E": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [ - [ - { - "name": "_callsData", - "type": "bytes[]" - }, - { - "name": "_values", - "type": "uint256[]" - }, - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_contractsToCall", - "type": "address[]" - } - ] - ], - "name": "Multicall_3", - "newProposalTopics": [ - [ - "0xf5a0655bd7247f3a6fa97e71b57c61314566afb5aa8be8eea2c48f4d1b9bf190", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": true, - "type": "GenericMulticall", - "voteParams": "0xe5e87e294b422b2aa711bd25a7e8ac59a06bbf723786560c53c50edce980f2fd", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x199719EE4d5DCF174B80b80afa1FE4a8e5b0E3A0": { - "contractToCall": "0xb9812E2fA995EC53B5b6DF34d21f9304762C5497", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "DutchXScheme", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0xff6155010292b35fb8daae8b4450cdc41a586bc591e9a76484e88ffba36f94a8", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x1cb5B2BB4030220ad5417229A7A1E3c373cDD2F6": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "DxLockWhitelisted4Rep", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x2E6FaE82c77e1D6433CCaAaF90281523b99D0D0a": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "DxLockMgnForRep", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x34C42c3ee81A03FD9ea773987b4a6eF62f3fc151": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [ - [ - { - "name": "_callsData", - "type": "bytes[]" - }, - { - "name": "_values", - "type": "uint256[]" - }, - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_contractsToCall", - "type": "address[]" - } - ] - ], - "name": "Multicall_2", - "newProposalTopics": [ - [ - "0xf5a0655bd7247f3a6fa97e71b57c61314566afb5aa8be8eea2c48f4d1b9bf190", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": true, - "type": "GenericMulticall", - "voteParams": "0x8a8f5413c9b49a4ed4df33213f474a0ae29328a81b3c40c881e8a3fab0d12b44", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x4564BFe303900178578769b2D76B1a13533E5fd5": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "DxLockEth4Rep", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x46DF3EA38a680FBc84E744D92b0A8Ec717B2eA7E": { - "contractToCall": "0x314159265dd8dbb310642f98f50c066173c1259b", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "GenericSchemeToENS", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0x29ddbf85a0d14e08084cd9764c66ff2799d05355edf7f546c5af1c847a2d9734", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x4D8DB062dEFa0254d00a44aA1602C30594e47B12": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "DxGenAuction4Rep", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x973ce4e81BdC3bD39f46038f3AaA928B04558b08": { - "contractToCall": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "EnsRegistrarScheme", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0x29ddbf85a0d14e08084cd9764c66ff2799d05355edf7f546c5af1c847a2d9734", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x9A543aeF934c21Da5814785E38f9A7892D3CDE6E": { - "contractToCall": "0x226159d592e2b063810a10ebf6dcbada94ed68b8", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "EnsPublicProviderScheme", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0x29ddbf85a0d14e08084cd9764c66ff2799d05355edf7f546c5af1c847a2d9734", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0x9CEA0DD05C4344A769B2F4C2f8890EDa8a700d64": { - "contractToCall": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "EnsRegistryScheme", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0x0dc1fb4d230debe146613511601e0df83dd5ac323a7add833de82ead5a19db3a", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0xB3ec6089556CcA49549Be01fF446cF40fA81c84D": { - "contractToCall": "0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "EnsPublicResolverScheme", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0xa81f982cb1c27eb142e5f602e7eb50d125dd6a7e52dac1af5f9decb88278f2fa", - "votingMachine": "0x1C18bAd5a3ee4e96611275B13a8ed062B4a13055" - }, - "0xc072171dA83CCe311e37BC1d168f54E6A6536DF4": { - "contractToCall": "0x93db90445b76329e9ed96ecd74e76d8fbf2590d8", - "creationLogEncoding": [ - [ - { - "name": "_data", - "type": "bytes" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "TokenRegistry", - "newProposalTopics": [ - [ - "0x36418f82d814fb021ca04ebdc2c4a3cd69f719851f597c489bca2ed245e8c8ad", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": false, - "type": "GenericScheme", - "voteParams": "0x8452e57c89dc78ec1b1ffc28786655279f9af4ac589dd5988c962e8cf6b4529b", - "votingMachine": "0x1C18bAd5a3ee4e96611275B13a8ed062B4a13055" - }, - "0xef9dC3c39CA40A2a3000ACc5ca0467CE1C250808": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [ - [ - { - "name": "_callsData", - "type": "bytes[]" - }, - { - "name": "_values", - "type": "uint256[]" - }, - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_contractsToCall", - "type": "address[]" - } - ] - ], - "name": "Multicall_1", - "newProposalTopics": [ - [ - "0xf5a0655bd7247f3a6fa97e71b57c61314566afb5aa8be8eea2c48f4d1b9bf190", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": true, - "type": "GenericMulticall", - "voteParams": "0xe5e87e294b422b2aa711bd25a7e8ac59a06bbf723786560c53c50edce980f2fd", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - }, - "0xf050F3C6772Ff35eB174A6900833243fcCD0261F": { - "contractToCall": "0x9f828ac3baa9003e8a4e0b24bcae7b027b6740b0", - "creationLogEncoding": [ - [ - { - "name": "_scheme ", - "type": "address" - }, - { - "name": "_parametersHash", - "type": "bytes32" - }, - { - "name": "_permissions", - "type": "bytes4" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ], - [ - { - "name": "_scheme ", - "type": "address" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "SchemeRegistrar", - "newProposalTopics": [ - [ - "0xcc9180a05805acc3615b472c3ba00cdc9cd2c6e0e0b3648d60eb58f2c1001b84", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ], - [ - "0x504b6bd2558241a5f0532c970f3444e1fc24e1f7cf3d7c49a8d213bd612e9055", - "0x000000000000000000000000519b70055af55a007110b4ff99b0ea33071c720a" - ] - ], - "supported": true, - "type": "SchemeRegistrar", - "voteParams": "0x9799ec39e42562c5ac7fbb104f1edcaa495e00b45e0db80cce1c0cdc863d0d0f", - "votingMachine": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84" - } - }, - "permissionRegistry": "0x0000000000000000000000000000000000000000", - "reputation": "0x7a927a93f221976aae26d5d077477307170f0b7c", - "token": "0x643b14f6ea235668278da5974930105852f2b7c4", "utils": { - "multicall": "0x742121cD0BB9784c1f17f25B8da1bF3445b93ED4", "guildRegistry": "0x7E6EB84621c3bb8455046f380c3934fAf8076158" - }, - "votingMachines": { - "0x1C18bAd5a3ee4e96611275B13a8ed062B4a13055": { - "token": "0x543ff227f64aa17ea132bf9886cab5db55dcaddf", - "type": "GenesisProtocol" - }, - "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84": { - "token": "0x543ff227f64aa17ea132bf9886cab5db55dcaddf", - "type": "GenesisProtocol" - } } }, - "proposalTemplates": [ - { - "description": "# Background\n \n - If this is your first contributor proposal, state any context for making the proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Who you have been in contact with regarding the position (add their DAOtalk usernames)\n - If you are a continuing contributor, state which products and areas you are working on / any other relevant background information\n # Timeframe\n \n - State the date range, typically 2 months (2.5 months for first-time workers)\n # Scope of Contribution\n \n - **Goals** :\n - State the products and /or strategy areas you will be working under. E.g. Omen and Governance. Include both short-term goals that you seek to accomplish during the working period and long-term goals.\n - **Responsibilities:**\n - List the specific deliverables you will be either completing and / or working on during the working period. Try to state which deliverables you intend to complete within the period and which are long-term or ongoing projects.\n \n # Reflection\n \n - If You Are A Returning Contributor, Write a Self-Reflection\n - State what you did well, what you did okay, and what you need to improve on\n # Compensation\n \n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For 2 months of work at level [LEVEL], to be sent half on the first payment proposal and half on the second payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP] : For 2 months of work , to be sent half on the first payment proposal and half on the second payment proposal\n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described deliverables\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n", - "name": "Contributor Proposal", - "title": "[NAME] Contributor Proposal [DATE - DATE]" - }, - { - "description": "# Timeframe\n \n - State the contributor proposal date range\n \n # Background\n \n - State the context for making the contributor payment proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Proposed Scope of Contribution\n - Self-Reflection on Scope of Contribution\n - Include the URL to the original proposal forum post\n \n # Deliverables\n\n - Include information around deliverables that were completed during your worker period\n \n # Compensation\n\n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For second half payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP]: For 2 second half payment proposal\n \n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n \n", - "name": "Payment Proposal", - "title": "[NAME] Payment Proposal [DATE - DATE]" - }, - { - "description": "## Description \n\n## Proposition \n\n## Action Plan", - "name": "Signal Proposal", - "title": "Signal Proposal for [DAO_ACTION]" - }, - { - "calls": [ - { - "functionName": "approve(address,uint256)", - "params": [ - "0xecA7F78d59D16812948849663b26FE10E320f80C", - "" - ], - "to": "0xdE903E2712288A1dA82942DDdF2c20529565aC30" - }, - { - "functionName": "createDistribution(address[],address,uint256[],uint64,uint64,bool,uint256)", - "params": [ - "[0xdE903E2712288A1dA82942DDdF2c20529565aC30]", - "", - "[]", - "", - "", - "false", - "0" - ], - "to": "0xecA7F78d59D16812948849663b26FE10E320f80C" - } - ], - "description": "Simple description", - "name": "SWPR Farming Campaign", - "title": "[PAIR X/Y] Farming Campaign [DATE - DATE]]" - } - ], - "proposalTypes": [ - { - "id": "custom", - "title": "Custom" - } - ], - "recommendedCalls": [], - "tokens": [ - { - "address": "0x111111111117dc0aa78b770fa6a738034120c302", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028", - "name": "1Inch", - "symbol": "1INCH" - }, - { - "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", - "decimals": 18, - "fetchPrice": false, - "logoURI": "ipfs://QmWzL3TSmkMhbqGBEwyeFyWVvLmEo3F44HBMFnmTUiTfp1", - "name": "Aave Token", - "symbol": "AAVE" - }, - { - "address": "0x8185Bc4757572Da2a610f887561c32298f1A5748", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/14379/thumb/ALN-token-logo-200px.png?1615778759", - "name": "Aluna", - "symbol": "ALN" - }, - { - "address": "0xa117000000f279D81A1D3cc75430fAA017FA5A2e", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/681/thumb/JelZ58cv_400x400.png?1601449653", - "name": "Aragon Network Token", - "symbol": "ANT" - }, - { - "address": "0x0b38210ea11411557c13457D4dA7dC6ea731B88a", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/13256/thumb/api3.jpg?1606751424", - "name": "API3", - "symbol": "API3" - }, - { - "address": "0x374CB8C27130E2c9E04F44303f3c8351B9De61C1", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/13547/thumb/BaoLogo.png?1615342483", - "name": "BaoToken", - "symbol": "BAO" - }, - { - "address": "0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/736/thumb/bancor.png?1547034477", - "name": "Bancor Network Token", - "symbol": "BNT" - }, - { - "address": "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643", - "decimals": 8, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/9281/thumb/cDAI.png?1576467585", - "name": "Compound Dai", - "symbol": "cDAI" - }, - { - "address": "0x06AF07097C9Eeb7fD685c692751D5C66dB49c215", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/10147/thumb/CHAI.png?1576467289", - "name": "Chai", - "symbol": "CHAI" - }, - { - "address": "0xc00e94Cb662C3520282E6f5717214004A7f26888", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/10775/thumb/COMP.png?1592625425", - "name": "Compound", - "symbol": "COMP" - }, - { - "address": "0xD533a949740bb3306d119CC777fa900bA034cd52", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12124/thumb/Curve.png?1597369484", - "name": "Curve DAO Token", - "symbol": "CRV" - }, - { - "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/9956/thumb/dai-multi-collateral-mcd.png?1574218774", - "name": "Dai Stablecoin", - "symbol": "DAI" - }, - { - "address": "0xEd91879919B71bB6905f23af0A68d231EcF87b14", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/11677/thumb/dmm.png?1592674690", - "name": "DMM: Governance", - "symbol": "DMG" - }, - { - "address": "0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12508/thumb/dht.png?1600752201", - "name": "dHedge DAO Token", - "symbol": "DHT" - }, - { - "address": "0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/11955/thumb/DIA-icon-colour_%281%29.png?1596423488", - "name": "DIAToken", - "symbol": "DIA" - }, - { - "address": "0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12465/thumb/defi_pulse_index_set.png?1600051053", - "name": "DefiPulse Index", - "symbol": "DPI" - }, - { - "address": "0xa1d65E8fB6e87b60FECCBc582F7f97804B725521", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/11148/thumb/dxdao.png?1607999331", - "name": "DXdao", - "symbol": "DXD" - }, - { - "address": "0x970B9bB2C0444F5E81e9d0eFb84C8ccdcdcAf84d", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/10347/thumb/vUXKHEe.png?1601523640", - "name": "Fuse Token", - "symbol": "FUSE" - }, - { - "address": "0x543ff227f64aa17ea132bf9886cab5db55dcaddf", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/3479/thumb/gen.png?1547038215", - "name": "DAOstack", - "symbol": "GEN" - }, - { - "address": "0xf6537FE0df7F0Cc0985Cf00792CC98249E73EFa0", - "decimals": 8, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/8996/thumb/giv.png?1596069222", - "name": "GIVToken", - "symbol": "GIV" - }, - { - "address": "0x6810e776880C02933D47DB1b9fc05908e5386b96", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/662/thumb/logo_square_simple_300px.png?1609402668", - "name": "Gnosis Token", - "symbol": "GNO" - }, - { - "address": "0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD", - "decimals": 12, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/1106/thumb/grid.png?1547743150", - "name": "GRID Token", - "symbol": "GRID" - }, - { - "address": "0xc944e90c64b2c07662a292be6244bdf05cda44a7", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/13397/thumb/Graph_Token.png?1608145566", - "name": "The Graph", - "symbol": "GRT" - }, - { - "address": "0xde30da39c46104798bb5aa3fe8b9e0e1f348163f", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/15810/thumb/gitcoin.png?1621992929", - "name": "Gitcoin", - "symbol": "GTC" - }, - { - "address": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd", - "decimals": 2, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/5992/thumb/gemini-dollar-gusd.png?1536745278", - "name": "Gemini dollar", - "symbol": "GUSD" - }, - { - "address": "0xc3589F56B6869824804A5EA29F2c9886Af1B0FcE", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12895/thumb/hnys.png?1614100588", - "name": "Honey", - "symbol": "HNY" - }, - { - "address": "0x514910771af9ca656af840dff83e8264ecf986ca", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/877/thumb/chainlink-new-logo.png?1547034700", - "name": "Chainlink", - "symbol": "LINK" - }, - { - "address": "0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/14665/thumb/200-lqty-icon.png?1617631180", - "name": "Liquity", - "symbol": "LQTY" - }, - { - "address": "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/913/thumb/LRC.png?1572852344", - "name": "Loopring", - "symbol": "LRC" - }, - { - "address": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/14666/thumb/Group_3.png?1617631327", - "name": "Liquity USD", - "symbol": "LUSD" - }, - { - "address": "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/1364/small/Mark_Maker.png?1585191826", - "name": "MakerDAO", - "symbol": "MKR" - }, - { - "address": "0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/11846/thumb/mStable.png?1594950533", - "name": "Meta", - "symbol": "MTA" - }, - { - "address": "0xe2f2a5C287993345a840Db3B0845fbC70f5935a5", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/11576/thumb/mStable_USD.png?1595591803", - "name": "mStable USD", - "symbol": "mUSD" - }, - { - "address": "0x1A5F9352Af8aF974bFC03399e3767DF6370d82e4", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/11149/thumb/gnosis-owl_32.png?1589057849", - "name": "OWL Token", - "symbol": "OWL" - }, - { - "address": "0xD56daC73A4d6766464b38ec6D91eB45Ce7457c44", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/9543/thumb/pan-logo.png?1568674599", - "name": "Panvala pan", - "symbol": "PAN" - }, - { - "address": "0x8E870D67F660D95d5be530380D0eC0bd388289E1", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/6013/thumb/paxos_standard.png?1548386291", - "name": "Paxos Standard", - "symbol": "PAX" - }, - { - "address": "0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/3833/thumb/kleros.png?1547975322", - "name": "Kleros", - "symbol": "PNK" - }, - { - "address": "0x31c8eacbffdd875c74b94b077895bd78cf1e64a3", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/14013/thumb/radicle.png?1614402918", - "name": "Radicle", - "symbol": "RAD" - }, - { - "address": "0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/8838/thumb/sBTC.png?1616149734", - "name": "Synth sBTC", - "symbol": "sBTC" - }, - { - "address": "0x5e74C9036fb86BD7eCdcb084a0673EFc32eA31cb", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/8843/thumb/sETH.png?1616150207", - "name": "Synth sETH", - "symbol": "sETH" - }, - { - "address": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/3406/thumb/SNX.png?1598631139", - "name": "Synthetix Network Token", - "symbol": "SNX" - }, - { - "address": "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/5013/thumb/sUSD.png?1616150765", - "name": "Synth sUSD", - "symbol": "sUSD" - }, - { - "address": "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12271/thumb/512x512_Logo_no_chop.png?1606986688", - "name": "Sushi", - "symbol": "SUSHI" - }, - { - "address": "0x679131F591B4f369acB8cd8c51E68596806c3916", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/11562/thumb/Trustlines.png?1591152088", - "name": "Trustlines Network Token", - "symbol": "TLN" - }, - { - "address": "0x77777feddddffc19ff86db637967013e6c6a116c", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/13496/thumb/ZINt8NSB_400x400.jpg?1609193407", - "name": "Tornado Cash", - "symbol": "TORN" - }, - { - "address": "0x0000000000085d4780B73119b644AE5ecd22b376", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/3449/thumb/tusd.png?1618395665", - "name": "TrueUSD", - "symbol": "TUSD" - }, - { - "address": "0x1Fc31488f28ac846588FFA201cDe0669168471bD", - "decimals": 2, - "fetchPrice": false, - "name": "UAX", - "symbol": "UAX" - }, - { - "address": "0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/10951/thumb/UMA.png?1586307916", - "name": "UMA Voting Token v1", - "symbol": "UMA" - }, - { - "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", - "decimals": 18, - "fetchPrice": false, - "logoURI": "ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg", - "name": "Uniswap", - "symbol": "UNI" - }, - { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "decimals": 6, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389", - "name": "USD Coin", - "symbol": "USDC" - }, - { - "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", - "decimals": 6, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/325/thumb/Tether-logo.png?1598003707", - "name": "Tether USD", - "symbol": "USDT" - }, - { - "address": "0xa47c8bf37f92aBed4A126BDA807A7b7498661acD", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12681/thumb/UST.png?1601612407", - "name": "Wrapped UST Token", - "symbol": "UST" - }, - { - "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", - "decimals": 8, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/7598/thumb/wrapped_bitcoin_wbtc.png?1548822744", - "name": "Wrapped BTC", - "symbol": "WBTC" - }, - { - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1547036627", - "name": "Wrapped Ether", - "symbol": "WETH" - }, - { - "address": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/11849/thumb/yfi-192x192.png?1598325330", - "name": "yearn.finance", - "symbol": "YFI" - } - ], "version": 1 -} \ No newline at end of file +} diff --git a/src/configs/xdai/config.json b/src/configs/xdai/config.json index 8a9cbb985..940109bdd 100644 --- a/src/configs/xdai/config.json +++ b/src/configs/xdai/config.json @@ -1,673 +1,8 @@ { - "cache": { - "fromBlock": 13060713, - "ipfsHash": "QmQgax9dCsQbWwovbLG6NA1A8Z1pfoh5kRq1asqYZ8ReTM", - "toBlock": "22297636" - }, "contracts": { - "avatar": "0xe716EC63C5673B3a4732D22909b38d779fa47c3F", - "controller": "0xfBEcdD3360E2A9040383980AB3863BE9d57256fd", - "daostack": { - "0x016Bf002D361bf5563c76230D19B4DaB4d66Bda4": { - "contractToCall": "0xfBEcdD3360E2A9040383980AB3863BE9d57256fd", - "creationLogEncoding": [ - [ - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_reputationChange", - "type": "int256" - }, - { - "name": "_rewards", - "type": "uint256[5]" - }, - { - "name": "_externalToken", - "type": "address" - }, - { - "name": "_beneficiary", - "type": "address" - } - ] - ], - "name": "ContributionReward", - "newProposalTopics": [ - [ - "0xcbdcbf9aaeb1e9eff0f75d74e1c1e044bc87110164baec7d18d825b0450d97df", - "0x000000000000000000000000e716ec63c5673b3a4732d22909b38d779fa47c3f" - ] - ], - "redeemer": "0xd2cc17817c0d4cfc6819510b2e5288512122d71c", - "supported": false, - "type": "ContributionReward", - "voteParams": "0x1e3e01f4ce01291e53f32570ab772ef6e7301d7223b00c162494e26cc16830df", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - }, - "0x22Ac81BE75cF76281D88A0F3A8Ae59b9abbE9da1": { - "contractToCall": "0xfBEcdD3360E2A9040383980AB3863BE9d57256fd", - "creationLogEncoding": [ - [ - { - "name": "_scheme ", - "type": "address" - }, - { - "name": "_parametersHash", - "type": "bytes32" - }, - { - "name": "_permissions", - "type": "bytes4" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ], - [ - { - "name": "_scheme ", - "type": "address" - }, - { - "name": "_descriptionHash", - "type": "string" - } - ] - ], - "name": "SchemeRegistrar", - "newProposalTopics": [ - [ - "0xcc9180a05805acc3615b472c3ba00cdc9cd2c6e0e0b3648d60eb58f2c1001b84", - "0x000000000000000000000000e716ec63c5673b3a4732d22909b38d779fa47c3f" - ], - [ - "0x504b6bd2558241a5f0532c970f3444e1fc24e1f7cf3d7c49a8d213bd612e9055", - "0x000000000000000000000000e716ec63c5673b3a4732d22909b38d779fa47c3f" - ] - ], - "supported": true, - "type": "SchemeRegistrar", - "voteParams": "0x1e3e01f4ce01291e53f32570ab772ef6e7301d7223b00c162494e26cc16830df", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - }, - "0x2b644360a24366B1ebdBf4f69563eAfA4772bCA0": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "InvalidScheme", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - }, - "0x50d895Df2ea26b4C3aBbFa22906197458F56bAe9": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "DaoDeployer", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - }, - "0x63F411E7cA67CB296FE2c7B875E072E82A609436": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [], - "name": "DaoDeployer2", - "newProposalTopics": [], - "supported": false, - "type": "DxScheme", - "voteParams": "", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - }, - "0x73753baC5B0fBECfd741436b64163f670E0aCB30": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [ - [ - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_reputationChange", - "type": "int256" - }, - { - "name": "_rewards", - "type": "uint256[5]" - }, - { - "name": "_externalToken", - "type": "address" - }, - { - "name": "_beneficiary", - "type": "address" - } - ] - ], - "name": "CompetitionScheme", - "newProposalTopics": [ - [ - "0xfc38e03bef8d47e8c970c106660459b8a9db8eb045bd1281ef4cc50c16e03227", - "0x000000000000000000000000e716ec63c5673b3a4732d22909b38d779fa47c3f" - ] - ], - "supported": false, - "type": "CompetitionScheme", - "voteParams": "0xa8139cb6b8d1e5f7a84c3f981d0c747b1d227ce46140246a4a2bfa46151d84cd", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - }, - "0xaFE59DF878E23623A7a91d16001a66A4DD87e0c0": { - "contractToCall": "0x0000000000000000000000000000000000000000", - "creationLogEncoding": [ - [ - { - "name": "_callsData", - "type": "bytes[]" - }, - { - "name": "_values", - "type": "uint256[]" - }, - { - "name": "_descriptionHash", - "type": "string" - }, - { - "name": "_contractsToCall", - "type": "address[]" - } - ] - ], - "name": "Multicall_1", - "newProposalTopics": [ - [ - "0xf5a0655bd7247f3a6fa97e71b57c61314566afb5aa8be8eea2c48f4d1b9bf190", - "0x000000000000000000000000e716ec63c5673b3a4732d22909b38d779fa47c3f" - ] - ], - "supported": true, - "type": "GenericMulticall", - "voteParams": "0x1e3e01f4ce01291e53f32570ab772ef6e7301d7223b00c162494e26cc16830df", - "votingMachine": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF" - } - }, - "permissionRegistry": "0x757bbdC3dF870202f28e5cF92a0005158D5e0786", - "reputation": "0xED77eaA9590cfCE0a126Bab3D8A6ada9A393d4f6", - "token": "0xf255B9d83db924820ee23A7dCC30b7542e201Bb1", "utils": { - "dxdVestingFactory": "0x45734dB5C3342c66932db308Dbb23a5e2B159561", - "multicall": "0xDD032cd0dfCB54050E1FA30Be59056403e292700", "guildRegistry": "0x7E6EB84621c3bb8455046f380c3934fAf8076158" - }, - "votingMachines": { - "0x053f406aD40c9Eb8eB43aFf28DA0D0EC17dF8e44": { - "token": "0xb90D6bec20993Be5d72A5ab353343f7a0281f158", - "type": "DXDVotingMachine" - }, - "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF": { - "token": "0x543ff227f64aa17ea132bf9886cab5db55dcaddf", - "type": "GenesisProtocol" - } } }, - "contributionLevels": [ - { - "dxd": 1500, - "id": "1", - "rep": 0.1667, - "stable": 3000 - }, - { - "dxd": 2000, - "id": "2", - "rep": 0.1667, - "stable": 4000 - }, - { - "dxd": 3000, - "id": "3", - "rep": 0.1667, - "stable": 5000 - }, - { - "dxd": 4000, - "id": "4", - "rep": 0.1667, - "stable": 6000 - }, - { - "dxd": 5000, - "id": "5", - "rep": 0.1667, - "stable": 7000 - }, - { - "dxd": 6000, - "id": "6", - "rep": 0.1667, - "stable": 8000 - }, - { - "dxd": 7500, - "id": "7", - "rep": 0.1667, - "stable": 9000 - }, - { - "dxd": 9500, - "id": "8", - "rep": 0.1667, - "stable": 9000 - } - ], - "proposalTemplates": [ - { - "description": "# Background\n \n - If this is your first contributor proposal, state any context for making the proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Who you have been in contact with regarding the position (add their DAOtalk usernames)\n - If you are a continuing contributor, state which products and areas you are working on / any other relevant background information\n # Timeframe\n \n - State the date range, typically 2 months (2.5 months for first-time workers)\n # Scope of Contribution\n \n - **Goals** :\n - State the products and /or strategy areas you will be working under. E.g. Omen and Governance. Include both short-term goals that you seek to accomplish during the working period and long-term goals.\n - **Responsibilities:**\n - List the specific deliverables you will be either completing and / or working on during the working period. Try to state which deliverables you intend to complete within the period and which are long-term or ongoing projects.\n \n # Reflection\n \n - If You Are A Returning Contributor, Write a Self-Reflection\n - State what you did well, what you did okay, and what you need to improve on\n # Compensation\n \n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For 2 months of work at level [LEVEL], to be sent half on the first payment proposal and half on the second payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP] : For 2 months of work , to be sent half on the first payment proposal and half on the second payment proposal\n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described deliverables\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n", - "name": "Contributor Proposal", - "title": "[NAME] Contributor Proposal [DATE - DATE]" - }, - { - "description": "# Timeframe\n \n - State the contributor proposal date range\n \n # Background\n \n - State the context for making the contributor payment proposal, including:\n - What position you will be filling – i.e. developer, marketing, governance, etc.\n - Proposed Scope of Contribution\n - Self-Reflection on Scope of Contribution\n - Include the URL to the original proposal forum post\n \n # Deliverables\n\n - Include information around deliverables that were completed during your worker period\n \n # Compensation\n\n - Experience Level : 1-5\n - Time commitment : Percent (%) of time\n - [ETH/DAI AMT] : For second half payment proposal\n - [DXD AMT] : Vested for 2 years with a 1 year cliff starting the [DATE WORK PERIOD STARTS]\n - [% AMT REP]: For 2 second half payment proposal\n \n # Work Experience\n \n - Prior DXdao work proposals (if applicable)\n - Past Work for DXdao\n - If a developer, Github links\n - If a non-tech worker, doc links or described\n - If new, past relevant work experience\n - Developers : Github profile link\n - Non-tech : suggested Linkedin / other references\n \n", - "name": "Payment Proposal", - "title": "[NAME] Payment Proposal [DATE - DATE]" - }, - { - "description": "## Description \n\n## Proposition \n\n## Action Plan", - "name": "Signal Proposal", - "title": "Signal Proposal for [DAO_ACTION]" - }, - { - "calls": [ - { - "functionName": "approve(address,uint256)", - "params": [ - "0xecA7F78d59D16812948849663b26FE10E320f80C", - "" - ], - "to": "0xdE903E2712288A1dA82942DDdF2c20529565aC30" - }, - { - "functionName": "createDistribution(address[],address,uint256[],uint64,uint64,bool,uint256)", - "params": [ - "[0xdE903E2712288A1dA82942DDdF2c20529565aC30]", - "", - "[]", - "", - "", - "false", - "0" - ], - "to": "0xecA7F78d59D16812948849663b26FE10E320f80C" - } - ], - "description": "Simple description", - "name": "SWPR Farming Campaign", - "title": "[PAIR X/Y] Farming Campaign [DATE - DATE]]" - } - ], - "proposalTypes": [ - { - "id": "contributor", - "scheme": "0x08EEc580AD41e9994599BaD7d2a74A9874A2852c", - "title": "Contributor" - }, - { - "id": "custom", - "title": "Custom" - } - ], - "recommendedCalls": [], - "tokens": [ - { - "address": "0x7f7440C5098462f833E123B44B8A03E1d9785BAb", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/1inch_32.png", - "name": "1INCH Token on xDai", - "symbol": "1INCH" - }, - { - "address": "0x7f7440C5098462f833E123B44B8A03E1d9785BAb", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/1inch_32.png", - "name": "1INCH Token on xDai", - "symbol": "1INCH" - }, - { - "address": "0xDF613aF6B44a31299E48131e9347F034347E2F00", - "decimals": 18, - "fetchPrice": false, - "logoURI": "ipfs://QmWzL3TSmkMhbqGBEwyeFyWVvLmEo3F44HBMFnmTUiTfp1", - "name": "Aave Token on xDai", - "symbol": "AAVE" - }, - { - "address": "0x3a97704a1b25F08aa230ae53B352e2e72ef52843", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/1Hive/default-token-list/master/src/assets/xdai/0x3a97704a1b25f08aa230ae53b352e2e72ef52843/logo.png", - "name": "Agave Token", - "symbol": "AGVE" - }, - { - "address": "0x7eF541E2a22058048904fE5744f9c7E4C57AF717", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/Balancer_32.png", - "name": "Balancer on xDai", - "symbol": "BAL" - }, - { - "address": "0x82dFe19164729949fD66Da1a37BC70dD6c4746ce", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/bao_32.png", - "name": "BaoToken on xDai", - "symbol": "BAO" - }, - { - "address": "0x9a495a281D959192343B0e007284bf130bd05F86", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/bancor_32.png", - "name": "Bancor Network Token on xDai", - "symbol": "BNT" - }, - { - "address": "0xdd96B45877d0E8361a4DDb732da741e97f3191Ff", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://bscscan.com/token/images/busd_32.png", - "name": "BUSD Token on xDai", - "symbol": "BUSD" - }, - { - "address": "0xDf6FF92bfDC1e8bE45177DC1f4845d391D3ad8fD", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc00e94Cb662C3520282E6f5717214004A7f26888/logo.png", - "name": "Compound on xDai", - "symbol": "COMP" - }, - { - "address": "0x712b3d230F3C1c19db860d80619288b1F0BDd0Bd", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xD533a949740bb3306d119CC777fa900bA034cd52/logo.png", - "name": "Curve DAO Token on xDai", - "symbol": "CRV" - }, - { - "address": "0xD3D47d5578e55C880505dC40648F7F9307C3e7A8", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12465/small/defi_pulse_index_set.png", - "name": "DefiPulse Index on xDai", - "symbol": "DPI" - }, - { - "address": "0xb90D6bec20993Be5d72A5ab353343f7a0281f158", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://s2.coinmarketcap.com/static/img/coins/200x200/5589.png", - "name": "DXdao on xDai", - "symbol": "DXD" - }, - { - "address": "0x75886F00c1a20Ec1511111Fb4Ec3C51de65B1fe7", - "decimals": 18, - "fetchPrice": false, - "name": "FTT on xDai", - "symbol": "FTX" - }, - { - "address": "0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://assets.coingecko.com/coins/images/3479/thumb/gen.png?1547038215", - "name": "GEN on xDai", - "symbol": "xGEN" - }, - { - "address": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6810e776880C02933D47DB1b9fc05908e5386b96/logo.png", - "name": "Gnosis Token on xDai", - "symbol": "GNO" - }, - { - "address": "0xFAdc59D012Ba3c110B08A15B7755A5cb7Cbe77D7", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/TheGraph_32.png", - "name": "Graph Token on xDai", - "symbol": "GRT" - }, - { - "address": "0xFAdc59D012Ba3c110B08A15B7755A5cb7Cbe77D7", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/TheGraph_32.png", - "name": "Graph Token on xDai", - "symbol": "GRT" - }, - { - "address": "0xb0C5f3100A4d9d9532a4CfD68c55F1AE8da987Eb", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/14551/small/jN3kkqke_400x400.png", - "name": "DAOhaus Token on xDai", - "symbol": "HAUS" - }, - { - "address": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/1Hive/default-token-list/master/src/assets/xdai/0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9/logo.png", - "name": "Honey", - "symbol": "HNY" - }, - { - "address": "0xD057604A14982FE8D88c5fC25Aac3267eA142a08", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/balancer-labs/assets/master/assets/0xf5581dfefd8fb0e4aec526be659cfab1f8c781da.png", - "name": "HOPR Token on xDai", - "symbol": "HOPR" - }, - { - "address": "0xE2e73A1c69ecF83F464EFCE6A5be353a37cA09b2", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png", - "name": "ChainLink Token on xDai", - "symbol": "LINK" - }, - { - "address": "0xE2e73A1c69ecF83F464EFCE6A5be353a37cA09b2", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png", - "name": "ChainLink Token on xDai", - "symbol": "LINK" - }, - { - "address": "0x2bE73bFeEC620aa9B67535A4D3827bB1e29436D1", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/lrc_32.png", - "name": "LoopringCoin V2 on xDai", - "symbol": "LRC" - }, - { - "address": "0x5fd896D248fbfa54d26855C267859eb1b4DAEe72", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2/logo.png", - "name": "Maker on xDai", - "symbol": "MKR" - }, - { - "address": "0x7ecF26cd9A36990b8ea477853663092333f59979", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/12381/large/token_2000x2000.png?1615791204", - "name": "Perpetual on xDai", - "symbol": "PERP" - }, - { - "address": "0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/kelros_28.png", - "name": "Pinakion on xDai", - "symbol": "PNK" - }, - { - "address": "0x0da1a02CDF84C44021671d183d616925164E08Aa", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x408e41876cCCDC0F92210600ef50372656052a38/logo.png", - "name": "Republic Token on xDai", - "symbol": "REN" - }, - { - "address": "0x4A88248BAa5b39bB4A9CAa697Fb7f8ae0C3f0ddB", - "decimals": 8, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/renbtc_32.png", - "name": "renBTC on xDai", - "symbol": "renBTC" - }, - { - "address": "0x3A00E08544d589E19a8e7D97D0294331341cdBF6", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/3406/small/SNX.png", - "name": "Synthetix Network Token on xDai", - "symbol": "SNX" - }, - { - "address": "0xb7D311E2Eb55F2f68a9440da38e7989210b9A05e", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x0Ae055097C6d159879521C384F1D2123D1f195e6/logo.png", - "name": "STAKE on xDai", - "symbol": "STAKE" - }, - { - "address": "0xB1950Fb2C9C0CbC8553578c67dB52Aa110A93393", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x57Ab1ec28D129707052df4dF418D58a2D46d5f51/logo.png", - "name": "Synth sUSD on xDai", - "symbol": "sUSD" - }, - { - "address": "0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/sushiswap_32.png", - "name": "SushiToken on xDai", - "symbol": "SUSHI" - }, - { - "address": "0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/sushiswap_32.png", - "name": "SushiToken on xDai", - "symbol": "SUSHI" - }, - { - "address": "0x0116e28B43A358162B96f70B4De14C98A4465f25", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://etherscan.io/token/images/UniCrypt_32.png", - "name": "UniCrypt on xDai", - "symbol": "UNCX" - }, - { - "address": "0x4537e328Bf7e4eFA29D05CAeA260D7fE26af9D74", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://cloudflare-ipfs.com/ipfs/QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg/", - "name": "Uniswap on xDai", - "symbol": "UNI" - }, - { - "address": "0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83", - "decimals": 6, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "name": "USDC on xDai", - "symbol": "USDC" - }, - { - "address": "0x4ECaBa5870353805a9F068101A40E0f32ed605C6", - "decimals": 6, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", - "name": "Tether USD on xDai", - "symbol": "USDT" - }, - { - "address": "0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252", - "decimals": 8, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png", - "name": "Wrapped BTC on xDai", - "symbol": "WBTC" - }, - { - "address": "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "name": "Wrapped Ether on xDai", - "symbol": "WETH" - }, - { - "address": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", - "decimals": 18, - "fetchPrice": true, - "logoURI": "https://raw.githubusercontent.com/1Hive/default-token-list/master/src/assets/xdai/0xe91d153e0b41518a2ce8dd3d7944fa863463a97d/logo.png", - "name": "Wrapped XDAI", - "symbol": "WXDAI" - }, - { - "address": "0xbf65bfcb5da067446CeE6A706ba3Fe2fB1a9fdFd", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e/logo.png", - "name": "Yearn Finance on xDai", - "symbol": "YFI" - }, - { - "address": "0xbf65bfcb5da067446CeE6A706ba3Fe2fB1a9fdFd", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e/logo.png", - "name": "yearn.finance on xDai", - "symbol": "YFI" - }, - { - "address": "0x543ff227f64aa17ea132bf9886cab5db55dcaddf", - "decimals": 18, - "fetchPrice": false, - "logoURI": "https://assets.coingecko.com/coins/images/3479/thumb/gen.png?1547038215", - "name": "DAOstack", - "symbol": "GEN" - } - ], "version": 1 -} \ No newline at end of file +} diff --git a/src/contexts/Guilds/orbis.tsx b/src/contexts/Guilds/orbis.tsx index 1db37293e..295520a4d 100644 --- a/src/contexts/Guilds/orbis.tsx +++ b/src/contexts/Guilds/orbis.tsx @@ -1,5 +1,5 @@ import { Orbis } from '@orbisclub/orbis-sdk'; -import { useState, createContext } from 'react'; +import { useState, createContext, useContext } from 'react'; import { useSigner } from 'wagmi'; import { sleep } from 'utils'; @@ -70,3 +70,5 @@ export const OrbisProvider = ({ children }) => { ); }; + +export const useOrbisContext = () => useContext(OrbisContext); diff --git a/src/hooks/Guilds/contracts/useDecodedCall.ts b/src/hooks/Guilds/contracts/useDecodedCall.ts index b7106bc01..2691cd0a5 100644 --- a/src/hooks/Guilds/contracts/useDecodedCall.ts +++ b/src/hooks/Guilds/contracts/useDecodedCall.ts @@ -143,11 +143,21 @@ export const decodeCall = async ( } // Detect using the rich contract data registry. - const matchedRichContractData = contracts?.find( + let matchedRichContractData = contracts?.find( contract => contract.networks[chainId].toLocaleLowerCase() === call.to.toLocaleLowerCase() ); + + // Edge case when the same contract is in both core actions and rich contract registry + try { + matchedRichContractData.contractInterface.getFunction( + call.data.substring(0, 10) + ); + } catch (e) { + matchedRichContractData = null; + } + let matchedContract = matchedRichContractData ? getContractInterfaceFromRichContractData(matchedRichContractData) : getContractFromKnownSighashes(call.data); @@ -196,6 +206,7 @@ export const decodeCall = async ( option.functionName === decodedCall.function.name && option.params.length === decodedCall.function.inputs.length ); + decodedCall.functionTitle = decodedCall.richFunctionData?.title; } return { diff --git a/src/hooks/Guilds/ipfs/usePinataIPFS.ts b/src/hooks/Guilds/ipfs/usePinataIPFS.ts index 5b189b2c7..7bd35d0e3 100644 --- a/src/hooks/Guilds/ipfs/usePinataIPFS.ts +++ b/src/hooks/Guilds/ipfs/usePinataIPFS.ts @@ -30,6 +30,7 @@ const usePinataIPFS = () => { let url: string; const headers = { 'Content-Type': 'application/json', + Accept: 'Accept: text/plain', Authorization: `Bearer ${DEFAULT_API_KEY}`, }; diff --git a/src/hooks/Guilds/useProposalMetadata.ts b/src/hooks/Guilds/useProposalMetadata.ts index 9c67d8832..cfe4b30d7 100644 --- a/src/hooks/Guilds/useProposalMetadata.ts +++ b/src/hooks/Guilds/useProposalMetadata.ts @@ -1,13 +1,13 @@ import useIPFSFile from 'hooks/Guilds/ipfs/useIPFSFile'; -import { useContext, useMemo, useEffect, useState } from 'react'; +import { useMemo, useEffect, useState } from 'react'; import { ProposalMetadata } from 'types/types.guilds'; import contentHash from '@ensdomains/content-hash'; import useProposal from 'Modules/Guilds/Hooks/useProposal'; -import { OrbisContext } from 'contexts/Guilds/orbis'; +import { useOrbisContext } from 'contexts/Guilds/orbis'; function useProposalMetadata(guildId: string, proposalId: `0x${string}`) { const { data: proposal, error } = useProposal(guildId, proposalId); - const { orbis } = useContext(OrbisContext); + const { orbis } = useOrbisContext(); const [orbisData, setOrbisData] = useState(); const { decodedContentHash, decodeError } = useMemo(() => { diff --git a/src/hooks/Guilds/useTenderlyApi/index.ts b/src/hooks/Guilds/useTenderlyApi/index.ts index 9bb103932..47d0a45f5 100644 --- a/src/hooks/Guilds/useTenderlyApi/index.ts +++ b/src/hooks/Guilds/useTenderlyApi/index.ts @@ -26,16 +26,29 @@ export const useTransactionSimulation = () => { for (let i = 0; i < options.length; i++) { await forkProvider.send('evm_revert', [forkStartingPoint]); // Reset fork let currentOption = options[i]; - + let numberOfSpendingCalls = 0; for (let j = 0; j < currentOption.actions.length; j++) { let currentAction = currentOption.actions[j]; let simulationResult = await simulateAction( forkUrl, + currentOption.decodedActions[j - (numberOfSpendingCalls + 1)] + ?.simulationResult.simulation.id, currentAction, chain?.id ); - currentOption.decodedActions[j].simulationResult = - await simulationResult; + if ( + currentOption.decodedActions[j - (numberOfSpendingCalls + 1)] + ?.approval + ) { + currentOption.decodedActions[ + j - (numberOfSpendingCalls + 1) + ].simulationResult = await simulationResult; + numberOfSpendingCalls++; + } else { + currentOption.decodedActions[ + j - numberOfSpendingCalls + ].simulationResult = await simulationResult; + } if (simulationResult.transaction.status === false) failedTransactions++; @@ -84,6 +97,7 @@ const getForkData = async (chainId: number, provider) => { const simulateAction = async ( forkUrl: string, + rootSimualtionId: string, action: Call, chainId: number ) => { @@ -100,6 +114,8 @@ const simulateAction = async ( input, gas: 800000, gas_price: '0', + root: rootSimualtionId, + // Tenderly returns 400 when value > amount in account, handle this to test value properly value: 0, save_if_fails: true, save: true, diff --git a/src/index.tsx b/src/index.tsx index 72d6455ca..d74dd35fb 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -12,7 +12,9 @@ import EnsureReadOnlyConnection from 'components/Web3Modals/EnsureReadOnlyConnec import SyncRouterWithWagmi from 'components/Web3Modals/SyncRouterWithWagmi'; import { useEffect } from 'react'; import { loadFathom } from 'analytics/fathom'; -import { SITE_ID } from 'configs'; +import { SENTRY_ID, SITE_ID } from 'configs'; +import * as Sentry from '@sentry/react'; +import { CaptureConsole } from '@sentry/integrations'; const { provider, webSocketProvider } = configureChains(chains, providers); @@ -45,6 +47,34 @@ const Root = () => { }); }, []); + Sentry.init({ + dsn: `https://8df1b391b909437e9bb78de5d9128eba@o425302.ingest.sentry.io/${SENTRY_ID}`, + tunnel: 'https://sentry.project-davi.dev/api', + integrations: [ + new CaptureConsole({ + levels: ['error'], + }), + ], + beforeSend(event) { + const regex = /0x(([a-fA-F0-9]{64})|([a-fA-F0-9]{40}))/g; + const ensRegex = /((["' ])(\w+.eth)(["' ]))/g; + const jsonString = JSON.stringify(event); + const scrubbedString = jsonString.replace(regex, `0xScrubbed`); + const veryScrubbedString = scrubbedString.replace( + ensRegex, + `"ENS_SCRUBBED"` + ); + var scrubbedEvent: any = { request: {} }; + try { + scrubbedEvent = JSON.parse(veryScrubbedString); + } catch (e) { + console.error({ e }); + } + scrubbedEvent.request = event.request; + return scrubbedEvent; + }, + }); + return ( diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 865412a0f..6fd85156b 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -270,11 +270,11 @@ "errorWhileUploading": "Error while uploading to IPFS", "couldntUploadToPinata": "Couldn't upload and pin to Pinata" }, - "createAnyway": "Create anyways", + "createAnyway": "Create anyway", "retry": "Retry", "error": "Error", "displayRawData": "Display Raw Data", - "displayFormatedData": "Display Formated Data", + "displayFormattedData": "Display Formatted Data", "approveSpendingCall": "Approve spending call", "addressToWhichTheExpenseIsBeingAuthorized": "Address to which the expense is being authorized", "amountBeingApproved": "Amount being approved", @@ -307,6 +307,10 @@ "postboxConnectCeramicButton": "Generate Ceramic Session", "postboxEditCancel": "Cancel", "postboxEditSave": "Save", + "removalMessage1": "Are you sure you want to remove this post?", + "removalMessage2": "This uses your moderator powers and should only be done for inappropriate content.", + "deletionMessage1": "Are you sure you want to delete this post?", + "deletionMessage2": "If you ask for deletion your post might be removed from the Ceramic nodes hosting it.", "postActions": { "reply": "Reply", "toggleThread": "Toggle thread", diff --git a/src/provider/chains.ts b/src/provider/chains.ts index 95b857da7..be9dd425d 100644 --- a/src/provider/chains.ts +++ b/src/provider/chains.ts @@ -27,9 +27,6 @@ export const chains: Chain[] = [ 'https://eth-mainnet.gateway.pokt.network/v1/lb/dda01e253305bbeac6507a80', }, }, - chain.goerli, - chain.arbitrum, - chain.arbitrumGoerli, gnosisChain, ]; @@ -51,8 +48,8 @@ if (process.env.NODE_ENV === 'development') { }, testnet: true, }; - chains.push(localhost); + chains.push(chain.goerli); } export const getBlockExplorerUrl = ( diff --git a/src/richContracts.json b/src/richContracts.json index 97774b83b..b7e0ab81c 100644 --- a/src/richContracts.json +++ b/src/richContracts.json @@ -373,5 +373,70 @@ "spendsTokens": true } ] + }, + { + "title": "Llama pay vesting stream", + "tags": ["llama", "payment", "stream"], + "networks": { + "100": "0xb93427b83573c8f27a08a909045c3e809610411a" + }, + "functions": [ + { + "title": "Deploy vesting contract", + "functionName": "deploy_vesting_contract", + "params": [ + { + "type": "address", + "component": "tokenPicker", + "name": "token", + "title": "Token", + "description": "Token to stream" + }, + { + "type": "address", + "component": "address", + "name": "recipient", + "title": "Recipient", + "defaultValue": "", + "description": "Receiving address of tokens" + }, + { + "type": "uint256", + "component": "tokenAmount", + "name": "amount", + "title": "Amount", + "description": "Number of tokens to stream" + }, + { + "type": "uint256", + "component": "time", + "name": "vesting_duration", + "title": "Duration", + "defaultValue": "", + "description": "How long before stream finishes fully" + }, + { + "type": "uint256", + "component": "date", + "name": "vesting_start", + "title": "Start time", + "defaultValue": "", + "description": "Starting time for stream" + }, + { + "type": "uint256", + "component": "time", + "name": "cliff_length", + "title": "Cliff length", + "defaultValue": "0", + "description": "How long before cliff (receiver can start withdrawing)" + } + ], + "shortDescription": "Creates streaming contract with optional cliff ", + "longDescription": "Factory contract that creates streaming contract with optional cliff for ERC20 tokens. Only receiver can withdraw, owner can rugpull.", + "spendsTokens": true, + "templateLiteral": "Vest ${amount} ${token} for ${vesting_duration} with ${cliff_length} cliff for ${recipient}" + } + ] } ] diff --git a/yarn.lock b/yarn.lock index 1adf52651..e6bc5451e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3839,7 +3839,7 @@ schema-utils "^3.0.0" source-map "^0.7.3" -"@popperjs/core@^2.9.0": +"@popperjs/core@^2.9.0", "@popperjs/core@^2.9.2": version "2.11.6" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== @@ -4049,6 +4049,17 @@ "@noble/hashes" "~1.1.1" "@scure/base" "~1.1.0" +"@sentry/browser@7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.30.0.tgz#9b4387da933290546b7a4ef521713c38723a0213" + integrity sha512-9hpaNAqIBDLdnrZ51iWkqenRotqqweE1f2AlHO56nyT/UE+u+GdmAiBrgRNqdFQQM13JtTG/gu4HGOyLWb9HEA== + dependencies: + "@sentry/core" "7.30.0" + "@sentry/replay" "7.30.0" + "@sentry/types" "7.30.0" + "@sentry/utils" "7.30.0" + tslib "^1.9.3" + "@sentry/core@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" @@ -4060,6 +4071,15 @@ "@sentry/utils" "5.30.0" tslib "^1.9.3" +"@sentry/core@7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.30.0.tgz#02d2e8747484ba64b6d712e8afe6736250efdc26" + integrity sha512-NeLigkBlpcK63ymM63GoIHurml6V3BUe1Vi+trwm4/qqOTzT7PQhvdJCX+o3+atzRBH+zdb6kd4VWx44Oye3KA== + dependencies: + "@sentry/types" "7.30.0" + "@sentry/utils" "7.30.0" + tslib "^1.9.3" + "@sentry/hub@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" @@ -4069,6 +4089,16 @@ "@sentry/utils" "5.30.0" tslib "^1.9.3" +"@sentry/integrations@^7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.30.0.tgz#ebba2559b6f7a67912cd13153fcfa751dd415f02" + integrity sha512-KU8TnJm1Yldxnhdu/EZcIGXU9ptGQPk6ot4smcNx/mKsy575VrDdyVDx8uIYURWyfsg7eOayt6VdC7ISSODp8A== + dependencies: + "@sentry/types" "7.30.0" + "@sentry/utils" "7.30.0" + localforage "^1.8.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" @@ -4093,6 +4123,26 @@ lru_map "^0.3.3" tslib "^1.9.3" +"@sentry/react@^7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.30.0.tgz#01050ba6e11b8c51c1cb44c76799b2e189762482" + integrity sha512-yn0GiRewi/Gcig2Fkps95l96zOwiKxQacv3T83bBzlFIuO0vBWqV6imOcJKt4gxU9JoX6RGf9UqeACxzJlDqNg== + dependencies: + "@sentry/browser" "7.30.0" + "@sentry/types" "7.30.0" + "@sentry/utils" "7.30.0" + hoist-non-react-statics "^3.3.2" + tslib "^1.9.3" + +"@sentry/replay@7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.30.0.tgz#44db86956166fc8909459eef8ce94f750c072519" + integrity sha512-qJgz1tG0uStqMF5V7gN7KqxZuZY0MMQQY7siwPcSQVYj7X3AQswHjmvD4npEKbIa+jP6aQ6fFjoBjl3c0t3Mmg== + dependencies: + "@sentry/core" "7.30.0" + "@sentry/types" "7.30.0" + "@sentry/utils" "7.30.0" + "@sentry/tracing@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" @@ -4109,6 +4159,11 @@ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== +"@sentry/types@7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.30.0.tgz#fc2baeb5b0e1ecc4d52b07b056fcba54449cd9ce" + integrity sha512-l4A86typvt/SfWh5JffpdxNGkg5EEA8m35BzpIcKmCAQZUDmnb4b478r8jdD2uuOjLmPNmZr1tifdRW4NCLuxQ== + "@sentry/utils@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" @@ -4117,6 +4172,14 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" +"@sentry/utils@7.30.0": + version "7.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.30.0.tgz#1d83145399c65e31f725c1b6ae02f451a990f326" + integrity sha512-tSlBhr5u/LdE2emxIDTDmjmyRr99GnZGIAh5GwRxUgeDQ3VEfNUFlyFodBCbZ6yeYTYd6PWNih5xoHn1+Rf3Sw== + dependencies: + "@sentry/types" "7.30.0" + tslib "^1.9.3" + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -5722,6 +5785,13 @@ resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.199.tgz#db24dbdd0d47fdfaa22dde8ba35e2c08b7162e82" integrity sha512-jaYJr5ZMxU2swK6h1XJr6Wb1LlWOWbvsX/wo59iZ9KVv1AHiKZlCMcWGThy4aoAs/CUT11pB8qbzyOO163LHZg== +"@tiptap/extension-link@^2.0.0-beta.209": + version "2.0.0-beta.209" + resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.0.0-beta.209.tgz#a441f5ead858ea54b88fa7e1a8b5e02e8f671678" + integrity sha512-X+iPnKWTb8nuZ7xieemPxZOiCQiaQw4z3RVJ7Hz4/T+ujxfxu7MJhBzjyw9htGPmUijyN4zt0NPjZ089yMzAxQ== + dependencies: + linkifyjs "^3.0.5" + "@tiptap/extension-list-item@^2.0.0-beta.199": version "2.0.0-beta.199" resolved "https://registry.yarnpkg.com/@tiptap/extension-list-item/-/extension-list-item-2.0.0-beta.199.tgz#2e667f0ea5d9314307427625345e915edf91b989" @@ -11853,6 +11923,11 @@ datastore-pubsub@^2.0.0: interface-datastore "^6.0.2" uint8arrays "^3.0.0" +date-fns@^2.24.0: + version "2.29.3" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" + integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== + dateformat@^4.5.1: version "4.6.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" @@ -16042,7 +16117,7 @@ hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -19821,6 +19896,13 @@ libp2p@^0.36.2: wherearewe "^1.0.0" xsalsa20 "^1.1.0" +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + lie@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -19843,6 +19925,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +linkifyjs@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-3.0.5.tgz#99e51a3a0c0e232fcb63ebb89eea3ff923378f34" + integrity sha512-1Y9XQH65eQKA9p2xtk+zxvnTeQBG7rdAXSkUG97DmuI/Xhji9uaUzaWxRj6rf9YC0v8KKHkxav7tnLX82Sz5Fg== + lint-staged@^12.4.3: version "12.5.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.5.0.tgz#d6925747480ae0e380d13988522f9dd8ef9126e3" @@ -19978,6 +20065,13 @@ loader-utils@^3.2.0: resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.0.tgz#bcecc51a7898bee7473d4bc6b845b23af8304d4f" integrity sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ== +localforage@^1.8.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -23341,11 +23435,16 @@ prettier@2.6.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== -prettier@^2.0.5, prettier@^2.1.2, prettier@^2.7.1: +prettier@^2.0.5, prettier@^2.1.2: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160" + integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw== + pretty-bytes@^5.3.0, pretty-bytes@^5.4.1, pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -24046,6 +24145,18 @@ react-countdown@^2.3.2: dependencies: prop-types "^15.7.2" +react-datepicker@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/react-datepicker/-/react-datepicker-4.8.0.tgz#11b8918d085a1ce4781eee4c8e4641b3cd592010" + integrity sha512-u69zXGHMpxAa4LeYR83vucQoUCJQ6m/WBsSxmUMu/M8ahTSVMMyiyQzauHgZA2NUr9y0FUgOAix71hGYUb6tvg== + dependencies: + "@popperjs/core" "^2.9.2" + classnames "^2.2.6" + date-fns "^2.24.0" + prop-types "^15.7.2" + react-onclickoutside "^6.12.0" + react-popper "^2.2.5" + react-datetime@^3.1.1: version "3.2.0" resolved "https://registry.yarnpkg.com/react-datetime/-/react-datetime-3.2.0.tgz#fdfa4dced5a9b59724f4c478a1ecc3cb6a6a80cf" @@ -24152,6 +24263,11 @@ react-error-overlay@^6.0.11: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== +react-fast-compare@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" + integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== + react-hook-form@^7.29.0: version "7.38.0" resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.38.0.tgz#53d6a68df587ce4ce88352f63e0ecc7fc8779320" @@ -24251,6 +24367,19 @@ react-native-url-polyfill@^1.3.0: dependencies: whatwg-url-without-unicode "8.0.0-3" +react-onclickoutside@^6.12.0: + version "6.12.2" + resolved "https://registry.yarnpkg.com/react-onclickoutside/-/react-onclickoutside-6.12.2.tgz#8e6cf80c7d17a79f2c908399918158a7b02dda01" + integrity sha512-NMXGa223OnsrGVp5dJHkuKxQ4czdLmXSp5jSV9OqiCky9LOpPATn3vLldc+q5fK3gKbEHvr7J1u0yhBh/xYkpA== + +react-popper@^2.2.5: + version "2.3.0" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-2.3.0.tgz#17891c620e1320dce318bad9fede46a5f71c70ba" + integrity sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q== + dependencies: + react-fast-compare "^3.0.1" + warning "^4.0.2" + react-refresh@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" @@ -28458,6 +28587,13 @@ walletlink@2.0.2: preact "^10.3.3" rxjs "^6.5.4" +warning@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + watchify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/watchify/-/watchify-4.0.0.tgz#53b002d51e7b0eb640b851bb4de517a689973392"