From 53e1d06679edf9242cb82302d630ea098c956fe3 Mon Sep 17 00:00:00 2001 From: Nikos Kontakis Date: Tue, 20 Aug 2024 16:13:13 +0200 Subject: [PATCH 1/5] first draft of the delegatee list --- src/App.tsx | 25 +- src/consts.ts | 3 +- src/contexts/DelegateesContext.tsx | 50 ++++ src/lib/utils.ts | 1 + src/pages/Home/index.tsx | 28 +- src/polkadot.json | 393 +++++++++++++++++++++++++++++ 6 files changed, 480 insertions(+), 20 deletions(-) create mode 100644 src/contexts/DelegateesContext.tsx create mode 100644 src/polkadot.json diff --git a/src/App.tsx b/src/App.tsx index 097d5b4..b102752 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,7 +10,8 @@ import 'dot-connect/font.css' import { config } from './walletConfigs' import { ReDotProvider, ReDotChainProvider } from '@reactive-dot/react' import { Suspense } from 'react' -import { AccountContextProvider } from './contexts/AccountsContext' +import { AccountContextProvider } from '@/contexts/AccountsContext' +import { DelegateeContextProvider } from '@/contexts/DelegateesContext' const App = () => { const [settings] = useLocalStorage('fellowship-settings', { @@ -23,17 +24,19 @@ const App = () => { - - -
- -
-
- + + + +
+ +
+
+ +
-
- - + + + diff --git a/src/consts.ts b/src/consts.ts index f389645..ecd105f 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -6,7 +6,8 @@ const DappName = 'Polkadot DelegIt Dashboard' const PolkadotUrl = 'https://delegit-xyz.github.io/dashboard' const GithubOwner = 'delegit-xyz' -// const GithubApiUrl = `https://api.github.com/repos/${GithubOwner}/${GithubRfc}` +export const DelegeeList = + 'https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/registry/polkadot.json' const SideMenuMaximisedWidth = 185 const SideMenuMinimisedWidth = 75 diff --git a/src/contexts/DelegateesContext.tsx b/src/contexts/DelegateesContext.tsx new file mode 100644 index 0000000..10da130 --- /dev/null +++ b/src/contexts/DelegateesContext.tsx @@ -0,0 +1,50 @@ +/* eslint-disable react-refresh/only-export-components */ +import { createContext, useContext, useEffect, useState } from 'react' +import delegateesList from '@/polkadot.json' + +type DelegateesContextProps = { + children: React.ReactNode | React.ReactNode[] +} + +type DelegateeProps = { + address: string + name: string + image: string + shortDescription: string + longDescription: string + isOrganization: boolean +} + +export interface IDelegateesContext { + delegetees: DelegateeProps[] +} + +const DelegateesContext = createContext( + undefined, +) + +const DelegateeContextProvider = ({ children }: DelegateesContextProps) => { + const [delegetees, setDelegatees] = useState([]) + + useEffect(() => { + setDelegatees(delegateesList as DelegateeProps[]) + }, []) + + return ( + + {children} + + ) +} + +const useDelegatees = () => { + const context = useContext(DelegateesContext) + if (context === undefined) { + throw new Error( + 'useDelegatees must be used within a DelegateesContextProvider', + ) + } + return context +} + +export { DelegateeContextProvider, useDelegatees } diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 4b36285..af93c1b 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -19,3 +19,4 @@ export type RouterType = { export const routes: RouterType[] = [ { link: 'home', name: 'Home', icon: House }, ] + diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx index 009b690..d24cbf1 100644 --- a/src/pages/Home/index.tsx +++ b/src/pages/Home/index.tsx @@ -1,23 +1,35 @@ -import { Button } from '@/components/ui/button' +import { Card } from '@/components/ui/card' +import { useDelegatees } from '@/contexts/DelegateesContext' const openInNewTab = (url: string | URL | undefined) => { window.open(url, '_blank', 'noopener,noreferrer') } export const Home = () => { + const { delegetees } = useDelegatees() + + console.log(delegetees) return (

- Title + Delegetees

-

text

- + {delegetees?.map((d) => ( + +
+
+ +
+
+
{d.name}
+
{d.shortDescription}
+
+
+
Other info
+
+ ))}
- -
) } diff --git a/src/polkadot.json b/src/polkadot.json new file mode 100644 index 0000000..2bd42fe --- /dev/null +++ b/src/polkadot.json @@ -0,0 +1,393 @@ +[ + { + "address": "15G4hfDNtNhRc82As8Ep2YfvpM5xVdX7De3P9qSdHerGA6wC", + "name": "Alex PromoTeam", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/IMG_5814%204.JPG", + "shortDescription": "Polkadot Head Ambassador | PromoTeam Member | Validator ", + "longDescription": "PromoTeam is a diverse team of specialists and blockchain activists with various skills that actively promotes the Polkadot ecosystem. Our main activity is content production, offline and online event organization, community management and creation, product marketing, development of ambassador programs, network validation.", + "isOrganization": false + }, + { + "address": "13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC", + "name": "Polkassembly", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/polkassemblylogo192.png", + "shortDescription": "Governance platform for polkadot ecosystem", + "longDescription": "We are building governance platform for Polkadot & Kusama ecosystem", + "isOrganization": true + }, + { + "address": "13EyMuuDHwtq5RD6w3psCJ9WvJFZzDDion6Fd2FVAqxz1g7K", + "name": "ChaosDAO", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/chaosdao.png", + "shortDescription": "Community org with a dedicated internal voting process and multisig for OpenGov referenda", + "longDescription": "## About us\nChaosDAO is a curated community of Polkadot & Kusama natives. Our members are involved with every aspect of the ecosystem as developers, community organizers, [Twitter](https://twitter.com/ChaosDAO) and YouTube educators, and as ordinary retail investors.\n\n## Voting Process\nAs part of our own organization’s evolution we have developed a robust [internal governance mechanism](https://github.com/ChaosDAO-org/ChaosDAO_docs/blob/main/governance/OpenGov.md) to determine how our community will publicly vote on referenda. By voting on behalf of the long-time Dotsama community we strive to ensure that all votes we cast reflect the true best interests of our native ecosystem.\n\n![ChaosDAO Manifesto image](https://raw.githubusercontent.com/ChaosDAO-org/ChaosDAO_docs/main/.gitbook/assets/ChaosDAO_Manifesto_600px.jpg)", + "isOrganization": true + }, + { + "address": "129LBt5T1eYtnGHbPYeiiMdmWfokCiiq7z6JBfjnYifiombz", + "name": "Pioneer", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Supporting the network is the main incentive to work. Security in the guarantees and investment prospects of community members. The service is powered by renewable energy.", + "longDescription": "Supporting the network is the main incentive to work. Security in the guarantees and investment prospects of community members. The service is powered by renewable energy.", + "isOrganization": false + }, + { + "address": "12gPFmRqnsDhc9C5DuXyXBFA23io5fSGtKTSAimQtAWgueD2", + "name": "TurboFlakes", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/turboflakes.png", + "shortDescription": "## About us\n\nTurboFlakes builds end-user tooling and provides validators and collators for the Polkadot ecosystem since 2021. We also provide RPC infrastructure powered by 100%", + "longDescription": "## About us\n\nTurboFlakes builds end-user tooling and provides validators and collators for the Polkadot ecosystem since 2021. We also provide RPC infrastructure powered by 100% renewable energy for the common good.\n\nWe believe in the Web3 vision of a decentralized web. We love experimentation and ideation.\n\nIn Open Governance we participate and support proposals that overall would bring joy, evolution and success to the Polkadot ecosystem.\n\nRead more about us at https://turboflakes.io", + "isOrganization": true + }, + { + "address": "131Y21vAVYxm7f5xtaV3NydJRpig3CqyvjTyFM8gMpRbFH1T", + "name": "NeNa 🌻", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Flower🌻 power", + "longDescription": "Flower🌻 power", + "isOrganization": false + }, + { + "address": "13EEEhiXeCFpFjVQxmjJsHjr9LFvnAurcnwQ1FDgB5LmJwQp", + "name": "Swiss Bond", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "Swiss Bond is a trusted Governance delegate, infrastructure provider, validator and operator of the Swiss Pool nomination pools", + "longDescription": "Swiss Bond is a trusted Governance delegate, infrastructure provider, validator and operator of the Swiss Pool nomination pools", + "isOrganization": true + }, + { + "address": "13GtCixw3EZARj52CVbKLrsAzyc7dmmYhDV6quS5yeVCfnh1", + "name": "RADIUMBLOCK.COM", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "Radiumblock.com focuses on Web3 Infra for Designers, Developers, Dapps! Supporting a growing list of blockchains networks with world-class enterprise infrastructure!", + "longDescription": "Radiumblock.com focuses on Web3 Infra for Designers, Developers, Dapps! Supporting a growing list of blockchains networks with world-class enterprise infrastructure! Read more at: https://radiumblock.com/", + "isOrganization": true + }, + { + "address": "13mjnUDrHwYGATFB1FkFkZ1U3kYFsAQfHYTdcc8p3HP1xzZA", + "name": "Ruby-Node 💎", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "As a delegate on Polkadot, my primary goal is to contribute to the development and growth of the network through active participation in governance and decision-making.", + "longDescription": "As a delegate on Polkadot, my primary goal is to contribute to the development and growth of the network through active participation in governance and decision-making. I believe in the principles of decentralization and community-driven innovation, and I am committed to ensuring that the voice of the community is heard and represented in all aspects of governance. In addition to contributing to the overall growth and success of the Polkadot ecosystem, I am also interested in fostering collaboration and partnership between different projects and communities within the network. I believe that by working together and sharing resources and knowledge, we can create even greater value and opportunities for all participants. Overall, my goal as a delegate is to help build a strong and sustainable network that benefits all participants, and I am committed to working tirelessly towards this end.", + "isOrganization": false + }, + { + "address": "13pZskDR7Pt67NtcChSr4uFRBf9ZS52nQeyrceSykq8MDrMe", + "name": "Generic-chain", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "Generic chain offers Non-custodial Validation Services for many chains in the Polkadot ecosystem. With a reasonable commission and an outstanding operations team", + "longDescription": "Generic chain offers Non-custodial Validation Services for many chains in the Polkadot ecosystem. With a reasonable commission and an outstanding operations team, we are committed to ensure that these validators serve the network in the best possible way. Read more at https://www.generic-chain.io/", + "isOrganization": true + }, + { + "address": "13ujCsf3t2YAdAhcpcEFVoJAPRYzMLHUHEnLroQp41sJCSnm", + "name": "AG", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "AG staking provides high returns, low downtimes for many blockchain networks. Invested in increase decentralisation of young networks. Read more at : https://validator.ag/", + "longDescription": "AG staking provides high returns, low downtimes for many blockchain networks. Invested in increase decentralisation of young networks. Read more at : https://validator.ag/", + "isOrganization": true + }, + { + "address": "14d2kv44xf9nFnYdms32dYPKQsr5C9urbDzTz7iwU8iHb9az", + "name": "CoinStudio", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/coinstudio.png", + "shortDescription": "Kusama and Polkadot Validator, Governance participant. Check our active attempts to improve the Governance process https://kusama.polkassembly.io/post/2431", + "longDescription": "Kusama and Polkadot Validator, Governance participant. Check our active attempts to improve the Governance process https://kusama.polkassembly.io/post/2431", + "isOrganization": false + }, + { + "address": "14id3ENXVkJ34Q51AfWDGcMHA1EbGu8obF8QJLEUkzAB8KVh", + "name": "michalis", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Support & Anti-Scam Lead at Web3 Foundation. I vote in all referenda, but I usually abstain from the ones seeking funding, unless the proposal brings clear value to the ecosystem", + "longDescription": "Support & Anti-Scam Lead at Web3 Foundation. I vote in all referenda, but I usually abstain from the ones seeking funding, unless the proposal brings clear value to the ecosystem (like infrastructure, tools, or very original ideas).", + "isOrganization": false + }, + { + "address": "152QidDC4QrtMCyRGiQmvrNyjntvMg2XouCSdoPSeqUNTvsq", + "name": "Stake.Plus", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/stakeplus.png", + "shortDescription": "Validation, Collation and Infrastructure Services. We are committed to providing quality infrastructure services for the Polkadot ecosystem on owned hardware", + "longDescription": "Validation, Collation and Infrastructure Services. We are committed to providing quality infrastructure services for the Polkadot ecosystem on owned hardware powered by renewable energy.", + "isOrganization": true + }, + { + "address": "153YD8ZHD9dRh82U419bSCB5SzWhbdAFzjj4NtA5pMazR2yC", + "name": "SAXEMBERG", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "We offer validation and collation services of our nominators on the Kusama and Polkadot ecosystem. In addition, we are currently developing dapps on the same ecosystem.", + "longDescription": "We offer validation and collation services of our nominators on the Kusama and Polkadot ecosystem. In addition, we are currently developing dapps on the same ecosystem. We strive for a credible neutral ecosystem in fair terms for everybody. So we don't ever plan on exploiting consensus rules on blockchains or seek to exploit blockchains with misconfigured parameters. Read more at : https://saxemberg.com/about/.", + "isOrganization": true + }, + { + "address": "16CdHjb4nxVwF6uwmPm6A29pc4ubnLiY7UqasMxt7cT9BcoK", + "name": "NEWDEAL", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Holder and then independent validator, enthusiastic supporter of the polkadot world and its revolutionary technology", + "longDescription": "Holder and then independent validator, enthusiastic supporter of the polkadot world and its revolutionary technology", + "isOrganization": false + }, + { + "address": "15iwm1HrcGiTZoZenijMTCayRD3hM2RpKde3LrrNxPKAMjTg", + "name": "UBIK CAPITAL", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "Ubik Capital is a Proof of Stake service provider, validator, and investor. Ubik Capital provides staking as a service and investments to various blockchain projects.", + "longDescription": "Ubik Capital is a Proof of Stake service provider, validator, and investor. Ubik Capital provides staking as a service and investments to various blockchain projects. Ubik Capital secures major networks and is a trusted staking provider with years of industry experience. Read more at : https://ubik.capital/", + "isOrganization": true + }, + { + "address": "16iiKwFsRKRsjAiEpD4zgNgEX84nzHtHHNFKXhz1sHtan3ne", + "name": "CryptoLab 01", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Founder/Developer @ CryptoLab. hodler. validator. buidler, father! You can follow : https://twitter.com/iisaint", + "longDescription": "Founder/Developer @ CryptoLab. hodler. validator. buidler, father! You can follow : https://twitter.com/iisaint", + "isOrganization": false + }, + { + "address": "16Jh21ThTh2tW98NuN2gM7Q3KaYiuJLbxCNbuBkFpwcDkRqx", + "name": "Cypher Labs", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/organization_default.png", + "shortDescription": "Cypher Labs is a trusted Proof-of-Stake infrastructure provider and validator to comfortably stake your coins and earn rewards with Kusama.", + "longDescription": "Cypher Labs is a trusted Proof-of-Stake infrastructure provider and validator to comfortably stake your coins and earn rewards with Kusama.", + "isOrganization": true + }, + { + "address": "1LUckyocmz9YzeQZHVpBvYYRGXb3rnSm2tvfz79h3G3JDgP", + "name": "Polkadot.pro - Realgar", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Governance experimenter, validator, researcher. United Networks of State Machines. You can follow https://twitter.com/propolkadot", + "longDescription": "Governance experimenter, validator, researcher. United Networks of State Machines. You can follow https://twitter.com/propolkadot", + "isOrganization": false + }, + { + "address": "1UQC7Vs4zbywp8CbxcCCRUyyRqeUZxq9aXeD8UZ3MpLUy12", + "name": "Gontajones", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Polkadot Application Engineer at Parity. Help build an ecosystem of lighthouse projects, tutorials, documentation, and an open-source culture around Substrate.", + "longDescription": "Polkadot Application Engineer at Parity. Help build an ecosystem of lighthouse projects, tutorials, documentation, and an open-source culture around Substrate. Provide technical support to Polkadot ecosystem teams. You can follow https://twitter.com/arturgontijo.", + "isOrganization": false + }, + { + "address": "1BdoL1BP36SZGEKR4iX8ksou2GTnrDd5of99SWK82c3A4aB", + "name": "Eat Pray Validate 🍴🙏🖥", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/individual_default.png", + "shortDescription": "Sometimes i feel i've been chasing staking rewards my whole life.", + "longDescription": "Sometimes i feel i've been chasing staking rewards my whole life.", + "isOrganization": false + }, + { + "address": "15cZn8K1DaE7qiBWK6mGFJMKYKjFrALTVwe5urpD9PzKSsPY", + "name": "Abdulbee", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/Abdulbee_Nova.jpg", + "shortDescription": "I currently contribute to Polkadot full-time. I'm dedicated to the relay-chain, and not to an individual, official or organization. Hence, the best interest of the network", + "longDescription": "I currently contribute to Polkadot full-time. I'm dedicated to the relay-chain, and not to an individual, official or organization. Hence, the best interest of the network comes first, and my votes reflect this. Reputation and value-for-money are the two most important things I look at when reviewing and voting on referenda.", + "isOrganization": false + }, + { + "address": "15D2JM548bqRuE45aDmeF2WqiKC56WtNnRmCxVSree9YKwVb", + "name": "Will | Paradox | ParaNodes.io", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/paradox.png", + "shortDescription": "Former Kusama Council Member & Validator Operator at ParaNodes.io", + "longDescription": "## About me\nMy name is Will and I was a member of Kusama's council. My council experience allows me to better understand the technical aspects of governance and appreciate the general 'values' of the chain.\n\nI am also a well known within the validator community and operate validators under the moniker [ParaNodes.io](https://paranodes.io).\n\nIf you'll like to hear my thoughts on governance, please tune in to [AAG](https://www.youtube.com/playlist?list=PLtyd7v_I7PGkXbJmKojrZ1KXwspR1JkpV) I make live appearances on the first Monday of each month.", + "isOrganization": false + }, + { + "address": "12s6UMSSfE2bNxtYrJc6eeuZ7UxQnRpUzaAh1gPQrGNFnE8h", + "name": "Polkadotters", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/polkadotters.png", + "shortDescription": "Polkadotters - community validators and media house", + "longDescription": "We started in Polkadot ecosystem in 2020 by creating the first Czech & Slovak [Polkadot community](https://twitter.com/Polkadotters1), becoming ambassadors for Polkadot and various ecosystem projects and by educating the community about this wonderful ecosystem and its parachains.\n\n To this day, we have more than 200 articles and reviews published with more than 1500 followers on our [Medium](https://polkadotters.medium.com/)! But not only that, we are also one of the first community validators on both Polkadot and Kusama. Besides being active on the relay chain, we also run collators on most of the parachains, founded [DOT Validator Alliance](https://dotvalidators.org/) and recently became members of [United Bloc](https://unitedbloc.com/) and [IBP](https://dotters.network/).\n\n As we are quite active in the ecosystem, governance is our true passion and we take our job really seriously - and given our experience activities, we believe that we are quite suitable for the job.", + "isOrganization": true + }, + { + "address": "15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu", + "name": "Anton Khvorov", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/day_7.jpg", + "shortDescription": "CEO @ Novasama Technologies", + "longDescription": "## About me\nMy name is Anton Khvorov, I’m CEO of [Novasama Technologies](https://novasama.io) & Head of Engineering @ [Nova Wallet](https://novawallet.io).\nPassionate to build new innovative & amazing\nproducts, with a mindset to make the world a better place.\n\n## Voting strategy \n\nI do support referendums focused on the core values of Polkadot (decentralization, democracy, interoperability, reliability), as well as referendums that are focused on brining the power of Polkadot to mass adoption (products with great UX, open source, etc). \n\nI do not support entities that are active against any of these values and/or human rights. \n\nI often express my opinion on Polkassembly, especially in the case of controversial referendums.\n\n## Incentives\nEach month I’m going to mint & send NFT with my cat to each of my fellow delegators! 🐊\n\n![](https://i.ibb.co/5YtW1hn/Pelmeshka-small.jpg)\n\n## Stay in touch!\nIf you have any questions regarding my votes, feel free to contact me via email: anton@novawallet.io", + "isOrganization": false + }, + { + "address": "15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHddeM", + "name": "Sik | crifferent.de", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/sik-crifferent.png", + "shortDescription": "DotSama native node operator and community supporter", + "longDescription": "## About Sik\nFounder of [Crifferent Staking Services](https://crifferent.de) \n\nDeveloper for [Staking Facilities](https://stakingfacilities.com) \n\nMember of [DOT Validator Alliance DAO](https://dotvalidators.org) \n\nTeam member @[HydraDX](https://hydradx.io)/[Basilisk](https://bsx.fi) \n\nRPC provider @[UnitedBloc](https://unitedbloc.com/) \n\n---\n\n**From within the ecosystem - for the ecosystem!** \n\nI'm evaluating proposals by taking different views into consideration. I'm not only looking at it from the perspective of a community member, but also as a developer/founder/infra-provider/human being. \n\n---\n## Contact me \n\n@dev0_sik @[Twitter](https://twitter.com/dev0_sik) \n\n@dev0_sik @[Telegram](https://t.me/dev0_sik) \n\nsik#3706 @[Discord](https://discord.com/) \n\n@dev0_sik:matrix.org @[Element](https://element.io/) \n\n[simon.kraus@crifferent.de](mailto:simon.kraus@crifferent.de) \n\nWhatsApp/Callboy +49 157 377 309 02", + "isOrganization": false + }, + { + "address": "12mP4sjCfKbDyMRAEyLpkeHeoYtS5USY4x34n9NMwQrcEyoh", + "name": "PolkaWorld", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/PolkaWorld.png", + "shortDescription": "the largest Polkadot Chinese community in Asia", + "longDescription": "## About us\n\nPolkaWorld is the largest Polkadot Chinese community in Asia and has formerly served as a Council Member for Polkadot and Kusama. It has been involved in numerous proposal votings and has a profound understanding of Polkadot's OpenGov governance system", + "isOrganization": true + }, + { + "address": "1eGtATyy4ayn77dsrhdW8N3Vs1yjqjzJcintksNmScqy31j", + "name": "Amforc", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/amforc-Icon_rund_192x192.png", + "shortDescription": "Independent and experienced staking provider from Switzerland", + "longDescription": "## Voting Methodology\nWe are strong believers in a free market, and focus on the protection of privacy, political freedom, and economic freedom for the long-term growth of the network.\n\n## About us\nAmforc is a bootstrapped company based in Switzerland, and is exclusively committed to the Polkadot ecosystem. We run a hybrid-cloud setup in combination with our own data center (colocation) in a former military bunker. Our expertise covers the areas of IT infrastructure and security, legal and regulatory matters, as well as tokenomics and game theory.", + "isOrganization": true + }, + { + "address": "16CxXYoq9joofWE13zWuWBfd4tx3kQhXJECLLkhMLgWjYyHG", + "name": "Math Crypto", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/mathcrypto.png", + "shortDescription": "Active OpenGov contributor | 1kv validator", + "longDescription": "We run [validators for Kusama and Polkadot](https://www.math-crypto.com/) within the 1kv programme. From the beginning of OpenGov, we have contributed to governance by participating in discussions, diligently voting on each proposal, and making user-friendly tools for participating in OpenGov. \n Delegation to MathCrypto means that you care about proposals that focus on a decentralized but secure validator network, developing novel use-cases for Dotsama, and cost efficient education and media content.", + "isOrganization": false + }, + { + "address": "16SpacegeUTft9v3ts27CEC3tJaxgvE4uZeCctThFH3Vb24p", + "name": "Staker Space", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/staker-space.png", + "shortDescription": "Staker Space independent node operator and community member", + "longDescription": "## About Staker Space\nWe are an independent node-operator group called [Staker Space](https://staker.space). We have been a part of Polkadot since the early testnets. As a node operator we maintain highly available and reliable nodes that contribute to the overall health and stability of the network. Besides our specialization we are committed to serving the community and contributing to the growth and success of the network on all fronts.\n\n## Our Strategy\nWith referenda we care for protocol-security and enabling builders and users in the bigger Polkadot ecosystem. We support open networks in order to secure the future of the decentralized systems.\n\n## Contact us\nPlease feel free to contact us.\n\n[Staker Space Discord](https://discord.gg/9AREXj8ESr)\n\n[Staker Space Twitter](https://twitter.com/stakerspace)\n\n[Staker Space Telegram](https://t.me/staker_space)\n\n[Staker Space Email](mailto:hello@staker.space)", + "isOrganization": true + }, + { + "address": "167ShbHu769mP5jbtt7AHayJhzEied6s8M5kN5nBSAQewnRz", + "name": "DOZENODES", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/dozenodes.png", + "shortDescription": "Polkadot Validator Operator www.dozenodes.com", + "longDescription": "## About me\n\nMy name is Marcin and I'm the main technical guy behind dozenodes.com.\n\nI'm an active memeber of communities for multiple project in dotsama ecosytem\n\n I have vast technical expirience which allows me to properly assess proposed changes.\n\n Feel free to contact me via contact section of dozenodes.com.", + "isOrganization": false + }, + { + "address": "14Y4s6V1PWrwBLvxW47gcYgZCGTYekmmzvFsK1kiqNH2d84t", + "name": "RockX | rockx.com", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/rockx-logo.png", + "shortDescription": "RockX is a global blockchain node network and gateway for users to seamlessly access Web3, offering institutional-grade solutions and a full suite of developer tools for users to stake and build on all major Proof-of-Stake blockchains.", + "longDescription": "RockX is a global blockchain node network and gateway for users to seamlessly access Web3, offering institutional-grade solutions and a full suite of developer tools for users to stake and build on all major Proof-of-Stake blockchains.\n\nWith its foundations rooted in staking, protocol research and infrastructure design, RockX has built countless access nodes for users to interact with over 20 layer 1 and 2 protocols — driving greater accessibility and furthering adoption of blockchain technologies.", + "isOrganization": true + }, + { + "address": "15wnPRex2QwgWNCMRVSqgqp2syDn8Gf6LPGGabRhA8zoohpt", + "name": "UTSA", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/utsa.png", + "shortDescription": "Validator Polkadot, Kusama, Cosmos | Senior Ambassador Moonbeam", + "longDescription": "𝐔𝐓𝐒𝐀 is a trustworthy and high performance validator that supports public hotspots, relaying, and required documentation. Our team is actively working to develop local crypto communities, create a WIKI in Russian about the Polkadot and Cosmos ecosystems https://teletype.in/@lesnik13utsa. We consider Governance to be the backbone of Polkadot development and pay great attention to it. Your delegations to us = getting the right choice and free time!", + "isOrganization": false + }, + { + "address": "149BsxLw1jXeDnbh9WHd7Pezxyfnpwo3oYnJWWUEPQhsJkDm", + "name": "Gaius_Sama", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/Gaius_sama.png", + "shortDescription": "Polkadot Ambassador in France, long-time DOT holder, All-Star Ambassador and Builder on the Astar Network", + "longDescription": "## About me\n\nPolkadot Ambassador in France and long-time DOT holder.\n\nMy dedication comes from a deep appreciation of our community's efforts and a strong belief in the future potential of our network.\n\nBeyond my role at Polkadot, I am deeply involved in the Astar network ecosystem, as an All-Star Ambassador and Builder. This multifaceted involvement reflects my passion for promoting innovation and growth in the blockchain space.\n\nThe Polkadot OpenGov initiative is a remarkable demonstration of blockchain's capabilities. It represents a decisive step towards reshaping our model of societal governance through the application of cutting-edge technology.\n\nFor those who wish to engage in Polkadot governance but are faced with time restrictions, the delegation of voting power offers a transparent solution. Entrust me with your vote, and I'll gladly represent your voice in future referendums. Together, we're shaping the future of our network.\n\n## Contact me\n\nDiscord: gaius_sama\n\n[Twitter: @gunit3124](https://twitter.com/gunit3124)\n\n[Telegram: @Gaius_sama](https://t.me/Gaius_sama)\n\nEmail: [g.unit2481@gmail.com](mailto:g.unit2481@gmail.com)", + "isOrganization": false + }, + { + "address": "12s37eSMQPEN5cuVyBxk2UypUHntwumqBHy7sJkoKpZ1v3HV", + "name": "Birdo", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/birdo.jpg", + "shortDescription": "💫 Macrodata Refiner @paritytech building @polkadot", + "longDescription": "💫 Macrodata Refiner @paritytech building @polkadot", + "isOrganization": false + }, + { + "address": "13kzfkXXF7nSCzaMS2Eok8scDS9jZk89yWyfsCBWvDDJKaZy", + "name": "KRYPTOSCHAIN", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/KryptosChain_Logo.png", + "shortDescription": "Polkadot Ambassador & early Polkadot Content Creator, known as KryptosChain on Youtube, Twitter, Telegram & Discord", + "longDescription": "## About me\n\nPolkadot Ambassador and early Polkadot Content Creator.\n\n## Contact me\n\nTelegram: KryptosChain\n\n[Twitter: @KryptosChain](https://twitter.com/KryptosChain)", + "isOrganization": false + }, + { + "address": "14g2mcpaEJoMCpnzStbYTTRKcZsWAYeKUzdE8ph6jYCrZuPS", + "name": "LucaCrypto", + "image": "https://raw.githubusercontent.com/lucadice/opengov-delegate-registry/master/images/Lucacrypto.png", + "shortDescription": "Vibing and voting 🕺🗳️ Polkadot Enthusiast 🚀🔵 long time viewer of AAG 👁️📺[Twitter: @NFTsaremyjam](https://twitter.com/NFTsaremyjam)", + "longDescription": "Vibing and voting 🕺🗳️ Polkadot Enthusiast 🚀🔵 long time viewer of AAG 👁️📺[Twitter: @NFTsaremyjam](https://twitter.com/NFTsaremyjam)", + "isOrganization": false + }, + { + "address": "16fbkDCMrAo1uyC52NyA8Y2dETnYVpCofSoj3QEE2WUNnkLk", + "name": "INFRASTRUCTURE CORPORATION", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/INFRASTRUCTURE_CORPORATION.png", + "shortDescription": "validator | elector | polkadot | kusama", + "longDescription": "[INFRASTRUCTURE CORPORATION](https://infrastructurecorporation.com) provides dependable stake nomination and vote delegation targets. Our mission is to contribute foundation under the emerging digital renaissance by providing robust, innovative, and sustainable digital infrastructures that empower individuals and organizations to participate in the unfolding digital age.", + "isOrganization": false + }, + { + "address": "14hKbFVLgZHNAWTQ51Q315Jm1HVEoDt6DMt4L83y2BW5ZvPL", + "name": "Alianza Hispana", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/alianza.png", + "shortDescription": "Representamos a la comunidad de habla hispana en el proceso de gobernanza y en la toma de decisiones.", + "longDescription": "Este colectivo está formado por personas del ecosistema de Polkadot y Kusama que cuentan con una pluralidad de perfiles, experiencia en el ecosistema y un fuerte compromiso con el bienestar de la red y sus usuarios, unidos bajo la misión de fortalecer y empoderar a nuestra comunidad en el ecosistema de Polkadot y Kusama. \n[ver mas en el manifiesto](https://cloudflare-ipfs.com/ipfs/QmSW7cLigiMR9wsnmPopE6z4RE1XXdDYd8SebA6A6nwqbJ)", + "isOrganization": true + }, + { + "address": "15KHTWdJyzyxaQbBNRmQN89KmFr1jPXXsPHM5Rxvd1Tkb2XZ", + "name": "The Kus DOT Delegate", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/KUS_robot.png", + "shortDescription": "Polkadot media and governance.", + "isOrganization": true + }, + { + "address": "1wpTXaBGoyLNTDF9bosbJS3zh8V8D2ta7JKacveCkuCm7s6", + "name": "Giotto Brain Governance", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/giotto.png", + "shortDescription": "Giotto - DOT activist, support marketing, meme coins, airdrops, BD, anything that can allow Polkadot ecosystem to grow. I value effectiveness more than efficiency", + "longDescription": "Giotto - DOT activist, support marketing, meme coins, airdrops, BD, anything that can allow Polkadot ecosystem to grow. I value effectiveness more than efficiency", + "isOrganization": false + }, + { + "address": "16ce9zrmiuAtdi9qv1tuiQ1RC1xR6y6NgnBcRtMoQeAobqpZ", + "name": "metaspan", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/metaspan-logo-white-on-trans.png", + "shortDescription": "Validating on Polkadot & Kusama. Actively supporting and contributing to the community via development, utils, education, and advocacy.", + "longDescription": "**metaspan** is a trusted network infrastructure provider and validator on Polkadot and Kusama.\n\nWe are a team of experienced engineers and developers with a passion for blockchain technology and the Polkadot ecosystem.\n\nWe are actively involved in the community and contribute to the ecosystem via development, utilities, education, and advocacy.\n\nWe are committed to the long-term success of Polkadot and Kusama and are excited to be a part of the journey.", + "isOrganization": true + }, + { + "address": "12eMZTAnXEsyedXmsB6jDVRnF9Mq8ZrhLefRGhxPE4JwrPAS", + "name": "MAD CRIPTO", + "image": "https://raw.githubusercontent.com/MADCRIPTO/opengov-delegate-registry/master/images/madcripto.png", + "shortDescription": "Activo en la governanza por el amor a Polkadot", + "longDescription": "Creo contenido en español y represento a la comunidad hablahispana en la governanza.", + "isOrganization": false + }, + { + "address": "1srcFWVcPn2oXEKuddMMTGCLQMDdRqxKKo9qpFTi8PA7NW1", + "name": "ValidOrange.Net", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/ValidOrangeLOGO192x192.png", + "shortDescription": "Independent validator operator based in US. Infrastructure experience and active in OpenGov.", + "longDescription": "ValidOrange operates Polkadot and Kusama validators. I vote on all OpenGov proposals and try to cast votes that support the best interests of the ecosystem.", + "isOrganization": false + }, + { + "address": "16htP3atjNbcaZXx1owdKehUPn3zb6oVEcj8s43bbXycXujL", + "name": "🌀 The Center Party 🌀", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/the-center-party.png", + "shortDescription": "Championing balanced growth through strategic marketing and prudent spending.", + "longDescription": "Seeking to fund reasonable marketing proposals where the value prop can clearly be defined, and aim to hold recepients of funding accountable for their deliverables.", + "isOrganization": false + }, + { + "address": "16DNbAdyy6QsTPdDDHL5gt7FaeAQ1UioJA6Pj7aUGJERveFd", + "name": "Polkadot Hungary Community", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/logoPH2.png", + "shortDescription": "Local Polkadot Community based in Budapest strives for OpenGov delegations from the broader Polkadot Community", + "longDescription": "## About us\nThe Polkadot Hungary Community has been continuously organising the local Polkadot community since 2020. During this time we have co-organised more than [30 Polkadot meetup](https://www.meetup.com/polkadot-hungary/), [2 Polkadot Championship Hackathon](https://cointelegraph.com/press-releases/hackers-wanted-for-polkadots-36k-metaverse-championship-anyone-welcome/) and the biggest on-site event of Budapest Blockchain Week, Polkadot Day. Our community was started by Six, the regional Head Ambassador and we are now the most active crypto/blockhain community in Hungary in terms of event organization and [Telegram group](https://t.me/polkadothungary/) activity. Our main motivation is community organization and community education on how to use the Polkadot ecosystem, so we provide them with news, videos and informative articles.\nOur community is shaping the evolution of the Polkadot Network. We have launched the Polkadot Hungary Staking Pool with Pool ID 219, and actively participate in Polkadot's on-chain governance system, OpenGov, with our expertise. Votes are determined by community voting and are cast via a multisignature account.\n\n## 🇭🇺 A közösségünkről\n A Polkadot Hungary Community 2020 óta töretlenül szervezi a lokális Polkadot közösséget. Ez idő alatt több, mint [30 Polkadot Meetup-ot](https://www.meetup.com/polkadot-hungary/), [2 Polkadot Championship Hackathon-t](https://cointelegraph.com/press-releases/hackers-wanted-for-polkadots-36k-metaverse-championship-anyone-welcome/) és a budapesti Blockchain Week legnagyobb eseményét, a Polkadot Day-t szervezezte meg. Közösségünket Six, a regionális Head Ambassador indította el és mára már a legaktívabb crypto/blokklánc közösség vagyunk Magyarországon esemény szervezés és [Telegram csoport](https://t.me/polkadothungary/) aktivitás alapján. Fő motivációnk a közösségszervezés az edukáció a Polkadot ökoszisztéma használatára, így ellátjuk őket hírekkel, videókkal és informatív cikkekkel.\nKözösségünk formálja a Polkadot Network alakulását. A 219-es Pool ID-val elindítottuk a Polkadot Hungary Staking Pool-t, valamint szakértelmünkkel aktívan részt veszünk a Polkadot on-chain governance rendszerében, OpenGov-on. A referendumokra közösségi elbírálás után szavazunk a Polkadot Hungary Community multisig tárcájával.\n\n![Polkadot Hungary Community logo](https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/logo_phc.png)", + "isOrganization": true + }, + { + "address": "12Edi9rmcgbJDDRkrZ789zfoKGr9stJvRxMuSmQ7yB7E2AEP", + "name": "The Sons of Gavin", + "image": "https://raw.githubusercontent.com/nova-wallet/opengov-delegate-registry/master/images/TheeWeb3Patriot.png", + "shortDescription": "Web3 Delegation", + "longDescription": "The Sons of Gavin is operated by TheeWeb3Patriot, It is a web3 centered delagate that holds values of being treasury conservatives.", + "isOrganization": false + }, + { + "address": "1jPw3Qo72Ahn7Ynfg8kmYNLEPvHWHhPfPNgpJfp5bkLZdrF", + "name": "Jimmy Tudeski - Stakenode", + "image": "https://raw.githubusercontent.com/novasamatech/opengov-delegate-registry/master/images/Jimmy%20Profile%20.png", + "shortDescription": "Polkadot Resident, Ambassador, and Validator - https://x.com/stakenode_dev", + "longDescription": "An experienced and principled Polkadot governance delegate dedicated to strategic development, community engagement, and fostering long-term ecosystem growth. Your representative for the inclusive and democratic OpenGov on Polkadot. Delegate Your votes, relax, and watch the ecosystem grow. ", + "isOrganization": false + } +] From d4ccb2eebe7836fb95643bffdb6fecbb1a355678 Mon Sep 17 00:00:00 2001 From: Nikos Kontakis Date: Tue, 20 Aug 2024 17:06:58 +0200 Subject: [PATCH 2/5] dialog --- src/components/ui/dialog.tsx | 120 +++++++++++++++++++++++++++++ src/contexts/DelegateesContext.tsx | 15 ++++ src/pages/Home/index.tsx | 58 +++++++++++++- 3 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 src/components/ui/dialog.tsx diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx new file mode 100644 index 0000000..c23630e --- /dev/null +++ b/src/components/ui/dialog.tsx @@ -0,0 +1,120 @@ +import * as React from "react" +import * as DialogPrimitive from "@radix-ui/react-dialog" +import { X } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Dialog = DialogPrimitive.Root + +const DialogTrigger = DialogPrimitive.Trigger + +const DialogPortal = DialogPrimitive.Portal + +const DialogClose = DialogPrimitive.Close + +const DialogOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName + +const DialogContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + + {children} + + + Close + + + +)) +DialogContent.displayName = DialogPrimitive.Content.displayName + +const DialogHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +DialogHeader.displayName = "DialogHeader" + +const DialogFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +DialogFooter.displayName = "DialogFooter" + +const DialogTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogTitle.displayName = DialogPrimitive.Title.displayName + +const DialogDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogDescription.displayName = DialogPrimitive.Description.displayName + +export { + Dialog, + DialogPortal, + DialogOverlay, + DialogClose, + DialogTrigger, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, +} diff --git a/src/contexts/DelegateesContext.tsx b/src/contexts/DelegateesContext.tsx index 10da130..2c1ffd4 100644 --- a/src/contexts/DelegateesContext.tsx +++ b/src/contexts/DelegateesContext.tsx @@ -1,6 +1,8 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable react-refresh/only-export-components */ import { createContext, useContext, useEffect, useState } from 'react' import delegateesList from '@/polkadot.json' +// import { dotApi } from '@/clients' type DelegateesContextProps = { children: React.ReactNode | React.ReactNode[] @@ -30,6 +32,19 @@ const DelegateeContextProvider = ({ children }: DelegateesContextProps) => { setDelegatees(delegateesList as DelegateeProps[]) }, []) + // Votes thingy - pause for now + // useEffect(() => { + // const a = async (delegetees: any[]) => { + // const result: Promise[] = delegetees.map((d) => { + // return dotApi.query.ConvictionVoting.VotingFor.getEntries(d.address) + // }) + // await Promise.all(result).then((res) => { + // console.log(res) + // }) + // } + // a(delegetees) + // }, [delegetees]) + return ( {children} diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx index d24cbf1..3dba420 100644 --- a/src/pages/Home/index.tsx +++ b/src/pages/Home/index.tsx @@ -1,5 +1,19 @@ +import { Button } from '@/components/ui/button' import { Card } from '@/components/ui/card' import { useDelegatees } from '@/contexts/DelegateesContext' +import { Check, Copy, Ellipsis } from 'lucide-react' +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTrigger, +} from '@/components/ui/dialog' + +import { ellipsisFn } from '@polkadot-ui/utils' + +import copy from 'copy-to-clipboard' +import { useEffect, useState } from 'react' const openInNewTab = (url: string | URL | undefined) => { window.open(url, '_blank', 'noopener,noreferrer') @@ -8,6 +22,14 @@ const openInNewTab = (url: string | URL | undefined) => { export const Home = () => { const { delegetees } = useDelegatees() + const [copied, setCopied] = useState(false) + + useEffect(() => { + if (copied) { + setTimeout(() => setCopied(false), 1000) + } + }, [copied]) + console.log(delegetees) return (
@@ -25,8 +47,42 @@ export const Home = () => {
{d.name}
{d.shortDescription}
+ + + + + + +
{d.name}
+
+ +
{ellipsisFn(d.address)}
+
+ {copied ? ( + + ) : ( + { + setCopied(true) + copy(d.address) + }} + /> + )} +
+
+
+
{d.longDescription}
+
+
+
-
Other info
+
))}
From 94b7ce1deb32ff4c9f7098fdd52910f3be0f899b Mon Sep 17 00:00:00 2001 From: Nikos Kontakis Date: Tue, 20 Aug 2024 17:09:12 +0200 Subject: [PATCH 3/5] make button ghost --- src/pages/Home/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx index 3dba420..715f5ad 100644 --- a/src/pages/Home/index.tsx +++ b/src/pages/Home/index.tsx @@ -50,6 +50,7 @@ export const Home = () => {