diff --git a/package.json b/package.json index baab3437..07d1695f 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,11 @@ "@dynamic-labs/ethereum": "^1.3.1", "@dynamic-labs/ethers-v6": "^1.3.1", "@dynamic-labs/sdk-react-core": "^1.3.1", + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.5", + "@mui/icons-material": "^5.15.15", + "@mui/material": "^5.15.14", + "@mui/x-charts": "^7.1.1", "clsx": "^2.0.0", "ethers": "^6.11.1", "framer-motion": "^11.0.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index debff978..afac37a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,21 @@ dependencies: '@dynamic-labs/sdk-react-core': specifier: ^1.3.1 version: 1.3.1(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0)(viem@2.8.13) + '@emotion/react': + specifier: ^11.11.4 + version: 11.11.4(@types/react@18.2.47)(react@18.2.0) + '@emotion/styled': + specifier: ^11.11.5 + version: 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.47)(react@18.2.0) + '@mui/icons-material': + specifier: ^5.15.15 + version: 5.15.15(@mui/material@5.15.14)(@types/react@18.2.47)(react@18.2.0) + '@mui/material': + specifier: ^5.15.14 + version: 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) + '@mui/x-charts': + specifier: ^7.1.1 + version: 7.1.1(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.14)(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) clsx: specifier: ^2.0.0 version: 2.1.0 @@ -1402,6 +1417,12 @@ packages: regenerator-runtime: 0.14.1 dev: false + /@babel/runtime@7.24.4: + resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} @@ -1911,6 +1932,122 @@ packages: dev: false optional: true + /@emotion/babel-plugin@11.11.0: + resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} + dependencies: + '@babel/helper-module-imports': 7.22.5 + '@babel/runtime': 7.24.4 + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/serialize': 1.1.4 + babel-plugin-macros: 3.1.0 + convert-source-map: 1.9.0 + escape-string-regexp: 4.0.0 + find-root: 1.1.0 + source-map: 0.5.7 + stylis: 4.2.0 + dev: false + + /@emotion/cache@11.11.0: + resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} + dependencies: + '@emotion/memoize': 0.8.1 + '@emotion/sheet': 1.2.2 + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + stylis: 4.2.0 + dev: false + + /@emotion/hash@0.9.1: + resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} + dev: false + + /@emotion/is-prop-valid@1.2.2: + resolution: {integrity: sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==} + dependencies: + '@emotion/memoize': 0.8.1 + dev: false + + /@emotion/memoize@0.8.1: + resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} + dev: false + + /@emotion/react@11.11.4(@types/react@18.2.47)(react@18.2.0): + resolution: {integrity: sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==} + peerDependencies: + '@types/react': '*' + react: '>=16.8.0' + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.7 + '@emotion/babel-plugin': 11.11.0 + '@emotion/cache': 11.11.0 + '@emotion/serialize': 1.1.4 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + '@types/react': 18.2.47 + hoist-non-react-statics: 3.3.2 + react: 18.2.0 + dev: false + + /@emotion/serialize@1.1.4: + resolution: {integrity: sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==} + dependencies: + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/unitless': 0.8.1 + '@emotion/utils': 1.2.1 + csstype: 3.1.2 + dev: false + + /@emotion/sheet@1.2.2: + resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} + dev: false + + /@emotion/styled@11.11.5(@emotion/react@11.11.4)(@types/react@18.2.47)(react@18.2.0): + resolution: {integrity: sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==} + peerDependencies: + '@emotion/react': ^11.0.0-rc.0 + '@types/react': '*' + react: '>=16.8.0' + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.7 + '@emotion/babel-plugin': 11.11.0 + '@emotion/is-prop-valid': 1.2.2 + '@emotion/react': 11.11.4(@types/react@18.2.47)(react@18.2.0) + '@emotion/serialize': 1.1.4 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) + '@emotion/utils': 1.2.1 + '@types/react': 18.2.47 + react: 18.2.0 + dev: false + + /@emotion/unitless@0.8.1: + resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} + dev: false + + /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.2.0): + resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 18.2.0 + dev: false + + /@emotion/utils@1.2.1: + resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} + dev: false + + /@emotion/weak-memoize@0.3.1: + resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} + dev: false + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1985,13 +2122,41 @@ packages: micro-ftch: 0.3.1 dev: false + /@floating-ui/core@1.6.0: + resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==} + dependencies: + '@floating-ui/utils': 0.2.1 + dev: false + + /@floating-ui/dom@1.6.3: + resolution: {integrity: sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==} + dependencies: + '@floating-ui/core': 1.6.0 + '@floating-ui/utils': 0.2.1 + dev: false + + /@floating-ui/react-dom@2.0.8(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@floating-ui/dom': 1.6.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@floating-ui/utils@0.2.1: + resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} + dev: false + /@hcaptcha/react-hcaptcha@1.4.4(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Aen217LDnf5ywbPSwBG5CsoqBLIHIAS9lhj3zQjXJuO13doQ6/ubkCWNuY8jmwYLefoFt3V3MrZmCdKDaFoTuQ==} peerDependencies: react: '>= 16.3.0' react-dom: '>= 16.3.0' dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -2577,6 +2742,221 @@ packages: - supports-color dev: false + /@mui/base@5.0.0-beta.40(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@floating-ui/react-dom': 2.0.8(react-dom@18.2.0)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.47) + '@mui/utils': 5.15.14(@types/react@18.2.47)(react@18.2.0) + '@popperjs/core': 2.11.8 + '@types/react': 18.2.47 + clsx: 2.1.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@mui/core-downloads-tracker@5.15.14: + resolution: {integrity: sha512-on75VMd0XqZfaQW+9pGjSNiqW+ghc5E2ZSLRBXwcXl/C4YzjfyjrLPhrEpKnR9Uym9KXBvxrhoHfPcczYHweyA==} + dev: false + + /@mui/icons-material@5.15.15(@mui/material@5.15.14)(@types/react@18.2.47)(react@18.2.0): + resolution: {integrity: sha512-kkeU/pe+hABcYDH6Uqy8RmIsr2S/y5bP2rp+Gat4CcRjCcVne6KudS1NrZQhUCRysrTDCAhcbcf9gt+/+pGO2g==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@mui/material': ^5.0.0 + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@mui/material': 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.47 + react: 18.2.0 + dev: false + + /@mui/material@5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-kEbRw6fASdQ1SQ7LVdWR5OlWV3y7Y54ZxkLzd6LV5tmz+NpO3MJKZXSfgR0LHMP7meKsPiMm4AuzV0pXDpk/BQ==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@emotion/react': ^11.5.0 + '@emotion/styled': ^11.3.0 + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@emotion/react': 11.11.4(@types/react@18.2.47)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.47)(react@18.2.0) + '@mui/base': 5.0.0-beta.40(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) + '@mui/core-downloads-tracker': 5.15.14 + '@mui/system': 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.47) + '@mui/utils': 5.15.14(@types/react@18.2.47)(react@18.2.0) + '@types/react': 18.2.47 + '@types/react-transition-group': 4.4.10 + clsx: 2.1.0 + csstype: 3.1.3 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-is: 18.2.0 + react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) + dev: false + + /@mui/private-theming@5.15.14(@types/react@18.2.47)(react@18.2.0): + resolution: {integrity: sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@mui/utils': 5.15.14(@types/react@18.2.47)(react@18.2.0) + '@types/react': 18.2.47 + prop-types: 15.8.1 + react: 18.2.0 + dev: false + + /@mui/styled-engine@5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(react@18.2.0): + resolution: {integrity: sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@emotion/react': ^11.4.1 + '@emotion/styled': ^11.3.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@emotion/cache': 11.11.0 + '@emotion/react': 11.11.4(@types/react@18.2.47)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.47)(react@18.2.0) + csstype: 3.1.3 + prop-types: 15.8.1 + react: 18.2.0 + dev: false + + /@mui/system@5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react@18.2.0): + resolution: {integrity: sha512-auXLXzUaCSSOLqJXmsAaq7P96VPRXg2Rrz6OHNV7lr+kB8lobUF+/N84Vd9C4G/wvCXYPs5TYuuGBRhcGbiBGg==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@emotion/react': ^11.5.0 + '@emotion/styled': ^11.3.0 + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@emotion/react': 11.11.4(@types/react@18.2.47)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.47)(react@18.2.0) + '@mui/private-theming': 5.15.14(@types/react@18.2.47)(react@18.2.0) + '@mui/styled-engine': 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.47) + '@mui/utils': 5.15.14(@types/react@18.2.47)(react@18.2.0) + '@types/react': 18.2.47 + clsx: 2.1.0 + csstype: 3.1.3 + prop-types: 15.8.1 + react: 18.2.0 + dev: false + + /@mui/types@7.2.14(@types/react@18.2.47): + resolution: {integrity: sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.47 + dev: false + + /@mui/utils@5.15.14(@types/react@18.2.47)(react@18.2.0): + resolution: {integrity: sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@types/prop-types': 15.7.12 + '@types/react': 18.2.47 + prop-types: 15.8.1 + react: 18.2.0 + react-is: 18.2.0 + dev: false + + /@mui/x-charts@7.1.1(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.14)(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-7YFrJwnJ2wygnKAZS8F2r4Nj0ei9hX95OAOFd6AI4j7y21j+6kjU6qzNdaJvO+pESdxc3EYTCpS+KzrrOiqPEw==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@emotion/react': ^11.9.0 + '@emotion/styled': ^11.8.1 + '@mui/material': ^5.15.14 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + dependencies: + '@babel/runtime': 7.24.4 + '@emotion/react': 11.11.4(@types/react@18.2.47)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.47)(react@18.2.0) + '@mui/base': 5.0.0-beta.40(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) + '@mui/material': 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) + '@mui/system': 5.15.14(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.47)(react@18.2.0) + '@mui/utils': 5.15.14(@types/react@18.2.47)(react@18.2.0) + '@react-spring/rafz': 9.7.3 + '@react-spring/web': 9.7.3(react-dom@18.2.0)(react@18.2.0) + clsx: 2.1.0 + d3-color: 3.1.0 + d3-delaunay: 6.0.4 + d3-interpolate: 3.0.1 + d3-scale: 4.0.2 + d3-shape: 3.2.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + dev: false + /@next/env@14.0.4: resolution: {integrity: sha512-irQnbMLbUNQpP1wcE5NstJtbuA/69kRfzBrpAD7Gsn8zm/CY6YQYc3HQBz8QPxwISG26tIm5afvvVbu508oBeQ==} @@ -2883,6 +3263,62 @@ packages: tslib: 2.6.0 dev: true + /@popperjs/core@2.11.8: + resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + dev: false + + /@react-spring/animated@9.7.3(react@18.2.0): + resolution: {integrity: sha512-5CWeNJt9pNgyvuSzQH+uy2pvTg8Y4/OisoscZIR8/ZNLIOI+CatFBhGZpDGTF/OzdNFsAoGk3wiUYTwoJ0YIvw==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + '@react-spring/shared': 9.7.3(react@18.2.0) + '@react-spring/types': 9.7.3 + react: 18.2.0 + dev: false + + /@react-spring/core@9.7.3(react@18.2.0): + resolution: {integrity: sha512-IqFdPVf3ZOC1Cx7+M0cXf4odNLxDC+n7IN3MDcVCTIOSBfqEcBebSv+vlY5AhM0zw05PDbjKrNmBpzv/AqpjnQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + '@react-spring/animated': 9.7.3(react@18.2.0) + '@react-spring/shared': 9.7.3(react@18.2.0) + '@react-spring/types': 9.7.3 + react: 18.2.0 + dev: false + + /@react-spring/rafz@9.7.3: + resolution: {integrity: sha512-9vzW1zJPcC4nS3aCV+GgcsK/WLaB520Iyvm55ARHfM5AuyBqycjvh1wbmWmgCyJuX4VPoWigzemq1CaaeRSHhQ==} + dev: false + + /@react-spring/shared@9.7.3(react@18.2.0): + resolution: {integrity: sha512-NEopD+9S5xYyQ0pGtioacLhL2luflh6HACSSDUZOwLHoxA5eku1UPuqcJqjwSD6luKjjLfiLOspxo43FUHKKSA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + '@react-spring/types': 9.7.3 + react: 18.2.0 + dev: false + + /@react-spring/types@9.7.3: + resolution: {integrity: sha512-Kpx/fQ/ZFX31OtlqVEFfgaD1ACzul4NksrvIgYfIFq9JpDHFwQkMVZ10tbo0FU/grje4rcL4EIrjekl3kYwgWw==} + dev: false + + /@react-spring/web@9.7.3(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-BXt6BpS9aJL/QdVqEIX9YoUy8CE6TJrU0mNCqSoxdXlIeNcEBWOfIyE6B14ENNsyQKS3wOWkiJfco0tCr/9tUg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + '@react-spring/animated': 9.7.3(react@18.2.0) + '@react-spring/core': 9.7.3(react@18.2.0) + '@react-spring/shared': 9.7.3(react@18.2.0) + '@react-spring/types': 9.7.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@rushstack/eslint-patch@1.6.1: resolution: {integrity: sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==} dev: true @@ -2955,7 +3391,7 @@ packages: resolution: {integrity: sha512-AnaqCF1cJ3w7d0yhvLGAKAcRI+n5o+ursQihhoTe4cUh8/9d4gbT73SoHYElS7e67OtAgLmSfbcC5hcOAgdvnQ==} engines: {node: '>=12.20.0'} dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 '@noble/ed25519': 1.7.3 '@noble/hashes': 1.4.0 '@noble/secp256k1': 1.7.1 @@ -2979,7 +3415,7 @@ packages: /@solana/web3.js@1.91.1: resolution: {integrity: sha512-cPgjZXm688oM9cULvJ8u2VH6Qp5rvptE1N1VODVxn2mAbpZsWrvWNPjmASkMYT/HzyrtqFkPvFdSHg8Xjt7aQA==} dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@solana/buffer-layout': 4.0.1 @@ -3548,12 +3984,15 @@ packages: /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} - dev: true /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: true + /@types/prop-types@15.7.12: + resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + dev: false + /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} @@ -3563,6 +4002,12 @@ packages: '@types/react': 18.2.47 dev: true + /@types/react-transition-group@4.4.10: + resolution: {integrity: sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==} + dependencies: + '@types/react': 18.2.47 + dev: false + /@types/react@18.2.47: resolution: {integrity: sha512-xquNkkOirwyCgoClNk85BjP+aqnIS+ckAJ8i37gAbDs14jfW/J23f2GItAf33oiUPQnqNMALiFeoM9Y5mbjpVQ==} dependencies: @@ -4635,6 +5080,15 @@ packages: '@types/babel__traverse': 7.20.1 dev: true + /babel-plugin-macros@3.1.0: + resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} + engines: {node: '>=10', npm: '>=6'} + dependencies: + '@babel/runtime': 7.24.4 + cosmiconfig: 7.1.0 + resolve: 1.22.8 + dev: false + /babel-plugin-polyfill-corejs2@0.4.4(@babel/core@7.22.9): resolution: {integrity: sha512-9WeK9snM1BfxB38goUEv2FLnA6ja07UMfazFHzCXUb3NyDZAwfXvQiURQ6guTTMeHcOsdknULm1PDhs4uWtKyA==} peerDependencies: @@ -4885,7 +5339,6 @@ packages: /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - dev: true /camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} @@ -5236,7 +5689,6 @@ packages: parse-json: 5.2.0 path-type: 4.0.0 yaml: 1.10.2 - dev: true /cosmiconfig@8.2.0: resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} @@ -5361,6 +5813,78 @@ packages: /csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + dev: false + + /d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + dependencies: + internmap: 2.0.3 + dev: false + + /d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + dev: false + + /d3-delaunay@6.0.4: + resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} + engines: {node: '>=12'} + dependencies: + delaunator: 5.0.1 + dev: false + + /d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + dev: false + + /d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + dependencies: + d3-color: 3.1.0 + dev: false + + /d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + dev: false + + /d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + dev: false + + /d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + dependencies: + d3-path: 3.1.0 + dev: false + + /d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + dependencies: + d3-time: 3.1.0 + dev: false + + /d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.2.4 + dev: false + /damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true @@ -5517,6 +6041,12 @@ packages: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} dev: false + /delaunator@5.0.1: + resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} + dependencies: + robust-predicates: 3.0.2 + dev: false + /delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} @@ -5616,6 +6146,13 @@ packages: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} dev: true + /dom-helpers@5.2.1: + resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} + dependencies: + '@babel/runtime': 7.24.4 + csstype: 3.1.3 + dev: false + /dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} dependencies: @@ -5742,7 +6279,6 @@ packages: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 - dev: true /es-abstract@1.22.1: resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} @@ -5872,7 +6408,6 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: true /escodegen@2.1.0: resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} @@ -6065,7 +6600,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.24.4 aria-query: 5.3.0 array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 @@ -6492,6 +7027,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /find-root@1.1.0: + resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + dev: false + /find-up@3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} @@ -6620,7 +7159,6 @@ packages: /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: true /function.prototype.name@1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} @@ -6879,7 +7417,6 @@ packages: engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 - dev: true /hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -6971,7 +7508,7 @@ packages: /i18next@23.10.1: resolution: {integrity: sha512-NDiIzFbcs3O9PXpfhkjyf7WdqFn5Vq6mhzhtkXzj51aOcNuPNcTwuYNuXCpHsanZGHlHKL35G7huoFeVic1hng==} dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 dev: false /iconv-lite@0.4.24: @@ -7000,7 +7537,6 @@ packages: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - dev: true /import-local@3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} @@ -7044,6 +7580,11 @@ packages: side-channel: 1.0.4 dev: true + /internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + dev: false + /iron-webcrypto@1.1.0: resolution: {integrity: sha512-5vgYsCakNlaQub1orZK5QmNYhwYtcllTkZBp5sfIaCqY93Cf6l+v2rtE+E4TMbcfjxDMCdrO8wmp7+ZvhDECLA==} dev: false @@ -7065,7 +7606,6 @@ packages: /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true /is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} @@ -7112,7 +7652,6 @@ packages: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: hasown: 2.0.0 - dev: true /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -8054,7 +8593,6 @@ packages: /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true /json-rpc-engine@6.1.0: resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} @@ -8177,7 +8715,6 @@ packages: /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true /lint-staged@12.5.0: resolution: {integrity: sha512-BKLUjWDsKquV/JuIcoQW4MSAI3ggwEImF1+sB4zaKvyVx1wBk3FsG7UK9bpnmBTN1pm7EH2BBcMwINJzCRv12g==} @@ -8650,7 +9187,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 + resolve: 1.22.8 semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: true @@ -8903,7 +9440,6 @@ packages: engines: {node: '>=6'} dependencies: callsites: 3.1.0 - dev: true /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} @@ -8913,7 +9449,6 @@ packages: error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - dev: true /parse5@6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} @@ -8943,12 +9478,10 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - dev: true /pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -9273,7 +9806,7 @@ packages: peerDependencies: react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 react: 18.2.0 dev: false @@ -9311,7 +9844,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 '@types/react': 18.2.47 focus-lock: 0.11.6 prop-types: 15.8.1 @@ -9334,7 +9867,7 @@ packages: react-native: optional: true dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 html-parse-stringify: 3.0.1 i18next: 23.10.1 react: 18.2.0 @@ -9358,7 +9891,20 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true + + /react-transition-group@4.4.5(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} + peerDependencies: + react: '>=16.6.0' + react-dom: '>=16.6.0' + dependencies: + '@babel/runtime': 7.24.4 + dom-helpers: 5.2.1 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false /react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} @@ -9447,12 +9993,11 @@ packages: /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - dev: false /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.24.4 dev: true /regexp.prototype.flags@1.5.0: @@ -9505,7 +10050,6 @@ packages: /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - dev: true /resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} @@ -9544,7 +10088,6 @@ packages: is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true /resolve@2.0.0-next.4: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} @@ -9579,10 +10122,14 @@ packages: glob: 7.2.3 dev: true + /robust-predicates@3.0.2: + resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} + dev: false + /rpc-websockets@7.9.0: resolution: {integrity: sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==} dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 eventemitter3: 4.0.7 uuid: 8.3.2 ws: 8.16.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -9842,6 +10389,11 @@ packages: source-map: 0.6.1 dev: true + /source-map@0.5.7: + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} + engines: {node: '>=0.10.0'} + dev: false + /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -10095,6 +10647,10 @@ packages: client-only: 0.0.1 react: 18.2.0 + /stylis@4.2.0: + resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} + dev: false + /sucrase@3.33.0: resolution: {integrity: sha512-ARGC7vbufOHfpvyGcZZXFaXCMZ9A4fffOGC5ucOW7+WHDGlAe8LJdf3Jts1sWhDeiI1RSWrKy5Hodl+JWGdW2A==} engines: {node: '>=8'} @@ -10153,7 +10709,6 @@ packages: /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - dev: true /svg-parser@2.0.4: resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} @@ -11077,7 +11632,6 @@ packages: /yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - dev: true /yaml@2.3.1: resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} @@ -11181,7 +11735,7 @@ packages: resolution: {integrity: sha512-Z2Fe1bn+eLstG8DRR6FTavGD+MeAwyfmouhHsIUgaADz8jvFKbO/fXc2trJKZg+5EBjh4gGm3iU/t3onKlXHIg==} engines: {node: '>=10'} dependencies: - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.24.4 '@types/lodash': 4.17.0 lodash: 4.17.21 lodash-es: 4.17.21 diff --git a/src/app/context/abi.ts b/src/app/context/abi.ts index edb680ee..e839df3e 100644 --- a/src/app/context/abi.ts +++ b/src/app/context/abi.ts @@ -1,1208 +1,1290 @@ export const abi = [ { - "inputs": [ - { - "internalType": "address", - "name": "_poidhV2Nft", - "type": "address" - }, - { - "internalType": "address", - "name": "_treasury", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" + "inputs":[ + { + "internalType":"address", + "name":"_poidhV2Nft", + "type":"address" + }, + { + "internalType":"address", + "name":"_treasury", + "type":"address" + } + ], + "stateMutability":"nonpayable", + "type":"constructor" }, { - "inputs": [], - "name": "BountyAmountTooHigh", - "type": "error" + "inputs":[ + + ], + "name":"BountyAmountTooHigh", + "type":"error" }, { - "inputs": [], - "name": "BountyClaimed", - "type": "error" + "inputs":[ + + ], + "name":"BountyClaimed", + "type":"error" }, { - "inputs": [], - "name": "BountyClosed", - "type": "error" + "inputs":[ + + ], + "name":"BountyClosed", + "type":"error" }, { - "inputs": [], - "name": "BountyNotFound", - "type": "error" + "inputs":[ + + ], + "name":"BountyNotFound", + "type":"error" }, { - "inputs": [], - "name": "ClaimNotFound", - "type": "error" + "inputs":[ + + ], + "name":"ClaimNotFound", + "type":"error" }, { - "inputs": [], - "name": "IssuerCannotClaim", - "type": "error" + "inputs":[ + + ], + "name":"IssuerCannotClaim", + "type":"error" }, { - "inputs": [], - "name": "IssuerCannotWithdraw", - "type": "error" + "inputs":[ + + ], + "name":"IssuerCannotWithdraw", + "type":"error" }, { - "inputs": [], - "name": "NoEther", - "type": "error" + "inputs":[ + + ], + "name":"NoEther", + "type":"error" }, { - "inputs": [], - "name": "NoVotingPeriodSet", - "type": "error" + "inputs":[ + + ], + "name":"NoVotingPeriodSet", + "type":"error" }, { - "inputs": [], - "name": "NotActiveParticipant", - "type": "error" + "inputs":[ + + ], + "name":"NotActiveParticipant", + "type":"error" }, { - "inputs": [], - "name": "NotOpenBounty", - "type": "error" + "inputs":[ + + ], + "name":"NotOpenBounty", + "type":"error" }, { - "inputs": [], - "name": "NotSoloBounty", - "type": "error" + "inputs":[ + + ], + "name":"NotSoloBounty", + "type":"error" }, { - "inputs": [], - "name": "VotingOngoing", - "type": "error" + "inputs":[ + + ], + "name":"VotingOngoing", + "type":"error" }, { - "inputs": [], - "name": "WrongCaller", - "type": "error" + "inputs":[ + + ], + "name":"WrongCaller", + "type":"error" }, { - "inputs": [], - "name": "transferFailed", - "type": "error" + "inputs":[ + + ], + "name":"transferFailed", + "type":"error" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "issuer", - "type": "address" - } - ], - "name": "BountyCancelled", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"issuer", + "type":"address" + } + ], + "name":"BountyCancelled", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - } - ], - "name": "BountyCreated", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "indexed":false, + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "indexed":false, + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"amount", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + } + ], + "name":"BountyCreated", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "BountyJoined", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"participant", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"BountyJoined", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "claimIssuer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "bountyIssuer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "ClaimAccepted", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"claimIssuer", + "type":"address" + }, + { + "indexed":false, + "internalType":"address", + "name":"bountyIssuer", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"fee", + "type":"uint256" + } + ], + "name":"ClaimAccepted", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "bountyIssuer", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - } - ], - "name": "ClaimCreated", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"bountyIssuer", + "type":"address" + }, + { + "indexed":false, + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "indexed":false, + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + } + ], + "name":"ClaimCreated", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "name": "ClaimSubmittedForVote", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "name":"ClaimSubmittedForVote", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "ResetVotingPeriod", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"ResetVotingPeriod", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "name": "VoteClaim", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"address", + "name":"voter", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "name":"VoteClaim", + "type":"event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "WithdrawFromOpenBounty", - "type": "event" + "anonymous":false, + "inputs":[ + { + "indexed":false, + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "indexed":false, + "internalType":"address", + "name":"participant", + "type":"address" + }, + { + "indexed":false, + "internalType":"uint256", + "name":"amount", + "type":"uint256" + } + ], + "name":"WithdrawFromOpenBounty", + "type":"event" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "name": "acceptClaim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "name":"acceptClaim", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "bounties", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"bounties", + "outputs":[ + { + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + }, + { + "internalType":"address", + "name":"claimer", + "type":"address" + }, + { + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "bountyClaims", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"bountyClaims", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [], - "name": "bountyCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + + ], + "name":"bountyCounter", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "bountyCurrentVotingClaim", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"bountyCurrentVotingClaim", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "bountyVotingTracker", - "outputs": [ - { - "internalType": "uint256", - "name": "yes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "no", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"bountyVotingTracker", + "outputs":[ + { + "internalType":"uint256", + "name":"yes", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"no", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"deadline", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "cancelOpenBounty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"cancelOpenBounty", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "cancelSoloBounty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"cancelSoloBounty", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [], - "name": "claimCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + + ], + "name":"claimCounter", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "claims", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bountyIssuer", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "accepted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"claims", + "outputs":[ + { + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"address", + "name":"bountyIssuer", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + }, + { + "internalType":"bool", + "name":"accepted", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "uri", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "createClaim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"uri", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + } + ], + "name":"createClaim", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "createOpenBounty", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "inputs":[ + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + } + ], + "name":"createOpenBounty", + "outputs":[ + + ], + "stateMutability":"payable", + "type":"function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "createSoloBounty", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "inputs":[ + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + } + ], + "name":"createSoloBounty", + "outputs":[ + + ], + "stateMutability":"payable", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "offset", - "type": "uint256" - } - ], - "name": "getBounties", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "internalType": "struct PoidhV2.Bounty[10]", - "name": "result", - "type": "tuple[10]" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"offset", + "type":"uint256" + } + ], + "name":"getBounties", + "outputs":[ + { + "components":[ + { + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + }, + { + "internalType":"address", + "name":"claimer", + "type":"address" + }, + { + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "internalType":"struct PoidhV2.Bounty[10]", + "name":"result", + "type":"tuple[10]" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "offset", - "type": "uint256" - } - ], - "name": "getBountiesByUser", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "internalType": "struct PoidhV2.Bounty[10]", - "name": "result", - "type": "tuple[10]" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"address", + "name":"user", + "type":"address" + }, + { + "internalType":"uint256", + "name":"offset", + "type":"uint256" + } + ], + "name":"getBountiesByUser", + "outputs":[ + { + "components":[ + { + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "internalType":"uint256", + "name":"amount", + "type":"uint256" + }, + { + "internalType":"address", + "name":"claimer", + "type":"address" + }, + { + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "internalType":"struct PoidhV2.Bounty[10]", + "name":"result", + "type":"tuple[10]" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [], - "name": "getBountiesLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + + ], + "name":"getBountiesLength", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "getClaimsByBountyId", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bountyIssuer", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "accepted", - "type": "bool" - } - ], - "internalType": "struct PoidhV2.Claim[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"getClaimsByBountyId", + "outputs":[ + { + "components":[ + { + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"address", + "name":"bountyIssuer", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + }, + { + "internalType":"bool", + "name":"accepted", + "type":"bool" + } + ], + "internalType":"struct PoidhV2.Claim[]", + "name":"", + "type":"tuple[]" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getClaimsByUser", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bountyIssuer", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "accepted", - "type": "bool" - } - ], - "internalType": "struct PoidhV2.Claim[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"address", + "name":"user", + "type":"address" + } + ], + "name":"getClaimsByUser", + "outputs":[ + { + "components":[ + { + "internalType":"uint256", + "name":"id", + "type":"uint256" + }, + { + "internalType":"address", + "name":"issuer", + "type":"address" + }, + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"address", + "name":"bountyIssuer", + "type":"address" + }, + { + "internalType":"string", + "name":"name", + "type":"string" + }, + { + "internalType":"string", + "name":"description", + "type":"string" + }, + { + "internalType":"uint256", + "name":"createdAt", + "type":"uint256" + }, + { + "internalType":"bool", + "name":"accepted", + "type":"bool" + } + ], + "internalType":"struct PoidhV2.Claim[]", + "name":"", + "type":"tuple[]" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "getParticipants", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"getParticipants", + "outputs":[ + { + "internalType":"address[]", + "name":"", + "type":"address[]" + }, + { + "internalType":"uint256[]", + "name":"", + "type":"uint256[]" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "joinOpenBounty", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"joinOpenBounty", + "outputs":[ + + ], + "stateMutability":"payable", + "type":"function" }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "pure", - "type": "function" + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + }, + { + "internalType":"address", + "name":"", + "type":"address" + }, + { + "internalType":"uint256", + "name":"", + "type":"uint256" + }, + { + "internalType":"bytes", + "name":"", + "type":"bytes" + } + ], + "name":"onERC721Received", + "outputs":[ + { + "internalType":"bytes4", + "name":"", + "type":"bytes4" + } + ], + "stateMutability":"pure", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "participantAmounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"participantAmounts", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "participants", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"participants", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [], - "name": "poidhV2Nft", - "outputs": [ - { - "internalType": "contract IPoidhV2Nft", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + + ], + "name":"poidhV2Nft", + "outputs":[ + { + "internalType":"contract IPoidhV2Nft", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [], - "name": "poidhV2NftSet", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + + ], + "name":"poidhV2NftSet", + "outputs":[ + { + "internalType":"bool", + "name":"", + "type":"bool" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "resetVotingPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"resetVotingPeriod", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "claimId", - "type": "uint256" - } - ], - "name": "submitClaimForVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"resolveVote", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [], - "name": "treasury", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"uint256", + "name":"claimId", + "type":"uint256" + } + ], + "name":"submitClaimForVote", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "userBounties", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + + ], + "name":"treasury", + "outputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "userClaims", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + }, + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"userBounties", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "vote", - "type": "bool" - } - ], - "name": "voteClaim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + { + "internalType":"address", + "name":"", + "type":"address" + }, + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "name":"userClaims", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" }, { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + }, + { + "internalType":"bool", + "name":"vote", + "type":"bool" + } + ], + "name":"voteClaim", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "bountyId", - "type": "uint256" - } - ], - "name": "withdrawFromOpenBounty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs":[ + + ], + "name":"votingPeriod", + "outputs":[ + { + "internalType":"uint256", + "name":"", + "type":"uint256" + } + ], + "stateMutability":"view", + "type":"function" + }, + { + "inputs":[ + { + "internalType":"uint256", + "name":"bountyId", + "type":"uint256" + } + ], + "name":"withdrawFromOpenBounty", + "outputs":[ + + ], + "stateMutability":"nonpayable", + "type":"function" } ] + export default abi; diff --git a/src/app/context/config.ts b/src/app/context/config.ts index 688ceaa5..a0ed67bf 100644 --- a/src/app/context/config.ts +++ b/src/app/context/config.ts @@ -5,8 +5,8 @@ const chains = { name: "Sepolia Base Testnet", jsonProviderUrl: "https://sepolia.base.org", contracts: { - mainContract: "0xfD03996152044584C5C2a5a6D74520Bf87EED288", - nftContract: "0x2C240652a88533b905711c3fa6CF90531619713f", + mainContract: "0x6981e82d270BD01D026D0E3E10Ba486337c91923", + nftContract: "0xd29F55255C784d777Aa7A09063E7D18377446fe2", }, }, }; diff --git a/src/app/context/web3.tsx b/src/app/context/web3.tsx index 13bf2fb8..55442dd2 100644 --- a/src/app/context/web3.tsx +++ b/src/app/context/web3.tsx @@ -3,7 +3,7 @@ import { Contract, ethers } from "ethers"; import abi from './abi'; import abiNFT from './abiNFT' import chains from './config'; -import { CreateBountyFunction,withdrawFromOpenBountyFunction ,SubmitClaimForVoteFunction, GetParticipants, CreateClaimFunction, AcceptClaimFunction, CancelBountyFunction, FetchBountiesFunction, FetchBountyByIdFunction, GetBountiesByUserFunction, Bounty , GetClaimsByUserFunction, GetClaimsByBountyIdFunction, GetURIFunction, Claim, GetAllBountiesFunction, JoinOpenBountyFunction, BountyCurrentVotingClaimFunction, BountyVotingTrackerFunction, VoteClaimFunction } from '../../types/web3'; +import { CreateBountyFunction,withdrawFromOpenBountyFunction ,SubmitClaimForVoteFunction, GetParticipants, CreateClaimFunction, AcceptClaimFunction, CancelBountyFunction, FetchBountiesFunction, FetchBountyByIdFunction, GetBountiesByUserFunction, Bounty , GetClaimsByUserFunction, GetClaimsByBountyIdFunction, GetURIFunction, Claim, GetAllBountiesFunction, JoinOpenBountyFunction, BountyCurrentVotingClaimFunction, BountyVotingTrackerFunction, VoteClaimFunction, ResolveVoteFunction } from '../../types/web3'; import { MotionValue } from "framer-motion"; @@ -175,7 +175,18 @@ export const voteClaim: VoteClaimFunction = async ( } }; - +export const resolveVote: ResolveVoteFunction = async ( + primaryWallet, bountyId, +) => { + try { + const signer = await getSigner(primaryWallet); + const contract = await getContract(signer); + const transaction = await contract.resolveVote(bountyId); + await transaction.wait(); + } catch (error) { + console.error('Error voting:', error); + } +}; diff --git a/src/components/bounty/BountyInfo.tsx b/src/components/bounty/BountyInfo.tsx index 58be6928..4a026cbf 100644 --- a/src/components/bounty/BountyInfo.tsx +++ b/src/components/bounty/BountyInfo.tsx @@ -5,6 +5,7 @@ import CreateProof from '@/components/ui/CreateProof'; import JoinBounty from '@/components/ui/JoinBounty'; import {OpenBounty, Bounty} from '../../types/web3'; import BountyMultiplayer from '@/components/bounty/BountyMultiplayer'; +import { useBountyContext } from '@/components/bounty/BountyProvider'; @@ -14,32 +15,15 @@ function weiToEther(weiValue: string | number): string { } const BountyInfo = ({ bountyId }: { bountyId: string }) => { - const [bountyData, setBountyData] = useState(null); - const [youOwner, setYouOwner] = useState(null); - const [bountyClaimed, setBountyClaimed] = useState(null); - const [ openBounty, setOpenBounty] = useState (null) - const { user } = useDynamicContext(); - const currentUser = user?.verifiedCredentials[0].address; + const { isMultiplayer, isOwner, bountyData, isBountyClaimed} = useBountyContext()!; + + + console.log("Is multiplayer:", isMultiplayer) + console.log("Is Owner:", isOwner) + console.log("Is Claimed:", isBountyClaimed) - useEffect(() => { - setYouOwner(null); - if (bountyId) { - getParticipants(bountyId) - .then((openBounty: OpenBounty) => { - setOpenBounty(openBounty.addresses.length === 0 ? false : true); - }) - .catch(console.error); - fetchBountyById(bountyId) - .then(data => { - setBountyData(data); - setYouOwner(currentUser === data.issuer) - setBountyClaimed(data.claimer === "0x0000000000000000000000000000000000000000") - }) - .catch(console.error); - } - }, [ bountyId]); @@ -57,8 +41,8 @@ const BountyInfo = ({ bountyId }: { bountyId: string }) => { {bountyData ? weiToEther(bountyData.amount) : "Loading..."} eth -
{openBounty? "this is multiplayer" : "no this is solo"}
-
{bountyClaimed && !youOwner ? : ""}
+
{isMultiplayer? "this is multiplayer" : "no this is solo"}
+
{!isBountyClaimed && !isOwner ? : ""}
@@ -67,7 +51,7 @@ const BountyInfo = ({ bountyId }: { bountyId: string }) => { - {openBounty ? + {isMultiplayer ?
diff --git a/src/components/bounty/BountyProofs.tsx b/src/components/bounty/BountyProofs.tsx index 48dc70a6..c7e5ee62 100644 --- a/src/components/bounty/BountyProofs.tsx +++ b/src/components/bounty/BountyProofs.tsx @@ -4,26 +4,26 @@ import { bountyCurrentVotingClaim, getClaimsByBountyId, getParticipants} from ' import NoProof from '@/components/bounty/NoProof'; import { OpenBounty, Claim } from '@/types/web3'; import Voting from '@/components/bounty/Voting'; +import { useBountyContext } from '@/components/bounty/BountyProvider'; const BountyProofs = ({ bountyId }: { bountyId: string }) => { const [claimsData, setClaimsData] = useState(null); - const [youOwner, setYouOwner] = useState(null); const [currentVotingClaim, setCurrentVotingClaim] = useState(null); + const { isMultiplayer, isOwner, bountyData, isBountyClaimed} = useBountyContext()!; - const [ openBounty, setOpenBounty] = useState (null) useEffect(() => { - setYouOwner(null); + // setYouOwner(null); if (bountyId) { - getParticipants(bountyId) - .then((openBounty) => { - setOpenBounty(openBounty.addresses.length === 0 ? false : true); - }) - .catch(console.error); + // getParticipants(bountyId) + // .then((openBounty) => { + // setOpenBounty(openBounty.addresses.length === 0 ? false : true); + // }) + // .catch(console.error); getClaimsByBountyId(bountyId) .then(data => setClaimsData(data)) .catch(console.error); @@ -36,6 +36,8 @@ const BountyProofs = ({ bountyId }: { bountyId: string }) => { }, [bountyId]); + console.log("current voting claim:", currentVotingClaim) + return (
@@ -45,7 +47,7 @@ const BountyProofs = ({ bountyId }: { bountyId: string }) => { proofs
{claimsData && claimsData.length > 0 ? - + : }
diff --git a/src/components/bounty/BountyProvider.tsx b/src/components/bounty/BountyProvider.tsx new file mode 100644 index 00000000..3c687150 --- /dev/null +++ b/src/components/bounty/BountyProvider.tsx @@ -0,0 +1,48 @@ +import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; +import { useDynamicContext } from '@dynamic-labs/sdk-react-core'; +import { fetchBountyById, getParticipants } from '@/app/context/web3'; +import { Bounty } from '@/types/web3'; + + +interface BountyContextType { + bountyData: Bounty | null; + isOwner: boolean; + isMultiplayer: boolean | null; + isBountyClaimed: boolean | null; +} + + +const BountyContext = createContext(null); + +export const useBountyContext = () => useContext(BountyContext); + + +export const BountyProvider = ({ bountyId, children }: { bountyId: string, children: ReactNode }) => { + const [bountyData, setBountyData] = useState(null); + const [isOwner, setIsOwner] = useState(false); + const [isMultiplayer, setIsMultiplayer] = useState(false); + const [isBountyClaimed, setIsBountyClaimed] = useState(null); + + const { user } = useDynamicContext(); + const currentUser = user?.verifiedCredentials[0].address; + + useEffect(() => { + if (bountyId) { + fetchBountyById(bountyId).then(data => { + setBountyData(data); + setIsOwner(currentUser === data.issuer); + setIsBountyClaimed(data.claimer !== "0x0000000000000000000000000000000000000000"); + }).catch(console.error); + + getParticipants(bountyId).then((openBounty) => { + setIsMultiplayer(openBounty.addresses.length > 0); + }).catch(console.error); + } + }, [bountyId, currentUser]); + + return ( + + {children} + + ); +}; diff --git a/src/components/bounty/Voting.tsx b/src/components/bounty/Voting.tsx index 74c9dcf1..eade4a91 100644 --- a/src/components/bounty/Voting.tsx +++ b/src/components/bounty/Voting.tsx @@ -1,4 +1,4 @@ -import { bountyVotingTracker , voteClaim} from '@/app/context/web3'; +import { bountyVotingTracker , voteClaim, resolveVote} from '@/app/context/web3'; import { VotingTracker } from '@/types/web3'; import React, { useEffect, useState } from 'react'; import { PieChart } from '@mui/x-charts/PieChart'; @@ -64,6 +64,33 @@ const Voting: React.FC = ({ bountyId }) => { } + + const resolveVoteHandle = async () => { + + if ( !bountyId || !primaryWallet ) { + alert("Please connect wallet"); + return; + } + try { + await resolveVote(primaryWallet, bountyId ); + alert("Vote resolve successfully!"); + + } catch (error) { + console.error('Error resolve vote:', error); + alert("Failed to resolve vote"); + } + + } + + + + + + + + + + console.log(bountyId) return ( @@ -94,7 +121,13 @@ const Voting: React.FC = ({ bountyId }) => { className='border mt-5 border-white rounded-full px-5 py-2 flex justify-between items-center backdrop-blur-sm bg-[#D1ECFF]/20 w-fit' onClick={voteNo} >no + + +
Deadline: {votingData.deadline}
diff --git a/src/components/layout/ContentBounty.tsx b/src/components/layout/ContentBounty.tsx index 70cd216d..42b2a331 100644 --- a/src/components/layout/ContentBounty.tsx +++ b/src/components/layout/ContentBounty.tsx @@ -1,32 +1,24 @@ import BountyInfo from "@/components/bounty/BountyInfo"; import BountyProofs from "@/components/bounty/BountyProofs"; +import { BountyProvider } from "@/components/bounty/BountyProvider"; import { usePathname } from "next/navigation"; -interface BountiesData { - id: string; - issuer: string; - name: string; - description: string; - value: string; - claimer: string; - createdAt: string; - claimId: string; -} const ContentBounty = () => { - const pathname = usePathname() - const bountyId = pathname.split('/').pop() || ''; - - + const pathname = usePathname(); + const bountyId = pathname.split('/').pop() || ''; return ( -
- - -
+ +
+ + +
+
); }; + export default ContentBounty; \ No newline at end of file diff --git a/src/types/web3.ts b/src/types/web3.ts index 3d903abe..5361bf75 100644 --- a/src/types/web3.ts +++ b/src/types/web3.ts @@ -99,6 +99,7 @@ export type BountyVotingTrackerFunction = (id: string) => Promise export type VoteClaimFunction = (primaryWallet: Wallet, id: string, vote: boolean ) => Promise; +export type ResolveVoteFunction = (primaryWallet: Wallet, bountyId: string, ) => Promise;