Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
3f42d49
feat(web): update content
2075 May 8, 2024
8c4e521
chore: disable prettier to enable builds
2075 May 8, 2024
c65fa3b
feat(web): make it pretty
2075 May 8, 2024
fb6a91e
feat: update content
2075 May 8, 2024
efd0fdb
feat: update app
2075 Oct 2, 2024
fdb7e9c
feat: show balances
2075 Oct 2, 2024
72849fc
feat: disable all network providers
2075 Oct 16, 2024
064dffa
feat: init astar dashboard
2075 Nov 6, 2024
0912a48
feat: update astar
2075 Nov 6, 2024
758309a
feat: update queries, convert balances
2075 Nov 8, 2024
72694c0
feat: no render without wallet
2075 Nov 13, 2024
7a055c2
feat: roll back balances key
2075 Nov 13, 2024
96a5dea
feat: refactor balance to lowercase
2075 Nov 13, 2024
ec2b92b
feat: add, move services to non dapp packages
2075 Nov 16, 2024
4047f80
feat: move, rename packages
2075 Nov 16, 2024
e682a1b
feat: add global graph package
2075 Nov 16, 2024
f23e83b
feat: update graph, bump deps
2075 Nov 16, 2024
ae1a321
chore: update tsconfig, root deps
2075 Nov 16, 2024
44a5fd5
feat: clean up packages, fix links
2075 Nov 18, 2024
f119869
feat: update astar dapp
2075 Nov 18, 2024
9bb4b22
feat: update astar dashboard build
2075 Nov 20, 2024
7a1f89e
feat: update packages
2075 Nov 20, 2024
f3b0cbe
feat: update packages
2075 Nov 20, 2024
a44b089
feat: update queries, render staking balances
2075 Nov 21, 2024
9f4c8b2
feat: update hook links
2075 Nov 22, 2024
7fe4a79
feat: update graph build
2075 Nov 22, 2024
6675cae
feat: update services
2075 Nov 22, 2024
2ace2f2
feat: add astar json, update linter, clean up logger refs
2075 Nov 24, 2024
821ad38
feat: add dapp staking api, query, hooks
2075 Dec 1, 2024
56486a4
feat: add astar dapps query to dashboard
2075 Dec 1, 2024
a37dc83
feat: update astar dashboard
2075 Dec 1, 2024
c02216c
feat: reorg
2075 Dec 1, 2024
ae491d8
feat: reorder parsing
2075 Dec 1, 2024
4797e2d
feat(stakeboard): split components
2075 Dec 8, 2024
2447652
feat(stakeboard): update graph queries
2075 Dec 8, 2024
39f5db6
feat(stakeboard): update hooks, types
2075 Dec 8, 2024
23adf98
chore: update prettier, lint config
2075 Dec 8, 2024
fa34bb3
chore: repo org
2075 Dec 8, 2024
075b550
feat(web): update content blocks
2075 Dec 8, 2024
ddacd41
feat(stakeboard): add reward graph
2075 Dec 9, 2024
cd211ff
feat(stakeboard): add era api
2075 Dec 13, 2024
6d21079
feat(stakeboard): add error handling
2075 Dec 13, 2024
27d3478
feat(stakeboard): update graph auth
2075 Dec 14, 2024
79252b7
feat(stakeboard): fix tvl calculation
2075 Dec 15, 2024
389135f
feat(stakeboard): update $GAME drop calculation
2075 Dec 28, 2024
ad4c245
feat(stakeboard): refactor to grid :)
2075 Jan 16, 2025
a83b4ad
feat(api): add lib
2075 Jan 16, 2025
31794d1
feat(stakeboard): rank
2075 Jan 16, 2025
2b2b9d1
feat(stakeboard): update graph, rewards
2075 Jan 18, 2025
d8fedce
feat(stakeboard): update dashboard
2075 Jan 18, 2025
3d9b4c2
feat(stakeboard): rm network and wallet requirement
2075 Jan 23, 2025
2f30fe6
fix: api
2075 Jan 23, 2025
39e7566
fix: resolve css warnings, errors
2075 Jan 25, 2025
2ac34e6
feat: update package links, hooks, types
2075 Feb 26, 2025
343cfff
feat: update dapp for season 4, rm sign in
2075 Feb 26, 2025
bcf5427
feat(astar): hide rewards for non gamedao participants
2075 Feb 26, 2025
b4112b1
feat(astar): update blocknumber, era, period calculation
2075 Feb 26, 2025
89193dd
feat: revert avart api
2075 Feb 26, 2025
793e94c
feat(astar): add auth
2075 Feb 26, 2025
e235d76
feat(astar): add navbar
2075 Feb 26, 2025
c0c1f72
feat(astar): update events processing
2075 Mar 3, 2025
7ce3da5
feat(astar): fix exports
2075 Mar 3, 2025
462d9c3
feat(astar): update staking info
2075 Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ indent_style = tab
[*.{json}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf


[*.{yml,yaml,toml}]
indent_style = space
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build
dist
archive
node_modules
*.yml
10 changes: 0 additions & 10 deletions .prettierrc.js

This file was deleted.

39 changes: 33 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
(!(Commitizen friendly]<https://img.shields.io/badge/commitizen-friendly-brightgreen.svg]]<http://commitizen.github.io/cz-cli/]
[![API Docker Image CI](https://github.com/gamedaoco/gamedao-haiku/actions/workflows/api-docker-image.yml/badge.svg?branch=dev)](https://github.com/gamedaoco/gamedao-haiku/actions/workflows/api-docker-image.yml)

GameDAO is a community owned fundraising, coordination and ownership protocol for the GAME industry ( Games, Arts, Music, Entertainment ). It is governed by the GAME token and follows the vision to create a legal DAO and fully regulatory compliant protocols, thus enabling transition of traditional gamers, creators, publishers, investors to make use of decentralised protocols.
GameDAO is a community owned video games publishing, storefront and production guild for games, arts, music and entertainment. It is governed by the community using the GAME token and follows the vision to operate a legal DAO along wiht fully regulatory compliant protocols for fundraising, coordination and ownership for the creative industry, thus enabling transition of traditional gamers, creators, publishers, investors to make use of decentralised protocols to create better together.

## How does it work

Creative individuals and teams form a guild on GameDAO to get discovered by the GameDAO community. The community supports the guilds in creating a proposal for their project idea to allocate seed funding to create e.g. a Game Design Document along with concept art and prototypes. If the proposal gets accepted, the guild receives a publishing agreement and support by the community to get started and coordinate until release. To achieve this in a transparent and accountable fashion, project teams would agree on milestones and present their results to keep up the support by the community.

## Technology

GameDAO operates independently across ecosystems. At the current point in time, various technical integrations take place. The original protocols have been developed in rust and have also been soft audited through automated testing by SRLabs during the substrate builders program participation. Now the team is working on ink and EVM implementations to enable true crosschain deployment and interaction.

### Protocols

- CONTROL — building unstoppable organizations
- FLOW — fundraising and project curation
Expand All @@ -24,26 +34,43 @@ This is a monorepo creating multiple web dapps, projects can be accessed through
## Contribution, Development

### Requirements

- node lts
- yarn lts
- docker, docker-compose

### Installation

- setup `yarn setup && yarn build:graphql`
- run development environment `yarn dev`
- tests `yarn build`
- storybook `yarn sb`

## Core Contributors in no particular order
## Contributors in no particular order

Marco Bahn, Andre Schnelzer, Yevhen Vasylenko, Volodymyr Brazhnyk, Pascal Akhidue, Yuri Filimonchuk, Carsten Greif, Inan Güder, Mike Planzer, Zhenya Ddzidziguri, Johannes Halm, Jaayden Halko, and many more.
Marco Bahn, Johannes Halm, Andre Schnelzer, Yevhen Vasylenko, Volodymyr Brazhnyk, Pascal Akhidue, Yuri Filimonchuk, Carsten Greif, Inan Güder, Yonghan Lee, Mike Planzer, Zhenya Ddzidziguri, Jaayden Halko, and many more.

## Friends, Partners, Credits

- [GAME3 Foundation](https://game3.foundation)
- [ZERO Network](https://zero.io)
- [Kilt Protocol](https://kilt.io)
- [Substrate Framework](https://substrate.io)

## License
© Copyright 2019-2023 GameDAO AG, Liechtenstein

© Copyright 2024 GameDAO AG.
All rights reserved.
Patents Pending.

## Disclaimer

GameDAO AG (“GameDAO”) is not an exchange, funding portal, custodian, trust company, licensed broker, dealer, broker-dealer, investment advisor, investment manager, or advisor in the United States or elsewhere. GameDAO is not affiliated with and does not endorse any particular cryptocurrency, precious metal, or investment strategy.

Cryptocurrencies are a speculative investment with risk of loss. Staking involves considerable risk. Cryptocurrency is not legal tender backed by the United States government, nor is it subject to Federal Deposit Insurance Corporation (“FDIC”) insurance or protections. Historical performance is no guarantee of future results.

Some taxes and conditions may apply. Investors assume the risk of all purchase and sale decisions. GameDAO makes no guarantee or representation regarding investors' ability to profit from any transaction or the tax implications of any transaction. GameDAO does not provide legal, investment or tax advice. Consult a qualified legal, investment, or tax professional.

Information contained on this website is for information purposes only. It is not tailored to any specific user. It does not constitute investment advice in any way, nor does it constitute an offer to sell or a solicitation of an offer to buy or sell any cryptocurrency or security or to participate in any investment strategy. GameDAO makes no representation or warranty as to the accuracy or completeness of this information and shall not have any liability for any representations (expressed or implied) or omissions from the information contained herein. GameDAO disclaims any and all liability to any party for any direct, indirect, implied, punitive, special, incidental or other consequential damages arising directly or indirectly from any use of this information, which is provided as is, without warranties. See important Terms of Service and Risk Disclosures.

Apple®, iPhone®, App Store®, and Apple logo® are registered trademarks of Apple Inc.

Google Play and the Google Play logo are trademarks of Google LLC.
7 changes: 4 additions & 3 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev -p 5555",
"dev": "next dev -p 1234",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand All @@ -18,8 +18,8 @@
"@emotion/react": "^11.9.3",
"@emotion/server": "^11.4.0",
"@emotion/styled": "^11.9.3",
"@gamedao/components": "*",
"@gamedao/translations": "*",
"@gamedao/ui": "*",
"@gamedao/i18n": "*",
"@google/model-viewer": "^3.3.0",
"@graphql-tools/graphql-file-loader": "^7.3.14",
"@graphql-tools/load": "^7.5.13",
Expand All @@ -32,6 +32,7 @@
"@mui/icons-material": "^5.8.4",
"@mui/lab": "^5.0.0-alpha.91",
"@mui/material": "^5.9.1",
"@mui/x-charts": "^7.6.2",
"@mui/x-data-grid": "^5.13.1",
"@mui/x-date-pickers": "^5.0.0-beta.1",
"@next-auth/mongodb-adapter": "^1.1.1",
Expand Down
15 changes: 11 additions & 4 deletions apps/app/src/components/atoms/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ import { CircularProgress, Typography, Stack } from '@mui/material'
type Props = {
text?: string
}

export const Spinner = ({ text }: Props) => {
return (
<Stack spacing={2} width={'100%'} height={'100%'} justifyContent="center" alignItems="center">
<CircularProgress color="inherit" />
{text && <Typography variant="body2">{text}</Typography>}
</Stack>
)
}

export const Loader = ({ text }: Props) => {
return (
<Backdrop sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }} open={true}>
<Stack spacing={2} justifyContent="center" alignItems="center">
<CircularProgress color="inherit" />
{text && <Typography variant="h5">{text}</Typography>}
</Stack>
<Spinner text={text} />
</Backdrop>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface ComponentProps {
}

export function TransactionDialog({ open, onClose, txData, txCallback, children }: ComponentProps) {
console.log('transactionDialog', open, txData)
const { t } = useTranslation()

const [showDescription, setShowDescription] = useState<boolean>(false)
Expand Down Expand Up @@ -67,10 +68,9 @@ export function TransactionDialog({ open, onClose, txData, txCallback, children

<Stack direction="row" justifyContent="space-between" spacing={{ xs: 2, sm: 4 }}>
<Typography variant="body2">{t('button:ui:transaction:transaction_fee')}</Typography>
<Typography variant="body1">{`-${formatBalanceString(
paymentInfo?.partialFee?.toString() ?? '0',
18,
)} ${networkBalance.tokenSymbol}`}</Typography>
<Typography variant="body1">{`-${formatBalanceString(paymentInfo?.partialFee?.toString() ?? '0', 18)} ${
networkBalance.tokenSymbol
}`}</Typography>
</Stack>
<Divider variant="dashed" />
</Stack>
Expand All @@ -79,12 +79,7 @@ export function TransactionDialog({ open, onClose, txData, txCallback, children
<Stack direction="row" justifyContent="space-between" spacing={{ xs: 2, sm: 4 }}>
<Typography>{txData.actionSubTitle || ''}</Typography>
{txData?.description && (
<Link
variant="body1"
component="button"
underline="always"
onClick={() => setShowDescription(!showDescription)}
>
<Link variant="body1" component="button" underline="always" onClick={() => setShowDescription(!showDescription)}>
{t('button:ui:transaction:description_toggle')}
</Link>
)}
Expand All @@ -108,10 +103,9 @@ export function TransactionDialog({ open, onClose, txData, txCallback, children
<Stack direction="row" justifyContent="space-between" spacing={{ xs: 2, sm: 4 }}>
<Typography variant="body2">{txData.actionSubLine || ''}</Typography>

<Typography variant="body1">{`-${formatBalanceString(
txData.deposit,
depositBalance.tokenDecimals,
)} ${depositBalance.tokenSymbol}`}</Typography>
<Typography variant="body1">{`-${formatBalanceString(txData.deposit, depositBalance.tokenDecimals)} ${
depositBalance.tokenSymbol
}`}</Typography>
</Stack>
<Divider variant="dashed" />
</Stack>
Expand Down
5 changes: 3 additions & 2 deletions apps/app/src/components/organisms/forms/baseForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ interface ComponentProps {
export function BaseForm({ title, children, error }: ComponentProps) {
return (
<Stack
component={Paper}
variant="glass"
// component={Paper}
// variant="glass"
p={{ xs: 3, sm: 6 }}
spacing={{ xs: 2, sm: 4 }}
width="100%"
Expand All @@ -22,6 +22,7 @@ export function BaseForm({ title, children, error }: ComponentProps) {
<Typography variant="h5" textAlign="center">
{title}
</Typography>

{children}

{error && (
Expand Down
14 changes: 14 additions & 0 deletions apps/app/src/components/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# haiku component lib

## atoms

components which are self contained and/or contain other low level components from mui

## molecules

simple components which contain ui interactions and use local state

## organisms

complex components which contain use cases and complex state

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export enum UnityView {
export enum CollectiveView {
DASHBOARD = 'dashboard',
CAMPAIGNS = 'campagins',
GOVERNANCE = 'governance',
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/constants/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const developmentEndpoints: Endpoints = [
const productionEndpoints: Endpoints = [
{
image: '/svg/z-ctrl-45-wht.svg',
name: 'development',
name: 'private',
url: 'https://graph.dev.gamedao.net/v1/graphql',
healthCheck: 'https://graph.dev.gamedao.net/health',
chain: 'wss://rpc.dev.gamedao.net',
Expand Down
27 changes: 25 additions & 2 deletions apps/app/src/dapps/account/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useMemo } from 'react'
import React, { useCallback, useMemo, useEffect, useState } from 'react'
import { useRouter } from 'next/router'
import { useTranslation } from 'react-i18next'
import md5 from 'md5'
Expand All @@ -10,6 +10,7 @@ import { useExtensionContext } from 'src/providers/extension/components/context'
import { useCurrentAccountState } from 'src/hooks/useCurrentAccountState'
import { useCurrentAccountAddress } from 'src/hooks/useCurrentAccountAddress'
import { useIdentityByAddress } from 'src/hooks/useIdentityByAddress'
import { useBalanceByAddress } from 'src/hooks/useBalanceByAddress'

import { getAddressFromAccountState, getNameFromAccountState, shortAccountAddress } from 'src/utils/accountUtils'
import { createInfoNotification } from 'src/utils/notification'
Expand All @@ -24,6 +25,7 @@ export function Header() {
const { t } = useTranslation()

const address = useCurrentAccountAddress()
const balances = useBalanceByAddress(address)
const { identity } = useIdentityByAddress(address)
const accountState = useCurrentAccountState()
const { user } = useAppContext()
Expand All @@ -36,8 +38,23 @@ export function Header() {
navigator.clipboard.writeText(address).then(() => createInfoNotification(t('notification:info:address_copied')))
}, [address, t])

// render balance in currency
const [fx, setFx] = useState({ zero: 0.1, game: 0.6, play: 1 })
const [displayBalance, setDisplayBalance] = useState('0.00')
const [currency, setCurrency] = useState('EUR')
useEffect(() => {
if (!balances) return
setDisplayBalance(
Math.round(
(balances[0]?.free || 0) * fx.zero +
(balances[1]?.free || 0) * fx.play +
(balances[2]?.free || 0) * fx.game,
).toFixed(2),
)
}, [balances])

return (
<Grid container justifyContent="space-between" spacing={3}>
<Grid container justifyContent="space-between" verticalAlign="middle" spacing={3}>
<Grid
item
sx={{
Expand Down Expand Up @@ -90,6 +107,12 @@ export function Header() {
*/}
</div>
</Grid>
<Grid item>
<Typography variant="h3">
{displayBalance}&nbsp;
{currency}
</Typography>
</Grid>
</Grid>
)
}
16 changes: 8 additions & 8 deletions apps/app/src/dapps/account/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export function Navigation({ param }: ComponentProps) {
label: t('button:navigation:overview'),
value: AccountTabs.OVERVIEW,
},
{
label: `Organizations`, //t('button:navigation:my_organizations'),
value: AccountTabs.ORGANIZATIONS,
},
{
label: t('button:navigation:my_campaigns'),
value: AccountTabs.CAMPAIGNS,
},
// {
// label: `Organizations`, //t('button:navigation:my_organizations'),
// value: AccountTabs.ORGANIZATIONS,
// },
// {
// label: t('button:navigation:my_campaigns'),
// value: AccountTabs.CAMPAIGNS,
// },
{
label: t('button:navigation:my_collectables'),
value: AccountTabs.COLLECTABLES,
Expand Down
27 changes: 13 additions & 14 deletions apps/app/src/dapps/account/components/Identity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,34 +82,33 @@ export function Identity() {
const closeModal = useCallback(() => {
setShowModal(false)
resetTx()
setSubmitEnabled(true)
}, [setShowModal])

const TransactionModal = (tx) => (
<TransactionDialog open={showModal} onClose={closeModal} txData={tx} txCallback={closeModal} />
)

const [submitEnabled, setSubmitEnabled] = useState(true)

const submit = useCallback((data, action: 'set' | 'clear') => {
if (tx) return
console.log('submit', data, action)
setSubmitEnabled(false)
setValues(data)
if (action === 'clear') setTx(clearIdentityTx)
else setTx(setIdentityTx)
setShowModal(true)
const send = async () => {
console.log('submit', data, action)
setSubmitEnabled(false)
setValues(data)
if (action === 'clear') setTx(clearIdentityTx)
else setTx(setIdentityTx)
setShowModal(true)
}
send()
}, [])

//

// console.log('tx', tx)
console.log('tx', tx)

return loading ? (
<Loader />
) : (
<FormProvider {...formHandler}>
{tx && <TransactionModal tx={tx} />}

{<TransactionDialog open={showModal} onClose={closeModal} txData={tx} txCallback={closeModal} />}
<form>
<Card variant={'glass'}>
<CardContent>
Expand Down Expand Up @@ -344,7 +343,7 @@ export function Identity() {
onClick={formHandler.handleSubmit((data) => submit(data, 'set'))}
color="primary"
variant={!isClearDisabled ? 'outlined' : 'contained'}
disabled={!submitEnabled}
// disabled={submitEnabled}
>
{/*{!isClearDisabled ? t('button:form:identity:update') : t('button:form:identity:submit')}*/}
{!isClearDisabled ? `Update Identity` : `Set Identity`}
Expand Down
Loading