diff --git a/frontend/package-lock.json b/frontend/package-lock.json index bcff0ed..b1311f1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,12 +8,10 @@ "name": "frontend", "version": "0.1.0", "dependencies": { - "@tanstack/react-query": "^5.49.0", + "@coinbase/onchainkit": "^0.23.4", "next": "^14.2.4", "react": "^18.3.1", - "react-dom": "^18.3.1", - "viem": "^2.16.4", - "wagmi": "^2.10.8" + "react-dom": "^18.3.1" }, "devDependencies": { "@types/node": "^20.14.8", @@ -2288,6 +2286,34 @@ "node": ">=6.9.0" } }, + "node_modules/@coinbase/onchainkit": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@coinbase/onchainkit/-/onchainkit-0.23.4.tgz", + "integrity": "sha512-GDQ95W7KSy4Q6t+qyawfZxBiaJZKb0jtUeYInEZIrEGAUdOqk0YTIx0MvLMO8l+4/XGak5WAX8GWJHcZphaRuA==", + "dependencies": { + "@tanstack/react-query": "^5", + "clsx": "^2.1.1", + "graphql": "^14 || ^15 || ^16", + "graphql-request": "^6.1.0", + "permissionless": "^0.1.29", + "tailwind-merge": "^2.3.0", + "viem": "^2.13.8", + "wagmi": "^2.9.11" + }, + "peerDependencies": { + "@xmtp/frames-validator": "^0.6.0", + "react": "^18", + "react-dom": "^18" + } + }, + "node_modules/@coinbase/onchainkit/node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "engines": { + "node": ">=6" + } + }, "node_modules/@coinbase/wallet-sdk": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-4.0.4.tgz", @@ -2408,6 +2434,23 @@ "node": ">=14" } }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -3693,6 +3736,70 @@ "node": ">=14" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "peer": true + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "peer": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "peer": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "peer": true + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "peer": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "peer": true + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "peer": true + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "peer": true + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "peer": true + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "peer": true + }, "node_modules/@react-native-community/cli": { "version": "13.6.8", "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-13.6.8.tgz", @@ -5423,6 +5530,33 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/@xmtp/frames-validator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@xmtp/frames-validator/-/frames-validator-0.6.1.tgz", + "integrity": "sha512-26g/igWUNfzY01tWbCRAM1Ax72rqSZtUf1iJJWJdmcerYuXWyH54tE6jsUzfMijP4CbZF/dzgVFMZKFl6PEdAg==", + "peer": true, + "dependencies": { + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.4.0", + "@xmtp/proto": "3.56.0", + "viem": "^2.9.28" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@xmtp/proto": { + "version": "3.56.0", + "resolved": "https://registry.npmjs.org/@xmtp/proto/-/proto-3.56.0.tgz", + "integrity": "sha512-zW8/s7x9je0keYjJpu/c5zmYK5wE14MxcDWLkxzMwRmrajwdy69BNN0NgVJ1uBzMUqGTjnGQJANDev8lpa58qQ==", + "peer": true, + "dependencies": { + "long": "^5.2.0", + "protobufjs": "^7.0.0", + "rxjs": "^7.8.0", + "undici": "^5.8.1" + } + }, "node_modules/abitype": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.5.tgz", @@ -8703,6 +8837,34 @@ "dev": true, "peer": true }, + "node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/graphql-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-6.1.0.tgz", + "integrity": "sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==", + "dependencies": { + "@graphql-typed-document-node/core": "^3.2.0", + "cross-fetch": "^3.1.5" + }, + "peerDependencies": { + "graphql": "14 - 16" + } + }, + "node_modules/graphql-request/node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/h3": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/h3/-/h3-1.12.0.tgz", @@ -10264,6 +10426,12 @@ "logkitty": "bin/logkitty.js" } }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "peer": true + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -11836,6 +12004,14 @@ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" }, + "node_modules/permissionless": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/permissionless/-/permissionless-0.1.31.tgz", + "integrity": "sha512-mFRJPVNPSJLQ2FlaOjKL4M24wOoQE2OcWIGpFPAOGuEQkzU3yclO7p/8jHe4cDFSAFD2z4y91KvFuHji0x9sbw==", + "peerDependencies": { + "viem": "^2.9.17" + } + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -12268,6 +12444,30 @@ "react-is": "^16.13.1" } }, + "node_modules/protobufjs": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", + "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", + "hasInstallScript": true, + "peer": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/proxy-compare": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-2.5.1.tgz", @@ -12941,6 +13141,15 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -13840,6 +14049,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/tailwind-merge": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.3.0.tgz", + "integrity": "sha512-vkYrLpIP+lgR0tQCG6AP7zZXCTLc1Lnv/CCRT3BqJ9CZ3ui2++GPaGb1x/ILsINIMSYqqvrpqjUFsMNLlW99EA==", + "dependencies": { + "@babel/runtime": "^7.24.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz", @@ -14282,6 +14503,18 @@ "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz", "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" }, + "node_modules/undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "peer": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/frontend/package.json b/frontend/package.json index 2fb6167..c08777c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,12 +9,10 @@ "lint": "next lint" }, "dependencies": { - "@tanstack/react-query": "^5.49.0", + "@coinbase/onchainkit": "^0.23.4", "next": "^14.2.4", "react": "^18.3.1", - "react-dom": "^18.3.1", - "viem": "^2.16.4", - "wagmi": "^2.10.8" + "react-dom": "^18.3.1" }, "devDependencies": { "@types/node": "^20.14.8", diff --git a/frontend/src/components/SponsorshipSummary.tsx b/frontend/src/components/SponsorshipSummary.tsx index f52a56d..2a4beda 100644 --- a/frontend/src/components/SponsorshipSummary.tsx +++ b/frontend/src/components/SponsorshipSummary.tsx @@ -3,6 +3,7 @@ import { abi } from "../../../backend/ignition/deployments/chain-84532/artifacts import deployed_addresses from "../../../backend/ignition/deployments/chain-84532/deployed_addresses.json"; import LoadingIndicator from "./LoadingIndicator"; import { Address, formatEther } from "viem"; +import { Avatar, Name } from "@coinbase/onchainkit/identity"; export default function SponsorshipSummary({ queueIndex }: any) { console.debug("SponsorshipSummary"); @@ -30,10 +31,14 @@ export default function SponsorshipSummary({ queueIndex }: any) { const sponsor = sponsorship[2]; return ( <> - Queue number: #{queueIndex}
- Date: {new Date(timestamp * 1_000).toISOString().substring(0,16)}
- Amount: {formatEther(estimatedCost)} ETH
- Sponsor: {sponsor.substring(0,5)}...{sponsor.substring(38,42)} + Queue number: #{queueIndex + 1} +
+ {new Date(timestamp * 1_000).toISOString().substring(0,10)} {new Date(timestamp * 1_000).toISOString().substring(11,16)} +
+ Amount: {formatEther(estimatedCost)} ETH +
+ Sponsor: +
) } diff --git a/frontend/src/components/Sponsorships.tsx b/frontend/src/components/Sponsorships.tsx index 8ffa4c3..3befeac 100644 --- a/frontend/src/components/Sponsorships.tsx +++ b/frontend/src/components/Sponsorships.tsx @@ -32,7 +32,7 @@ export default function Sponsorships() { return ( <> {Array(queueCount).fill(1).map((el, i) => - +
diff --git a/frontend/src/pages/sponsorships/[queueIndex].tsx b/frontend/src/pages/sponsorships/[queueNumber].tsx similarity index 88% rename from frontend/src/pages/sponsorships/[queueIndex].tsx rename to frontend/src/pages/sponsorships/[queueNumber].tsx index 79e3773..461a055 100644 --- a/frontend/src/pages/sponsorships/[queueIndex].tsx +++ b/frontend/src/pages/sponsorships/[queueNumber].tsx @@ -6,7 +6,9 @@ export default function SponsorshipDetails() { console.debug("SponsorshipDetails"); const router = useRouter(); - const queueIndex = router.query.queueIndex; + const queueNumber = Number(router.query.queueNumber); + console.debug("queueNumber:", queueNumber); + const queueIndex = queueNumber - 1; console.debug("queueIndex:", queueIndex); return (