├── .github └── ISSUE_TEMPLATE │ └── 汎用テンプレート.md ├── .vscode ├── launch.json └── settings.json ├── CONTRIBUTING.md ├── LIXENSE.txt ├── README.md ├── document ├── .gitignore ├── README.md ├── babel.config.js ├── docs │ ├── developer │ │ ├── _category_.json │ │ ├── dev-env │ │ │ ├── _category_.json │ │ │ ├── contract.md │ │ │ ├── deploy.md │ │ │ ├── devenv_mac.md │ │ │ ├── documentImages │ │ │ │ ├── addlocalnet2metamask.png │ │ │ │ ├── defender-relayer-apikey.png │ │ │ │ ├── defender1.png │ │ │ │ ├── defender2.png │ │ │ │ ├── importlocalwallet2metamask1.png │ │ │ │ ├── importlocalwallet2metamask2.png │ │ │ │ ├── pinata1.png │ │ │ │ ├── pinata2.png │ │ │ │ ├── privatekey_1.png │ │ │ │ ├── privatekey_2.png │ │ │ │ ├── privatekey_3.png │ │ │ │ ├── privatekey_4.png │ │ │ │ ├── vercel1.png │ │ │ │ ├── vercel2.png │ │ │ │ ├── vercel3.png │ │ │ │ ├── vercel4.png │ │ │ │ ├── vercel5.png │ │ │ │ ├── web3storage1.png │ │ │ │ ├── web3storage2.png │ │ │ │ └── web3storage3.png │ │ │ ├── frontend.md │ │ │ └── localnode.md │ │ ├── meta-transaction │ │ │ ├── _category_.json │ │ │ └── flow.md │ │ └── secretphrase-zkp │ │ │ ├── _category_.json │ │ │ └── flow.md │ └── intro.md ├── docusaurus.config.ts ├── i18n │ └── ja │ │ ├── code.json │ │ ├── docusaurus-plugin-content-blog │ │ └── options.json │ │ ├── docusaurus-plugin-content-docs │ │ ├── current.json │ │ └── current │ │ │ ├── developer │ │ │ ├── _category_.json │ │ │ ├── dev-env │ │ │ │ ├── _category_.json │ │ │ │ ├── contract.md │ │ │ │ ├── deploy.md │ │ │ │ ├── devenv_mac.md │ │ │ │ ├── documentImages │ │ │ │ │ ├── addlocalnet2metamask.png │ │ │ │ │ ├── defender-relayer-apikey.png │ │ │ │ │ ├── defender1.png │ │ │ │ │ ├── defender2.png │ │ │ │ │ ├── importlocalwallet2metamask1.png │ │ │ │ │ ├── importlocalwallet2metamask2.png │ │ │ │ │ ├── pinata1.png │ │ │ │ │ ├── pinata2.png │ │ │ │ │ ├── privatekey_1.png │ │ │ │ │ ├── privatekey_2.png │ │ │ │ │ ├── privatekey_3.png │ │ │ │ │ ├── privatekey_4.png │ │ │ │ │ ├── vercel1.png │ │ │ │ │ ├── vercel2.png │ │ │ │ │ ├── vercel3.png │ │ │ │ │ ├── vercel4.png │ │ │ │ │ ├── vercel5.png │ │ │ │ │ ├── web3storage1.png │ │ │ │ │ ├── web3storage2.png │ │ │ │ │ └── web3storage3.png │ │ │ │ ├── frontend.md │ │ │ │ └── localnode.md │ │ │ ├── meta-transaction │ │ │ │ ├── _category_.json │ │ │ │ └── flow.md │ │ │ └── secretphrase-zkp │ │ │ │ ├── _category_.json │ │ │ │ └── flow.md │ │ │ └── intro.md │ │ └── docusaurus-theme-classic │ │ ├── footer.json │ │ └── navbar.json ├── package-lock.json ├── package.json ├── sidebars.ts ├── src │ ├── components │ │ └── HomepageFeatures │ │ │ ├── index.tsx │ │ │ └── styles.module.css │ ├── css │ │ └── custom.css │ └── pages │ │ ├── index.module.css │ │ ├── index.tsx │ │ └── markdown-page.md ├── static │ ├── .nojekyll │ ├── font │ │ ├── NotoSansJP-Bold.ttf │ │ └── NotoSansJP-Regular.ttf │ └── img │ │ ├── docusaurus-social-card.jpg │ │ ├── docusaurus.png │ │ ├── favicon.ico │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ └── undraw_docusaurus_tree.svg ├── tsconfig.json └── yarn.lock ├── frontend ├── .env.example ├── .eslintrc.json ├── .gitignore ├── .prettierrc.json ├── .sentryclirc ├── README.md ├── next-env.d.ts ├── next.config.js ├── package.json ├── public │ ├── .well-known │ │ └── walletconnect.txt │ ├── favicon.ico │ ├── images │ │ ├── collection_example │ │ │ ├── 00-00.png │ │ │ ├── 00-01.png │ │ │ ├── 00-02.png │ │ │ ├── 00-03.png │ │ │ ├── 01-00.png │ │ │ ├── 01-01.png │ │ │ ├── 01-02.png │ │ │ ├── 01-03.png │ │ │ ├── 02-00.png │ │ │ ├── 02-01.png │ │ │ ├── 02-02.png │ │ │ ├── 02-03.png │ │ │ ├── 03-00.png │ │ │ ├── 03-01.png │ │ │ ├── 03-02.png │ │ │ ├── 03-03.png │ │ │ ├── Summit-01.png │ │ │ ├── Summit-02.png │ │ │ ├── Summit-03.png │ │ │ └── Summit-04.png │ │ ├── email.png │ │ ├── events │ │ │ ├── civitan.png │ │ │ ├── default-thumb.png │ │ │ └── listpage_header.jpg │ │ ├── guest.svg │ │ ├── home │ │ │ ├── feature1.svg │ │ │ ├── feature2.svg │ │ │ └── feature3.svg │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── magiclink.svg │ │ ├── mainImg-ja.png │ │ ├── mainImg.png │ │ ├── metamask.png │ │ ├── polygonscan.svg │ │ ├── safe.png │ │ └── safe_black.png │ └── user.png ├── scripts │ └── createHoldersJson.ts ├── sentry.client.config.ts ├── sentry.edge.config.ts ├── sentry.server.config.ts ├── src │ ├── components │ │ ├── ImageIcon.tsx │ │ ├── ImageSelectorWithPreview.tsx │ │ ├── StyledFileInput.tsx │ │ ├── atoms │ │ │ ├── LocaleSelector.tsx │ │ │ ├── MyHead.tsx │ │ │ ├── events │ │ │ │ ├── EventCard.tsx │ │ │ │ ├── GroupCard.tsx │ │ │ │ ├── MintNFTLoginRequired.tsx │ │ │ │ ├── OrganizerInfo.tsx │ │ │ │ ├── Paginate.tsx │ │ │ │ └── SelectMintWallet.tsx │ │ │ ├── form │ │ │ │ ├── AlertMessage.tsx │ │ │ │ ├── AnimationFileInput.tsx │ │ │ │ ├── ErrorMessage.tsx │ │ │ │ └── MintGuide.tsx │ │ │ ├── icons │ │ │ │ ├── TwitterXicon │ │ │ │ │ └── TwitterXicon.tsx │ │ │ │ └── opensea │ │ │ │ │ └── OpenseaIcon.tsx │ │ │ ├── nft │ │ │ │ ├── NFTItem.tsx │ │ │ │ ├── ShareButtons.tsx │ │ │ │ └── ViewBottons.tsx │ │ │ ├── users │ │ │ │ └── ShareButtons.tsx │ │ │ └── web3 │ │ │ │ ├── ENSName.tsx │ │ │ │ ├── LoginRequired.tsx │ │ │ │ ├── MagicLinkConnectButton.tsx │ │ │ │ ├── MetamaskConnectButton.tsx │ │ │ │ ├── SafeConnectButton.tsx │ │ │ │ └── WalletConnectButton.tsx │ │ ├── footer.tsx │ │ ├── layout.tsx │ │ ├── molecules │ │ │ ├── Collaborators.tsx │ │ │ ├── EventGroupTab.tsx │ │ │ ├── EventMintLock.tsx │ │ │ ├── EventTransferLock.tsx │ │ │ ├── GrantRole.tsx │ │ │ ├── HoldersOfEvent.tsx │ │ │ ├── ResetSecretPhrase.tsx │ │ │ ├── common │ │ │ │ ├── AgreementText.tsx │ │ │ │ └── ModalBase.tsx │ │ │ ├── nft │ │ │ │ └── AboutNFTMetadata.tsx │ │ │ ├── user │ │ │ │ └── TokenModal.tsx │ │ │ └── web3 │ │ │ │ ├── ConnectWalletModal.tsx │ │ │ │ ├── InstallWalletAlert.tsx │ │ │ │ └── SelectConnectWallet.tsx │ │ ├── navbar.tsx │ │ └── organisms │ │ │ ├── CreateEventForm.tsx │ │ │ ├── CreateEventGroupForm.tsx │ │ │ ├── EditCollaborators.tsx │ │ │ ├── EventEditSection.tsx │ │ │ ├── EventGroupBase.tsx │ │ │ ├── Maintenance.tsx │ │ │ ├── NFTAttributesForm.tsx │ │ │ ├── UserEntity.tsx │ │ │ └── nft │ │ │ ├── DropNFTs.tsx │ │ │ ├── GroupedCollection.tsx │ │ │ └── MintForm.tsx │ ├── contracts │ │ ├── EventManager.json │ │ ├── Fowarder.json │ │ ├── MintNFT.json │ │ └── OperationController.json │ ├── hooks │ │ ├── useBlockChain.ts │ │ ├── useDropNFTs.ts │ │ ├── useEnsName.ts │ │ ├── useEvent.ts │ │ ├── useIpfs.ts │ │ ├── useLocale.ts │ │ ├── useMintNFT.ts │ │ ├── useOperationController.ts │ │ ├── useSecretPhrase.ts │ │ └── useWallet.ts │ ├── libs │ │ ├── contractMethods.ts │ │ ├── ipfsClient.ts │ │ ├── libIpfs.ts │ │ ├── pinataClient.ts │ │ └── web3Config.ts │ ├── locales │ │ ├── en.ts │ │ ├── guide-en.ts │ │ ├── guide-ja.ts │ │ └── ja.ts │ ├── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── _error.jsx │ │ ├── api │ │ │ ├── circuits │ │ │ │ ├── SecretPhrase.wasm │ │ │ │ ├── SecretPhrase.zkey │ │ │ │ └── witness_calculator.js │ │ │ ├── event-groups │ │ │ │ └── [eventgroupid] │ │ │ │ │ └── holders.ts │ │ │ ├── events │ │ │ │ └── [eventid] │ │ │ │ │ └── holders.ts │ │ │ ├── mtx │ │ │ │ └── relay.ts │ │ │ └── proof.ts │ │ ├── event-groups │ │ │ ├── [eventgroupid] │ │ │ │ ├── index.tsx │ │ │ │ ├── leaders.tsx │ │ │ │ └── role.tsx │ │ │ ├── index.tsx │ │ │ └── new.tsx │ │ ├── events │ │ │ ├── [eventid].tsx │ │ │ ├── index.tsx │ │ │ └── new.tsx │ │ ├── index.tsx │ │ ├── nfts │ │ │ └── [tokenid].tsx │ │ └── users │ │ │ ├── [address].tsx │ │ │ └── me.tsx │ └── styles │ │ └── globals.css ├── tsconfig.json ├── tsconfig.local.json ├── types │ ├── Event.ts │ ├── MintNFT.d.ts │ ├── MintRallyForwarder.d.ts │ └── NFT.ts ├── utils │ ├── chakra-theme.ts │ ├── ipfs2http.ts │ ├── isMobile.ts │ └── signer.ts └── yarn.lock └── hardhat ├── .env.example ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .prettierignore ├── .prettierrc ├── .solhint.json ├── .solhintignore ├── Dockerfile ├── README.md ├── autotasks ├── relay_prd │ └── index.js └── relay_stg │ └── index.js ├── circuits ├── SecretPhrase.circom ├── build │ └── witness.wtns ├── input.json ├── proof.json ├── public.json └── wrong_input.json ├── contracts ├── ERC2771ContextUpgradeable.sol ├── Event.sol ├── Forwarder.sol ├── IEvent.sol ├── IMintNFT.sol ├── IOperationController.sol ├── ISecretPhraseVerifier.sol ├── MintNFT.sol ├── OperationController.sol ├── SecretPhraseVerifier.sol └── lib │ └── Hashing.sol ├── docker-compose.yml ├── hardhat.config.ts ├── package.json ├── rollup.config.js ├── scripts ├── circuits │ ├── build_circuit.sh │ └── generate_sol.sh ├── deploy_local.ts ├── deploy_prd.ts ├── deploy_stg.ts ├── force_import.ts ├── force_import_stg.ts ├── helper │ ├── deploy.ts │ ├── eventManagerABI.json │ ├── getAddresses.ts │ ├── secret_phrase.ts │ └── upgrade.ts ├── updateEventIdOfTokenId.ts ├── upgrades │ ├── v1.1.0 │ │ ├── upgrade_eventmanager_local.ts │ │ ├── upgrade_eventmanager_prd.ts │ │ ├── upgrade_eventmanager_stg.ts │ │ ├── upgrade_nft_local.ts │ │ ├── upgrade_nft_prd.ts │ │ └── upgrade_nft_stg.ts │ ├── v1.2.0 │ │ ├── upgrade_local.ts │ │ ├── upgrade_prd.ts │ │ └── upgrade_stg.ts │ └── v1.3.0 │ │ ├── upgrade_local.ts │ │ ├── upgrade_prd.ts │ │ └── upgrade_stg.ts ├── upload_prd.js ├── upload_stg.js └── utils │ ├── create_test_events.ts │ └── transfer.ts ├── test ├── EventManager.ts ├── MintNFT.ts ├── OperationController.ts ├── SecretPhrase.ts └── helper │ └── secret_phrase.ts ├── tsconfig.json ├── yarn-error.log └── yarn.lock /.github/ISSUE_TEMPLATE/汎用テンプレート.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 汎用テンプレート 3 | about: バグレポートや機能追加などに使えます。 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | # 改善詳細 / Details of Improvement 11 | - バグの再現方法や新機能の目的・意図など詳細 12 | 13 | # スクリーンショット / Screenshot 14 | - 画面のスクリーンショットやデザインのスクリーンショットなど 15 | 16 | # 期待する見せ方・挙動 / Expected behavior 17 | - ユーザーの操作フローやシステムのフローなど 18 | 19 | # 動作環境・ブラウザ / Environment 20 | - 対象としている環境、バグが生じるブラウザや関係するSaaSなど 21 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Next.js: debug server-side", 6 | "type": "node-terminal", 7 | "request": "launch", 8 | "command": "yarn dev", 9 | "cwd": "${workspaceFolder}/frontend" 10 | }, 11 | { 12 | "name": "Next.js: debug client-side", 13 | "type": "chrome", 14 | "request": "launch", 15 | "url": "http://localhost:3000", 16 | "cwd": "${workspaceFolder}/frontend" 17 | }, 18 | { 19 | "name": "Next.js: debug full stack", 20 | "type": "node-terminal", 21 | "request": "launch", 22 | "command": "yarn dev", 23 | "console": "integratedTerminal", 24 | "serverReadyAction": { 25 | "pattern": "started server on .+, url: (https?://.+)", 26 | "uriFormat": "%s", 27 | "action": "debugWithChrome", 28 | "webRoot": "${workspaceFolder}/frontend" 29 | }, 30 | "cwd": "${workspaceFolder}/frontend" 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "solidity.packageDefaultDependenciesContractsDirectory": "", 3 | "solidity.packageDefaultDependenciesDirectory": "./hardhat/node_modules", 4 | "typescript.tsdk": "./frontend/node_modules/typescript/lib" 5 | } 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 貢献の仕方 2 | 3 | コントリビューターの皆様、本プロジェクトにご参加いただきありがとうございます!! 4 | 本サイトの開発に参加してくださる方に対して、参加方法をお伝えします。 5 | 6 | ## Issue へのコメントや Pull Request について 7 | 8 | - Issue へのコメントはご自由にどうぞ!新しい質問や提案なども受け付けます。 9 | - Issue を追加する場合、必ず既に同様の Issue が無いか検索をしてから作成してください。 10 | - Pull Request を送る場合、必ず対応する Issue 番号を追記してください。単独の Pull Request は受け付けません。 11 | - improve(改善提案)がついた Issue については必ず反映できると限りませんのでご了承ください。 12 | - 文言変更や見た目の大幅な変更といった、コンテンツの意味を変えるものについては、関係者の確認が必要です。採用される可能性もあまり高くないことをご了承ください。 13 | - good first issue / help wanted / bug を優先して対応いただけると助かります。 14 | 15 | ## コミュニケーションへの参加方法 16 | Hackdays projectのDiscordサーバーにてコミュニケーションをとっています。 17 | 18 | - Hackdays project の Discord サーバーに入っていない場合、[こちらからご参加ください](https://discord.com/invite/4hJefCEYKS)。 19 | - MintRallyのカテゴリにはいっているチャンネルで連絡を取っています。 20 | 21 | ## 参加にあたって 22 | 23 | - コミュニケーションにあたっては、Code for Japan の [行動規範](https://github.com/codeforjapan/codeofconduct) もご確認ください。 24 | - MintRallyはHackdays projectのひとつのプロダクトです。Hackdays projectの目指すところや、コミュニティについては[こちらも適宜ご参照ください](https://hackdays.notion.site/HackDays-Onboarding-e49abeee55354d689083cf08051cd022?pvs=4)。 25 | - 自分ができそうな Issue に誰もアサインされていない場合、Issue に「やります!」等とコメントしてから開発をはじめてください。 26 | - 1週間以上作業から離れそうな場合は、他の人が作業を引き継げるようにしておいてください。 27 | - 1週間以上更新されない Issue については、当方で assign を外させていただくことがあります。作業途中でも、[Draft Pull Request](https://qiita.com/tatane616/items/13da1b6797a7b871ad58) を送ってもらえると、動きが把握しやすくなります。 28 | - Issue に関連した質問等は、Slack より Issue 内のコメントを活用しましょう 29 | - 提案なども受け付けます!積極的に新しく Issue を作ってください。 30 | 31 | ## 開発に関する情報 32 | 33 | - ステージングサイト https://staging.mintrally.xyz 34 | - 本番サイト https://mintrally.xyz 35 | - [デザイン](https://www.figma.com/file/2nSRPWq4BjKPlQzd3M7CXs/MintRally?type=design&node-id=1408%3A8268&mode=design&t=dfknjmo25CTROn6B-1) 36 | 37 | 本 ドキュメント の更新も大歓迎です! 38 | -------------------------------------------------------------------------------- /LIXENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2022, HackDays contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mint Rally 2 | 3 | ![mainImg](https://user-images.githubusercontent.com/35390466/177026194-28ace142-0ba0-4360-8a48-6fd614fed91f.png) 4 | 5 | ## About our project 6 | 7 | **Proof of participation NFT you'll want to keep joining** 8 | 9 | - Organizers can easily organize events that can grant evolving NFTs. 10 | - Organizers can easily generate nice NFT images on the screen 11 | - Participants can gain attractive NFTs by continuing to attend events. 12 | 13 | ## Deployed Contract Address 14 | 15 | ### Polygon 16 | 17 | | Contract Name | Address | 18 | | -------------------- | ------------------------------------------ | 19 | | Forwarder | 0xc4579f8A0c6dd6A0B02914B0F48eF53f4d740980 | 20 | | MintNFT | 0x7d895Ca96caa5344EC0b732c6e1DEfa560671e14 | 21 | | EventManager | 0xFe2fe598E6C8B2fe66E55D5545D7d0aE4d52fCA1 | 22 | | SecretphraseVerifier | 0xea9bFA9176292A06724fD5F6F5Ec0c5f9F7AFea3 | 23 | | OperationController | 0x13Eb4ddb37Cb2049E68723Af3cD4eEa2c50BD451 | 24 | 25 | ### Mumbai 26 | 27 | | Contract Name | Address | 28 | | -------------------- | ------------------------------------------ | 29 | | Forwarder | 0xe9a9403381Ae89595D7DE67e2512aDb914F17DA7 | 30 | | MintNFT | 0xC3894D90dF7EFCAe8CF34e300CF60FF29Db9a868 | 31 | | EventManager | 0x4fe4F50B719572b3a5A33516da59eC43F51F4A45 | 32 | | SecretphraseVerifier | 0x8CeC10307447B3FA8D45007cf0cd45e9139EFEac | 33 | | OperationController | 0x4946049358140cfda80e36a7ba0c84871b964e3e | 34 | 35 | ## Problem to be solved 36 | 37 | Solves the problem of organizers struggling with event retention rates. 38 | 39 | ## Technology used 40 | 41 | - frontend: Next.js, TypeScript 42 | - contract: Solidity, ERC721Enumerable, Hardhat, circom 43 | - image: IPFS, Pinata 44 | 45 | ## Document 46 | 47 | [https://mintrally-docs.vercel.app/](https://mintrally-docs.vercel.app/) 48 | [Develop](http://localhost:3000/docs/developer/dev-env) 49 | [Contribution Guide](/CONTRIBUTING.md) 50 | -------------------------------------------------------------------------------- /document/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /document/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ### Deployment 28 | 29 | Using SSH: 30 | 31 | ``` 32 | $ USE_SSH=true yarn deploy 33 | ``` 34 | 35 | Not using SSH: 36 | 37 | ``` 38 | $ GIT_USER= yarn deploy 39 | ``` 40 | 41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 42 | -------------------------------------------------------------------------------- /document/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /document/docs/developer/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Developer", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Developer" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/docs/developer/dev-env/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Development Environment", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "About Development Environment" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/docs/developer/dev-env/contract.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Setting Up Contract Development Environment (Until Test Code Execution) 6 | 7 | ## Installing Necessary Libraries 8 | 9 | Install the following two libraries by following their respective instructions. Be aware that `snarkjs` should be installed globally. 10 | 11 | 1. [circom (a language for writing zero-knowledge proof circuits)](https://docs.circom.io/getting-started/installation/) 12 | 2. [snarkjs (a JavaScript library for computing zero-knowledge proofs)](https://www.npmjs.com/package/snarkjs) 13 | 14 | Install NPM: 15 | 16 | ```shell 17 | $ cd hardhat 18 | $ pwd 19 | ~/hardhat 20 | $ yarn 21 | ``` 22 | 23 | ## Building the Zero-Knowledge Proof Circuit 24 | 25 | ``` 26 | $ yarn build:circuit 27 | ``` 28 | 29 | ## Setting Up .env 30 | 31 | ``` 32 | $ cp .env.example .env 33 | ``` 34 | 35 | ## Compilation and Test Execution 36 | 37 | ``` 38 | $ yarn test 39 | ``` 40 | -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/addlocalnet2metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/addlocalnet2metamask.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/defender-relayer-apikey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/defender-relayer-apikey.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/defender1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/defender1.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/defender2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/defender2.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/importlocalwallet2metamask1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/importlocalwallet2metamask1.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/importlocalwallet2metamask2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/importlocalwallet2metamask2.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/pinata1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/pinata1.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/pinata2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/pinata2.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/privatekey_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/privatekey_1.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/privatekey_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/privatekey_2.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/privatekey_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/privatekey_3.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/privatekey_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/privatekey_4.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/vercel1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/vercel1.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/vercel2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/vercel2.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/vercel3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/vercel3.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/vercel4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/vercel4.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/vercel5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/vercel5.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/web3storage1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/web3storage1.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/web3storage2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/web3storage2.png -------------------------------------------------------------------------------- /document/docs/developer/dev-env/documentImages/web3storage3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/docs/developer/dev-env/documentImages/web3storage3.png -------------------------------------------------------------------------------- /document/docs/developer/meta-transaction/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Meta Transaction", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "About Meta Transaction" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/docs/developer/meta-transaction/flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 概要 6 | 7 | MintRally ではガス代となるネイティブトークンをもっていなくても使えるようにするために、メタトランザクションを実装しています。 8 | 9 | 現在はイベント作成者が事前にデポジットし、NFT を受け取るときのガス代を肩代わりできるようにしています。 10 | 11 | ## 使用技術 12 | 13 | - [ERC2771](https://eips.ethereum.org/EIPS/eip-2771) に沿った Forwarder の実装 14 | - [OpenZeppelin Defender Relayer](https://www.openzeppelin.com/defender) と [Openzeppelin Defender SDK](https://docs.openzeppelin.com/defender/v2/sdk) 15 | 16 | ## シーケンス 17 | 18 | ```plantuml MetaTransactionSequence 19 | @startuml 20 | 21 | actor organizer 22 | actor participant 23 | 24 | organizer -> EventContract: イベント作成時にネイティブトークンをつけてtx 25 | EventContract -> MintNFTContract: NFT情報の保存 26 | EventContract -> OZ_RelayerWallet: ネイティブトークンを転送 27 | participant -> participant: メタトランザクションの署名 28 | participant -> NextFunction: トランザクション実行リクエスト 29 | NextFunction -> OZ_API: トランザクション実行リクエスト 30 | OZ_API -> OZ_RelayerWallet: トランザクション実行 31 | OZ_RelayerWallet -> Forwarder: execute関数の実行 32 | Forwarder -> MintNFTContract: mintParticipateNFT関数の実行 33 | MintNFTContract -> participant: NFTがmintされる 34 | 35 | @enduml 36 | ``` 37 | 38 | - organizer: イベントの主催者 39 | - participant: イベントの参加者 40 | - EventContract: イベント情報を管理するコントラクト 41 | - MintNFTContract: 参加証明 NFT コントラクト 42 | - Forwarder: メタトランザクションの Forwarder コントラクト 43 | - NextFunction: Next.js で実装しているメタトランザクションエンドポイント 44 | - OZ_RelayerWallet: OpenZeppelin が提供する Relayer の Wallet 45 | - OZ_API: OpenZeppelin のリクエスト受け口となるエンドポイント 46 | -------------------------------------------------------------------------------- /document/docs/developer/secretphrase-zkp/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Secret Phrase (ZKP)", 3 | "position": 3, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "About Secret Phrase (ZKP)" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/docs/developer/secretphrase-zkp/flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 概要 6 | 7 | MintRally で参加者が NFT をうけとるためには、主催者から聞いたあいことばを入力します。入力したあいことばは Poseidon ハッシュ関数のハッシュ値に変換されたあと、ゼロ知識証明(Plonk アルゴリズム)によって暗号化され、セキュアにスマートコントラクトに保存されます。 8 | 9 | ## 使用技術 10 | 11 | - 回路実装: Circom 12 | - アルゴリズム: Plonk 13 | - Powers of Tau: powersOfTau28_hez_final_12.ptau 14 | 15 | ## シーケンス図 16 | 17 | ```plantuml MetaTransactionSequence 18 | @startuml 19 | 20 | actor organizer 21 | actor participant 22 | 23 | group イベントの作成 24 | organizer -> organizer: あいことばをkeccak256ハッシュ化、\nそれをさらにposeidonハッシュ関数でハッシュ化 25 | organizer -> NextFunction: keccak256ハッシュ値とposeidonハッシュ値の両方を\nおくってproof生成リクエスト 26 | NextFunction -> NextFunction: Circuitをつかってwitnessを計算 27 | NextFunction -> NextFunction: witnessからproofとpublic signalsを生成し、\nそれぞれをsolidityのcalldataに変換 28 | NextFunction -> organizer: proofとpublic signalsのcalldataを返却 29 | organizer -> EventContract: イベント作成のtxデータにpublicInputCalldataをつけてtxを投げる 30 | EventContract -> MintNFTContract: イベントIDをキーに、あいことばの\npublicInputCalldataを保存する 31 | end 32 | 33 | group NFTのミント 34 | participant -> participant: あいことばをkeccak256ハッシュ化、\nそれをさらにposeidonハッシュ関数でハッシュ化 35 | participant -> NextFunction: keccak256ハッシュ値とposeidonハッシュ値の両方を\nおくってproof生成リクエスト 36 | NextFunction -> NextFunction: Circuitをつかってwitnessを計算 37 | NextFunction -> NextFunction: witnessからproofとpublic signalsを生成し、\nそれぞれをsolidityのcalldataに変換 38 | NextFunction -> participant: proofとpublic signalsのcalldataを返却 39 | participant -> MintNFTContract: NFTミントのtxデータにproofをつけてtxを投げる 40 | MintNFTContract -> VerifierContract: イベント作成時に保存したpublicInputCalldataと\nproofCalldataを投げて正しいproofかを検証 41 | MintNFTContract -> VerifierContract: 使用済みproofとして保存 42 | end 43 | 44 | @enduml 45 | ``` 46 | -------------------------------------------------------------------------------- /document/docs/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Introduction 6 | 7 | ![mainImg](https://user-images.githubusercontent.com/35390466/177026194-28ace142-0ba0-4360-8a48-6fd614fed91f.png) 8 | 9 | ## About our project 10 | 11 | **Proof of participation NFT you'll want to keep joining** 12 | 13 | - Organizers can easily organize events that can grant evolving NFTs. 14 | - Organizers can easily generate nice NFT images on the screen 15 | - Participants can gain attractive NFTs by continuing to attend events. 16 | 17 | ## Deployed Contract Address 18 | 19 | ### Polygon 20 | 21 | | Contract Name | Address | 22 | | -------------------- | ------------------------------------------ | 23 | | Forwarder | 0xc4579f8A0c6dd6A0B02914B0F48eF53f4d740980 | 24 | | MintNFT | 0x7d895Ca96caa5344EC0b732c6e1DEfa560671e14 | 25 | | EventManager | 0xFe2fe598E6C8B2fe66E55D5545D7d0aE4d52fCA1 | 26 | | SecretphraseVerifier | 0xea9bFA9176292A06724fD5F6F5Ec0c5f9F7AFea3 | 27 | | OperationController | 0x13Eb4ddb37Cb2049E68723Af3cD4eEa2c50BD451 | 28 | 29 | ### Mumbai 30 | 31 | | Contract Name | Address | 32 | | -------------------- | ------------------------------------------ | 33 | | Forwarder | 0xe9a9403381Ae89595D7DE67e2512aDb914F17DA7 | 34 | | MintNFT | 0xC3894D90dF7EFCAe8CF34e300CF60FF29Db9a868 | 35 | | EventManager | 0x4fe4F50B719572b3a5A33516da59eC43F51F4A45 | 36 | | SecretphraseVerifier | 0x8CeC10307447B3FA8D45007cf0cd45e9139EFEac | 37 | | OperationController | 0x4946049358140cfda80e36a7ba0c84871b964e3e | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-blog/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Blog", 4 | "description": "The title for the blog used in SEO" 5 | }, 6 | "description": { 7 | "message": "Blog", 8 | "description": "The description for the blog used in SEO" 9 | }, 10 | "sidebar.title": { 11 | "message": "Recent posts", 12 | "description": "The label for the left sidebar" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current.json: -------------------------------------------------------------------------------- 1 | { 2 | "version.label": { 3 | "message": "Next", 4 | "description": "The label for version current" 5 | }, 6 | "sidebar.tutorialSidebar.category.Developer": { 7 | "message": "Developer", 8 | "description": "The label for category Developer in sidebar tutorialSidebar" 9 | }, 10 | "sidebar.tutorialSidebar.category.Developer.link.generated-index.description": { 11 | "message": "Developer", 12 | "description": "The generated-index page description for category Developer in sidebar tutorialSidebar" 13 | }, 14 | "sidebar.tutorialSidebar.category.Meta Transaction": { 15 | "message": "Meta Transaction", 16 | "description": "The label for category Meta Transaction in sidebar tutorialSidebar" 17 | }, 18 | "sidebar.tutorialSidebar.category.Meta Transaction.link.generated-index.description": { 19 | "message": "About Meta Transaction", 20 | "description": "The generated-index page description for category Meta Transaction in sidebar tutorialSidebar" 21 | }, 22 | "sidebar.tutorialSidebar.category.Secret Phrase (ZKP)": { 23 | "message": "Secret Phrase (ZKP)", 24 | "description": "The label for category Secret Phrase (ZKP) in sidebar tutorialSidebar" 25 | }, 26 | "sidebar.tutorialSidebar.category.Secret Phrase (ZKP).link.generated-index.description": { 27 | "message": "About Secret Phrase (ZKP)", 28 | "description": "The generated-index page description for category Secret Phrase (ZKP) in sidebar tutorialSidebar" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Developer", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Developer" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "開発環境構築", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "About Development Environment" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/contract.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # コントラクトの開発環境構築 6 | 7 | ## 必要なライブラリのインストール 8 | 9 | 以下2つを各インストラクションに従ってインストールする。snarkjs はグローバルインストールする必要があるので注意。 10 | 11 | 1. [circom(ゼロ知識証明の回路を記述する言語)](https://docs.circom.io/getting-started/installation/) 12 | 2. [snarkjs(ゼロ知識証明の計算を行う JS ライブラリ)](https://www.npmjs.com/package/snarkjs) 13 | 14 | NPM をインストール 15 | 16 | ```shell 17 | $ cd hardhat 18 | $ pwd 19 | ~/hardhat 20 | $ yarn 21 | ``` 22 | 23 | ## ゼロ知識証明の回路をビルド 24 | 25 | ``` 26 | $ yarn build:circuit 27 | ``` 28 | 29 | ## .env の準備 30 | 31 | ``` 32 | $ cp .env.example .env 33 | ``` 34 | 35 | ## コンパイルとテストの実行 36 | 37 | ``` 38 | $ yarn test 39 | ``` 40 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/devenv_mac.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # 依存ライブラリのインストール(Mac) 6 | 7 | - Homebrew 8 | - node 9 | - yarn 10 | 11 | の順番にインストールします。 12 | 13 | ## Homebrew をインストールする 14 | 15 | [Homebrew](https://brew.sh/index_ja '配布元サイトへのリンク')は、macOS 用のパッケージマネージャーです。以下の手順に従って Homebrew をインストールします。 16 | 17 | 1. ターミナルを開きます。Spotlight 検索(Cmd + Space)で「ターミナル」と入力して起動します。 18 | 19 | 2. ターミナルで以下のコマンドを実行して、Homebrew をインストールします。 20 | 21 | ```shell 22 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 23 | ``` 24 | 25 | 3. インストール確認 26 | ```shell 27 | brew --version 28 | ``` 29 | Homebrew のバージョンに指定はなく、バージョン情報が表示されれば、Homebrew のインストールが成功しているので次へ進んでください。 30 | もし、バージョン情報が表示されない場合は、インストールコマンドのタイプミスまたはネットワークエラーの可能性があるため、インストールログを確認してください。 31 | 32 | ## Node のインストール 33 | 34 | Node.js は、JavaScript ランタイム環境であり、サーバーサイドで JavaScript を実行するためのプラットフォームです。以下の手順に従って Node をインストールします。 35 | 36 | 1. ターミナルで以下のコマンドを実行して、Node.js をインストールします。 37 | 38 | ```shell 39 | brew install node@18 40 | ``` 41 | 42 | MintRally では version16 と 18 にて動作確認をとっています。 43 | そのため Version18 を指定してインストールしています。 44 | 45 | 2. Node のバージョン指定しているので"keg-only"となっており、PATH が通されていないはずなので以下のコマンドを実行する。 46 | 47 | ```shell 48 | 'export PATH="/opt/homebrew/opt/node@18/bin:$PATH"' >> ~/.zshrc" 49 | ``` 50 | 51 | 3. インストール確認 52 | ```shell 53 | node -v 54 | ``` 55 | もし、バージョン情報が表示されない場合は、インストールコマンドのタイプミスまたはネットワークエラーの可能性があるため、インストールログを確認してください。 56 | 57 | ## Yarn のインストール 58 | 59 | Yarn は、JavaScript のパッケージマネージャーであり、依存関係の管理と効率的なパッケージのインストールを行うツールです。以下の手順に従って Yarn をインストールします。 60 | 61 | 1. ターミナルで以下のコマンドを実行して、以下のコマンドを実行して Yarn をインストールします。 62 | 63 | ```shell 64 | npm install -g yarn 65 | ``` 66 | 67 | 2. インストール確認 68 | ```shell 69 | yarn --version 70 | ``` 71 | バージョンは重要ではなく、バージョン情報が表示されれば、インストールが成功しているので次へ進んでください。 72 | もし、バージョン情報が表示されない場合は、インストールコマンドのタイプミスまたはネットワークエラーの可能性があるため、インストールログを確認してください。 73 | 74 | ## 補足 75 | 76 | MintRall では Node と Yarn を必須としていますが Homebrew は必須としていません。 77 | 従って Homebrew を入れずに node をインストールすることは可能です。ですが Homebrew で node の管理をする事が Mac での開発のデファクトです。デファクトに従う事として本手順でも Homebrew をインストールしています。 78 | [MintRall の依存関係](https://github.com/hackdays-io/mint-rally/blob/main/docs/frontend.md#dependencies)に記載された制約に従う為に node の最新版ではなくて Version16 をインストールするようにしています。 79 | Next は、package.json の内容に従って yarn コマンドによって組み込まれるため手順書として登場させていません。 80 | ソースコードのエディタは何を使っても問題ありませんが、VSC(VisualStudioCode)がおすすめです。 81 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/addlocalnet2metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/addlocalnet2metamask.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/defender-relayer-apikey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/defender-relayer-apikey.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/defender1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/defender1.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/defender2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/defender2.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/importlocalwallet2metamask1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/importlocalwallet2metamask1.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/importlocalwallet2metamask2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/importlocalwallet2metamask2.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/pinata1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/pinata1.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/pinata2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/pinata2.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_1.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_2.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_3.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/privatekey_4.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel1.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel2.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel3.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel4.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/vercel5.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/web3storage1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/web3storage1.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/web3storage2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/web3storage2.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/web3storage3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/i18n/ja/docusaurus-plugin-content-docs/current/developer/dev-env/documentImages/web3storage3.png -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/meta-transaction/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Meta Transaction", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "About Meta Transaction" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/meta-transaction/flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 概要 6 | 7 | MintRally ではガス代となるネイティブトークンをもっていなくても使えるようにするために、メタトランザクションを実装しています。 8 | 9 | 現在はイベント作成者が事前にデポジットし、NFT を受け取るときのガス代を肩代わりできるようにしています。 10 | 11 | ## 使用技術 12 | 13 | - [ERC2771](https://eips.ethereum.org/EIPS/eip-2771) に沿った Forwarder の実装 14 | - [OpenZeppelin Defender Relayer](https://www.openzeppelin.com/defender) と [Openzeppelin Defender SDK](https://docs.openzeppelin.com/defender/v2/sdk) 15 | 16 | ## シーケンス 17 | 18 | ```plantuml MetaTransactionSequence 19 | @startuml 20 | 21 | actor organizer 22 | actor participant 23 | 24 | organizer -> EventContract: イベント作成時にネイティブトークンをつけてtx 25 | EventContract -> MintNFTContract: NFT情報の保存 26 | EventContract -> OZ_RelayerWallet: ネイティブトークンを転送 27 | participant -> participant: メタトランザクションの署名 28 | participant -> NextFunction: トランザクション実行リクエスト 29 | NextFunction -> OZ_API: トランザクション実行リクエスト 30 | OZ_API -> OZ_RelayerWallet: トランザクション実行 31 | OZ_RelayerWallet -> Forwarder: execute関数の実行 32 | Forwarder -> MintNFTContract: mintParticipateNFT関数の実行 33 | MintNFTContract -> participant: NFTがmintされる 34 | 35 | @enduml 36 | ``` 37 | 38 | - organizer: イベントの主催者 39 | - participant: イベントの参加者 40 | - EventContract: イベント情報を管理するコントラクト 41 | - MintNFTContract: 参加証明 NFT コントラクト 42 | - Forwarder: メタトランザクションの Forwarder コントラクト 43 | - NextFunction: Next.js で実装しているメタトランザクションエンドポイント 44 | - OZ_RelayerWallet: OpenZeppelin が提供する Relayer の Wallet 45 | - OZ_API: OpenZeppelin のリクエスト受け口となるエンドポイント 46 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/secretphrase-zkp/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Secret Phrase (ZKP)", 3 | "position": 3, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "About Secret Phrase (ZKP)" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/developer/secretphrase-zkp/flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 概要 6 | 7 | MintRally で参加者が NFT をうけとるためには、主催者から聞いたあいことばを入力します。入力したあいことばは Poseidon ハッシュ関数のハッシュ値に変換されたあと、ゼロ知識証明(Plonk アルゴリズム)によって暗号化され、セキュアにスマートコントラクトに保存されます。 8 | 9 | ## 使用技術 10 | 11 | - 回路実装: Circom 12 | - アルゴリズム: Plonk 13 | - Powers of Tau: powersOfTau28_hez_final_12.ptau 14 | 15 | ## シーケンス図 16 | 17 | ```plantuml MetaTransactionSequence 18 | @startuml 19 | 20 | actor organizer 21 | actor participant 22 | 23 | group イベントの作成 24 | organizer -> organizer: あいことばをkeccak256ハッシュ化、\nそれをさらにposeidonハッシュ関数でハッシュ化 25 | organizer -> NextFunction: keccak256ハッシュ値とposeidonハッシュ値の両方を\nおくってproof生成リクエスト 26 | NextFunction -> NextFunction: Circuitをつかってwitnessを計算 27 | NextFunction -> NextFunction: witnessからproofとpublic signalsを生成し、\nそれぞれをsolidityのcalldataに変換 28 | NextFunction -> organizer: proofとpublic signalsのcalldataを返却 29 | organizer -> EventContract: イベント作成のtxデータにpublicInputCalldataをつけてtxを投げる 30 | EventContract -> MintNFTContract: イベントIDをキーに、あいことばの\npublicInputCalldataを保存する 31 | end 32 | 33 | group NFTのミント 34 | participant -> participant: あいことばをkeccak256ハッシュ化、\nそれをさらにposeidonハッシュ関数でハッシュ化 35 | participant -> NextFunction: keccak256ハッシュ値とposeidonハッシュ値の両方を\nおくってproof生成リクエスト 36 | NextFunction -> NextFunction: Circuitをつかってwitnessを計算 37 | NextFunction -> NextFunction: witnessからproofとpublic signalsを生成し、\nそれぞれをsolidityのcalldataに変換 38 | NextFunction -> participant: proofとpublic signalsのcalldataを返却 39 | participant -> MintNFTContract: NFTミントのtxデータにproofをつけてtxを投げる 40 | MintNFTContract -> VerifierContract: イベント作成時に保存したpublicInputCalldataと\nproofCalldataを投げて正しいproofかを検証 41 | MintNFTContract -> VerifierContract: 使用済みproofとして保存 42 | end 43 | 44 | @enduml 45 | ``` 46 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-plugin-content-docs/current/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Introduction 6 | 7 | ![mainImg](https://user-images.githubusercontent.com/35390466/177026194-28ace142-0ba0-4360-8a48-6fd614fed91f.png) 8 | 9 | ## About our project 10 | 11 | **Proof of participation NFT you'll want to keep joining** 12 | 13 | - Organizers can easily organize events that can grant evolving NFTs. 14 | - Organizers can easily generate nice NFT images on the screen 15 | - Participants can gain attractive NFTs by continuing to attend events. 16 | 17 | ## Deployed Contract Address 18 | 19 | ### Polygon 20 | 21 | | Contract Name | Address | 22 | | -------------------- | ------------------------------------------ | 23 | | Forwarder | 0xc4579f8A0c6dd6A0B02914B0F48eF53f4d740980 | 24 | | MintNFT | 0x7d895Ca96caa5344EC0b732c6e1DEfa560671e14 | 25 | | EventManager | 0xFe2fe598E6C8B2fe66E55D5545D7d0aE4d52fCA1 | 26 | | SecretphraseVerifier | 0xea9bFA9176292A06724fD5F6F5Ec0c5f9F7AFea3 | 27 | | OperationController | 0x13Eb4ddb37Cb2049E68723Af3cD4eEa2c50BD451 | 28 | 29 | ### Mumbai 30 | 31 | | Contract Name | Address | 32 | | -------------------- | ------------------------------------------ | 33 | | Forwarder | 0xe9a9403381Ae89595D7DE67e2512aDb914F17DA7 | 34 | | MintNFT | 0xC3894D90dF7EFCAe8CF34e300CF60FF29Db9a868 | 35 | | EventManager | 0x4fe4F50B719572b3a5A33516da59eC43F51F4A45 | 36 | | SecretphraseVerifier | 0x8CeC10307447B3FA8D45007cf0cd45e9139EFEac | 37 | | OperationController | 0x4946049358140cfda80e36a7ba0c84871b964e3e | 38 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-theme-classic/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "link.title.Docs": { 3 | "message": "Docs", 4 | "description": "The title of the footer links column with title=Docs in the footer" 5 | }, 6 | "link.title.Community": { 7 | "message": "Community", 8 | "description": "The title of the footer links column with title=Community in the footer" 9 | }, 10 | "link.title.More": { 11 | "message": "More", 12 | "description": "The title of the footer links column with title=More in the footer" 13 | }, 14 | "link.item.label.Document": { 15 | "message": "Document", 16 | "description": "The label of footer link with label=Document linking to /docs/intro" 17 | }, 18 | "link.item.label.Discord": { 19 | "message": "Discord", 20 | "description": "The label of footer link with label=Discord linking to https://discord.gg/4hJefCEYKS" 21 | }, 22 | "link.item.label.Twitter": { 23 | "message": "Twitter", 24 | "description": "The label of footer link with label=Twitter linking to https://twitter.com/mint_rally" 25 | }, 26 | "link.item.label.GitHub": { 27 | "message": "GitHub", 28 | "description": "The label of footer link with label=GitHub linking to https://github.com/hackdays-io/mint-rally" 29 | }, 30 | "copyright": { 31 | "message": "Copyright © 2024 Code for Japan Built with Docusaurus.", 32 | "description": "The footer copyright" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /document/i18n/ja/docusaurus-theme-classic/navbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "MintRally Docs", 4 | "description": "The title in the navbar" 5 | }, 6 | "logo.alt": { 7 | "message": "MintRally Logo", 8 | "description": "The alt text of navbar logo" 9 | }, 10 | "item.label.Document": { 11 | "message": "Document", 12 | "description": "Navbar item with label Document" 13 | }, 14 | "item.label.GitHub": { 15 | "message": "GitHub", 16 | "description": "Navbar item with label GitHub" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /document/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids", 15 | "typecheck": "tsc" 16 | }, 17 | "dependencies": { 18 | "@akebifiky/remark-simple-plantuml": "^1.0.2", 19 | "@docusaurus/core": "3.1.1", 20 | "@docusaurus/preset-classic": "3.1.1", 21 | "@mdx-js/react": "^3.0.0", 22 | "clsx": "^2.0.0", 23 | "prism-react-renderer": "^2.3.0", 24 | "react": "^18.0.0", 25 | "react-dom": "^18.0.0" 26 | }, 27 | "devDependencies": { 28 | "@docusaurus/module-type-aliases": "3.1.1", 29 | "@docusaurus/tsconfig": "3.1.1", 30 | "@docusaurus/types": "3.1.1", 31 | "typescript": "~5.2.2" 32 | }, 33 | "browserslist": { 34 | "production": [ 35 | ">0.5%", 36 | "not dead", 37 | "not op_mini all" 38 | ], 39 | "development": [ 40 | "last 3 chrome version", 41 | "last 3 firefox version", 42 | "last 5 safari version" 43 | ] 44 | }, 45 | "engines": { 46 | "node": ">=18.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /document/sidebars.ts: -------------------------------------------------------------------------------- 1 | import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; 2 | 3 | /** 4 | * Creating a sidebar enables you to: 5 | - create an ordered group of docs 6 | - render a sidebar for each doc of that group 7 | - provide next/previous navigation 8 | 9 | The sidebars can be generated from the filesystem, or explicitly defined here. 10 | 11 | Create as many sidebars as you want. 12 | */ 13 | const sidebars: SidebarsConfig = { 14 | // By default, Docusaurus generates a sidebar from the docs folder structure 15 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 16 | 17 | // But you can create a sidebar manually 18 | /* 19 | tutorialSidebar: [ 20 | 'intro', 21 | 'hello', 22 | { 23 | type: 'category', 24 | label: 'Tutorial', 25 | items: ['tutorial-basics/create-a-document'], 26 | }, 27 | ], 28 | */ 29 | }; 30 | 31 | export default sidebars; 32 | -------------------------------------------------------------------------------- /document/src/components/HomepageFeatures/index.tsx: -------------------------------------------------------------------------------- 1 | import clsx from 'clsx' 2 | import Heading from '@theme/Heading' 3 | import styles from './styles.module.css' 4 | 5 | type FeatureItem = { 6 | title: string 7 | Svg: React.ComponentType> 8 | description: JSX.Element 9 | } 10 | 11 | const FeatureList: FeatureItem[] = [ 12 | // { 13 | // title: 'Easy to Use', 14 | // Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, 15 | // description: ( 16 | // <> 17 | // Docusaurus was designed from the ground up to be easily installed and 18 | // used to get your website up and running quickly. 19 | // 20 | // ), 21 | // }, 22 | // { 23 | // title: 'Focus on What Matters', 24 | // Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, 25 | // description: ( 26 | // <> 27 | // Docusaurus lets you focus on your docs, and we'll do the chores. Go 28 | // ahead and move your docs into the docs directory. 29 | // 30 | // ), 31 | // }, 32 | // { 33 | // title: 'Powered by React', 34 | // Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, 35 | // description: ( 36 | // <> 37 | // Extend or customize your website layout by reusing React. Docusaurus can 38 | // be extended while reusing the same header and footer. 39 | // 40 | // ), 41 | // }, 42 | ] 43 | 44 | function Feature({ title, Svg, description }: FeatureItem) { 45 | return ( 46 |
47 |
48 | 49 |
50 |
51 | {title} 52 |

{description}

53 |
54 |
55 | ) 56 | } 57 | 58 | export default function HomepageFeatures(): JSX.Element { 59 | return ( 60 |
61 |
62 |
63 | {FeatureList.map((props, idx) => ( 64 | 65 | ))} 66 |
67 |
68 |
69 | ) 70 | } 71 | -------------------------------------------------------------------------------- /document/src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /document/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Any CSS included here will be global. The classic template 3 | * bundles Infima by default. Infima is a CSS framework designed to 4 | * work well for content-centric websites. 5 | */ 6 | 7 | @font-face { 8 | font-family: 'Noto Sans JP'; 9 | font-style: normal; 10 | font-weight: 400; 11 | src: url('/font/NotoSansJP-Regular.ttf') format('truetype'); 12 | } 13 | 14 | @font-face { 15 | font-family: 'Noto Sans JP'; 16 | font-style: normal; 17 | font-weight: 700; 18 | src: url('/font/NotoSansJP-Bold.ttf') format('truetype'); 19 | } 20 | 21 | /* You can override the default Infima variables here. */ 22 | :root { 23 | --ifm-color-primary: #079a93; 24 | --ifm-color-primary-dark: #0a7b77; 25 | --ifm-color-primary-darker: #0c615f; 26 | --ifm-color-primary-darkest: #10514f; 27 | --ifm-color-primary-light: #0dbfb3; 28 | --ifm-color-primary-lighter: #26dbcc; 29 | --ifm-color-primary-lightest: #56f0de; 30 | --ifm-code-font-size: 95%; 31 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); 32 | --ifm-font-family-base: 'Noto Sans JP', sans-serif; 33 | --ifm-heading-font-family: 'Noto Sans JP', sans-serif; 34 | } 35 | 36 | /* For readability concerns, you should choose a lighter palette in dark mode. */ 37 | [data-theme='dark'] { 38 | --ifm-color-primary: #0dbfb3; 39 | --ifm-color-primary-dark: #079a93; 40 | --ifm-color-primary-darker: #0a7b77; 41 | --ifm-color-primary-darkest: #0c615f; 42 | --ifm-color-primary-light: #56f0de; 43 | --ifm-color-primary-lighter: #95faeb; 44 | --ifm-color-primary-lightest: #c1fdf4; 45 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); 46 | } 47 | -------------------------------------------------------------------------------- /document/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 4rem 0; 8 | text-align: center; 9 | position: relative; 10 | overflow: hidden; 11 | } 12 | 13 | @media screen and (max-width: 996px) { 14 | .heroBanner { 15 | padding: 2rem; 16 | } 17 | } 18 | 19 | .buttons { 20 | display: flex; 21 | align-items: center; 22 | justify-content: center; 23 | } 24 | -------------------------------------------------------------------------------- /document/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import clsx from 'clsx' 2 | import Link from '@docusaurus/Link' 3 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext' 4 | import Layout from '@theme/Layout' 5 | import HomepageFeatures from '@site/src/components/HomepageFeatures' 6 | import Heading from '@theme/Heading' 7 | 8 | import styles from './index.module.css' 9 | 10 | function HomepageHeader() { 11 | const { siteConfig } = useDocusaurusContext() 12 | return ( 13 |
14 |
15 | 16 | {siteConfig.title} 17 | 18 |

{siteConfig.tagline}

19 |
20 | 24 | Get Started 25 | 26 |
27 |
28 |
29 | ) 30 | } 31 | 32 | export default function Home(): JSX.Element { 33 | const { siteConfig } = useDocusaurusContext() 34 | return ( 35 | 39 | 40 |
41 | 42 |
43 |
44 | ) 45 | } 46 | -------------------------------------------------------------------------------- /document/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /document/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/.nojekyll -------------------------------------------------------------------------------- /document/static/font/NotoSansJP-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/font/NotoSansJP-Bold.ttf -------------------------------------------------------------------------------- /document/static/font/NotoSansJP-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/font/NotoSansJP-Regular.ttf -------------------------------------------------------------------------------- /document/static/img/docusaurus-social-card.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/img/docusaurus-social-card.jpg -------------------------------------------------------------------------------- /document/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/img/docusaurus.png -------------------------------------------------------------------------------- /document/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/img/favicon.ico -------------------------------------------------------------------------------- /document/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/document/static/img/logo.png -------------------------------------------------------------------------------- /document/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@docusaurus/tsconfig", 4 | "compilerOptions": { 5 | "baseUrl": "." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /frontend/.env.example: -------------------------------------------------------------------------------- 1 | # Provider RPC and Alchemy key 2 | NEXT_PUBLIC_PROVIDER_RPC= 3 | NEXT_PUBLIC_ALCHEMY_KEY= 4 | # Ethers.js's Provider Alchemy key for ENS 5 | NEXT_PUBLIC_ALCHEMY_KEY_FOR_ENS= 6 | # Public forwarder address 7 | NEXT_PUBLIC_FORWARDER_ADDRESS= 8 | # Public contract addresses 9 | NEXT_PUBLIC_CONTRACT_MINT_NFT_MANAGER= 10 | NEXT_PUBLIC_CONTRACT_EVENT_MANAGER= 11 | NEXT_PUBLIC_CONTRACT_OPERATION_CONTROLLER= 12 | # Openzeppelin Relayer API keys 13 | OZ_RELAYER_API_KEYS="[""]" 14 | OZ_RELAYER_API_SECRETS="[""]" 15 | # Chain Information 16 | NEXT_PUBLIC_CHAIN_ID= 17 | NEXT_PUBLIC_CHAIN_NAME= 18 | NEXT_PUBLIC_BLOCK_EXPLORER_URL= 19 | NEXT_PUBLIC_METAMASK_RPC_URL= 20 | # Pinata settings 21 | NEXT_PUBLIC_PINATA_GATEWAY= 22 | NEXT_PUBLIC_PINATA_API_KEY= 23 | NEXT_PUBLIC_PINATA_API_SECRET= 24 | NEXT_PUBLIC_PINATA_JWT= 25 | # Web3 Storage key. This is used if Pinata setting is not set. 26 | NEXT_PUBLIC_WEB3_STORAGE_KEY= 27 | # MagicLink setting 28 | NEXT_PUBLIC_MAGIC_LINK_KEY= 29 | # Google Analytics seteting 30 | NEXT_PUBLIC_GA_MEASUREMENT_ID= 31 | # Thirdweb setting 32 | NEXT_PUBLIC_THIRDWEB_CLIENT_ID= 33 | # Blacklist of event group and event by id 34 | NEXT_PUBLIC_EVENT_GROUP_BLACK_LIST="0" 35 | NEXT_PUBLIC_EVENT_BLACK_LIST="0" -------------------------------------------------------------------------------- /frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals"], 3 | "rules": { 4 | "react-hooks/exhaustive-deps": "off" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env.production 31 | .env.test 32 | 33 | # vercel 34 | .vercel 35 | 36 | # typescript 37 | *.tsbuildinfo 38 | 39 | # environment 40 | .env[\.*] 41 | .env 42 | 43 | # Sentry Config File 44 | .sentryclirc 45 | -------------------------------------------------------------------------------- /frontend/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "semi": true, 4 | "singleQuote": false, 5 | "tabWidth": 2, 6 | "trailingComma": "es5" 7 | } 8 | -------------------------------------------------------------------------------- /frontend/.sentryclirc: -------------------------------------------------------------------------------- 1 | 2 | [auth] 3 | token=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 4 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | ``` 12 | 13 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 14 | 15 | You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. 16 | 17 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. 18 | 19 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 20 | 21 | ## Learn More 22 | 23 | To learn more about Next.js, take a look at the following resources: 24 | 25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 27 | 28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 29 | 30 | ## Deploy on Vercel 31 | 32 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 33 | 34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 35 | 36 | ## Required API keys 37 | 38 | You must set the following API keys via `.env` etc. 39 | 40 | - `NEXT_PUBLIC_WEB3_STORAGE_KEY` - retrieved from https://web3.storage/tokens/ 41 | - `NEXT_PUBLIC_CONTRACT_EVENT_MANAGER` - retrieved from your deployed contract 42 | - `NEXT_PUBLIC_CONTRACT_MINT_NFT_MANAGER` - retrieved from your deployed contract -------------------------------------------------------------------------------- /frontend/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /frontend/next.config.js: -------------------------------------------------------------------------------- 1 | const { withSentryConfig } = require("@sentry/nextjs"); 2 | const isProduction = process.env.NODE_ENV === "production"; 3 | 4 | const nextConfig = { 5 | reactStrictMode: true, 6 | i18n: { 7 | locales: ["en", "ja"], 8 | defaultLocale: "en", 9 | }, 10 | images: { 11 | domains: ["localhost", "ipfs.mintrally.xyz", "gateway.pinata.cloud"], 12 | }, 13 | }; 14 | 15 | const nextConfigWithSentry = withSentryConfig( 16 | nextConfig, 17 | { 18 | // For all available options, see: 19 | // https://github.com/getsentry/sentry-webpack-plugin#options 20 | 21 | // Suppresses source map uploading logs during build 22 | silent: true, 23 | org: "code-for-japan", 24 | project: "mintrally", 25 | }, 26 | { 27 | // For all available options, see: 28 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ 29 | 30 | // Upload a larger set of source maps for prettier stack traces (increases build time) 31 | widenClientFileUpload: true, 32 | 33 | // Transpiles SDK to be compatible with IE11 (increases bundle size) 34 | transpileClientSDK: true, 35 | 36 | // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) 37 | tunnelRoute: "/monitoring", 38 | 39 | // Hides source maps from generated client bundles 40 | hideSourceMaps: true, 41 | 42 | // Automatically tree-shake Sentry logger statements to reduce bundle size 43 | disableLogger: true, 44 | 45 | // Enables automatic instrumentation of Vercel Cron Monitors. 46 | // See the following for more information: 47 | // https://docs.sentry.io/product/crons/ 48 | // https://vercel.com/docs/cron-jobs 49 | automaticVercelMonitors: true, 50 | autoInstrumentServerFunctions: false, 51 | } 52 | ); 53 | 54 | module.exports = nextConfigWithSentry; 55 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "dev:mumbai": "NODE_ENV=test next dev", 8 | "dev:polygon": "NODE_ENV=production next dev", 9 | "build": "next build", 10 | "start": "next start", 11 | "lint": "next lint", 12 | "create:holders": "ts-node --project tsconfig.local.json scripts/createHoldersJson.ts" 13 | }, 14 | "dependencies": { 15 | "@chakra-ui/icons": "^2.0.2", 16 | "@chakra-ui/react": "^2.2.1", 17 | "@emotion/react": "^11", 18 | "@emotion/styled": "^11", 19 | "@fortawesome/fontawesome-svg-core": "^6.2.0", 20 | "@fortawesome/free-solid-svg-icons": "^6.2.0", 21 | "@fortawesome/react-fontawesome": "^0.2.0", 22 | "@openzeppelin/defender-relay-client": "^1.52.0", 23 | "@sentry/nextjs": "^7.90.0", 24 | "@thirdweb-dev/chains": "^0.1.54", 25 | "@thirdweb-dev/react": "^3.16.4", 26 | "@thirdweb-dev/sdk": "^3.10.66", 27 | "@thirdweb-dev/wallets": "^1.3.4", 28 | "@types/uuid": "^9.0.3", 29 | "axios": "^0.27.2", 30 | "bignumber.js": "^9.1.0", 31 | "circomlibjs": "^0.1.7", 32 | "dayjs": "^1.11.4", 33 | "eth-sig-util": "^3.0.1", 34 | "ethers": "^5.6.9", 35 | "framer-motion": "^6", 36 | "lodash": "^4.17.21", 37 | "next": "12.2.0", 38 | "next-seo": "^5.5.0", 39 | "next-share": "^0.21.0", 40 | "nextjs-google-analytics": "^2.1.0", 41 | "nprogress": "^0.2.0", 42 | "ordinal": "^1.0.3", 43 | "papaparse": "^5.4.1", 44 | "react": "18.2.0", 45 | "react-dom": "18.2.0", 46 | "react-hook-form": "^7.33.1", 47 | "react-rewards": "^2.0.4", 48 | "snarkjs": "^0.7.0", 49 | "uuid": "^9.0.0" 50 | }, 51 | "devDependencies": { 52 | "@types/node": "18.0.0", 53 | "@types/nprogress": "^0.2.0", 54 | "@types/papaparse": "^5.3.8", 55 | "@types/react": "18.0.14", 56 | "@types/react-dom": "18.0.5", 57 | "dotenv": "^16.0.1", 58 | "eslint": "8.18.0", 59 | "eslint-config-next": "12.2.0", 60 | "prettier": "^2.7.1", 61 | "typescript": "4.7.4" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /frontend/public/.well-known/walletconnect.txt: -------------------------------------------------------------------------------- 1 | cc842e27-9a12-41e8-b1af-803c771a8e29=9499e5aa2778514d0d2f91dd88be1f988e14f6e21261b66d1d553e7733a79ae6 -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/favicon.ico -------------------------------------------------------------------------------- /frontend/public/images/collection_example/00-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/00-00.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/00-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/00-01.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/00-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/00-02.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/00-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/00-03.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/01-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/01-00.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/01-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/01-01.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/01-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/01-02.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/01-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/01-03.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/02-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/02-00.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/02-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/02-01.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/02-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/02-02.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/02-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/02-03.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/03-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/03-00.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/03-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/03-01.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/03-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/03-02.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/03-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/03-03.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/Summit-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/Summit-01.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/Summit-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/Summit-02.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/Summit-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/Summit-03.png -------------------------------------------------------------------------------- /frontend/public/images/collection_example/Summit-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/collection_example/Summit-04.png -------------------------------------------------------------------------------- /frontend/public/images/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/email.png -------------------------------------------------------------------------------- /frontend/public/images/events/civitan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/events/civitan.png -------------------------------------------------------------------------------- /frontend/public/images/events/default-thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/events/default-thumb.png -------------------------------------------------------------------------------- /frontend/public/images/events/listpage_header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/events/listpage_header.jpg -------------------------------------------------------------------------------- /frontend/public/images/guest.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/logo.png -------------------------------------------------------------------------------- /frontend/public/images/magiclink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/public/images/mainImg-ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/mainImg-ja.png -------------------------------------------------------------------------------- /frontend/public/images/mainImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/mainImg.png -------------------------------------------------------------------------------- /frontend/public/images/metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/metamask.png -------------------------------------------------------------------------------- /frontend/public/images/polygonscan.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/public/images/safe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/safe.png -------------------------------------------------------------------------------- /frontend/public/images/safe_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/images/safe_black.png -------------------------------------------------------------------------------- /frontend/public/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackdays-io/mint-rally/e09cac9944d12573a50011c43f3977ccf900fdb8/frontend/public/user.png -------------------------------------------------------------------------------- /frontend/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry on the client. 2 | // The config you add here will be used whenever a users loads a page in their browser. 3 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 4 | 5 | import * as Sentry from "@sentry/nextjs"; 6 | 7 | Sentry.init({ 8 | dsn: "https://8809ac2b0b9a2a148e7c23fb93f5c274@o4506432338001920.ingest.sentry.io/4506432345407488", 9 | 10 | // Adjust this value in production, or use tracesSampler for greater control 11 | tracesSampleRate: 1, 12 | 13 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 14 | debug: false, 15 | 16 | replaysOnErrorSampleRate: 1.0, 17 | 18 | // This sets the sample rate to be 10%. You may want this to be 100% while 19 | // in development and sample at a lower rate in production 20 | replaysSessionSampleRate: 0.1, 21 | 22 | // You can remove this option if you're not planning to use the Sentry Session Replay feature: 23 | integrations: [ 24 | new Sentry.Replay({ 25 | // Additional Replay configuration goes in here, for example: 26 | maskAllText: true, 27 | blockAllMedia: true, 28 | }), 29 | ], 30 | }); 31 | -------------------------------------------------------------------------------- /frontend/sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on). 2 | // The config you add here will be used whenever one of the edge features is loaded. 3 | // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally. 4 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 5 | 6 | import * as Sentry from "@sentry/nextjs"; 7 | 8 | Sentry.init({ 9 | dsn: "https://8809ac2b0b9a2a148e7c23fb93f5c274@o4506432338001920.ingest.sentry.io/4506432345407488", 10 | 11 | // Adjust this value in production, or use tracesSampler for greater control 12 | tracesSampleRate: 1, 13 | 14 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 15 | debug: false, 16 | }); 17 | -------------------------------------------------------------------------------- /frontend/sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | // This file configures the initialization of Sentry on the server. 2 | // The config you add here will be used whenever the server handles a request. 3 | // https://docs.sentry.io/platforms/javascript/guides/nextjs/ 4 | 5 | import * as Sentry from "@sentry/nextjs"; 6 | 7 | Sentry.init({ 8 | dsn: "https://8809ac2b0b9a2a148e7c23fb93f5c274@o4506432338001920.ingest.sentry.io/4506432345407488", 9 | 10 | // Adjust this value in production, or use tracesSampler for greater control 11 | tracesSampleRate: 1, 12 | 13 | // Setting this option to true will print useful information to the console while you're setting up Sentry. 14 | debug: false, 15 | }); 16 | -------------------------------------------------------------------------------- /frontend/src/components/ImageIcon.tsx: -------------------------------------------------------------------------------- 1 | import { createIcon } from "@chakra-ui/react"; 2 | 3 | const ImageIcon = createIcon({ 4 | displayName: "ImageIcon", 5 | viewBox: "0 0 24 24", 6 | path: ( 7 | 11 | ), 12 | }); 13 | 14 | export default ImageIcon; 15 | -------------------------------------------------------------------------------- /frontend/src/components/ImageSelectorWithPreview.tsx: -------------------------------------------------------------------------------- 1 | import { Image, Flex } from "@chakra-ui/react"; 2 | import { FC, useEffect, useState } from "react"; 3 | import { ipfs2http } from "utils/ipfs2http"; 4 | 5 | import ImageIcon from "./ImageIcon"; 6 | import StyledFileInput from "./StyledFileInput"; 7 | 8 | const getImageData = (file: File): Promise => { 9 | const fileReader = new FileReader(); 10 | return new Promise((resolve, _reject) => { 11 | fileReader.readAsDataURL(file); 12 | fileReader.addEventListener("load", (ev) => { 13 | resolve(fileReader.result?.toString()); 14 | }); 15 | }); 16 | }; 17 | 18 | type Props = { 19 | onChangeData: (file: File) => void; 20 | value?: string; 21 | }; 22 | 23 | const ImageSelectorWithPreview: FC = ({ onChangeData, value }) => { 24 | const [dataUrl, setDataUrl] = useState(""); 25 | 26 | useEffect(() => { 27 | const updatePreview = async () => { 28 | if (!value) { 29 | setDataUrl(""); 30 | } else if (typeof value === "string") { 31 | setDataUrl(ipfs2http(value)); 32 | } else { 33 | const dataUrl = await getImageData(value); 34 | setDataUrl(String(dataUrl)); 35 | } 36 | }; 37 | updatePreview(); 38 | }, [value]); 39 | 40 | return ( 41 | 47 | {dataUrl ? ( 48 | image 55 | ) : ( 56 | 57 | )} 58 | 59 | } 60 | onFileChange={async (file) => { 61 | if (!file) return; 62 | const dataUrl = await getImageData(file); 63 | setDataUrl(String(dataUrl)); 64 | onChangeData(file); 65 | }} 66 | /> 67 | ); 68 | }; 69 | 70 | export default ImageSelectorWithPreview; 71 | -------------------------------------------------------------------------------- /frontend/src/components/StyledFileInput.tsx: -------------------------------------------------------------------------------- 1 | import { Box, HTMLChakraProps } from "@chakra-ui/react"; 2 | import styled from "@emotion/styled"; 3 | 4 | const noop = () => {}; 5 | 6 | const LabelForStyledInput = styled.label` 7 | display: block; 8 | width: 100%; 9 | height: 100%; 10 | &:hover { 11 | cursor: pointer; 12 | } 13 | `; 14 | 15 | const StyledFileInput = ({ 16 | previewElements, 17 | onFileChange = noop, 18 | ...rest 19 | }: { 20 | previewElements: JSX.Element; 21 | onFileChange: (file: File | undefined | null) => void; 22 | } & HTMLChakraProps<"div">) => ( 23 | 24 | 25 | {previewElements} 26 | { 31 | onFileChange(e.target.files?.item(0)); 32 | }} 33 | /> 34 | 35 | 36 | ); 37 | 38 | export default StyledFileInput; 39 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/LocaleSelector.tsx: -------------------------------------------------------------------------------- 1 | import { ChevronDownIcon } from "@chakra-ui/icons"; 2 | import { Button, Menu, MenuButton, MenuItem, MenuList } from "@chakra-ui/react"; 3 | import { useRouter } from "next/router"; 4 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 5 | import { faGlobe } from "@fortawesome/free-solid-svg-icons"; 6 | 7 | const LocaleSelector = () => { 8 | const router = useRouter(); 9 | const otherLocales = router.locales!.filter((l) => l !== router.locale); 10 | return ( 11 | <> 12 | 13 | }> 14 | 15 | 16 | 17 | {otherLocales.map((locale) => { 18 | return ( 19 | { 22 | router.push( 23 | { 24 | pathname: router.pathname, 25 | query: router.query, 26 | }, 27 | router.asPath, 28 | { locale: locale } 29 | ); 30 | }} 31 | as={Button} 32 | > 33 | {locale} 34 | 35 | ); 36 | })} 37 | 38 | 39 | 40 | ); 41 | }; 42 | 43 | export default LocaleSelector; 44 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/MyHead.tsx: -------------------------------------------------------------------------------- 1 | import { DefaultSeo, NextSeo } from "next-seo"; 2 | import type { NextPage } from "next"; 3 | 4 | import Head from "next/head"; 5 | 6 | const MyHead: NextPage = () => { 7 | const siteName = "MintRally"; 8 | const description = "MintRally - growing NFT service"; 9 | 10 | return ( 11 | <> 12 | 19 | 20 | 21 | 22 | 23 | 24 | ); 25 | }; 26 | 27 | export default MyHead; 28 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/events/EventCard.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | import { Box, Divider, Flex, Heading, Text } from "@chakra-ui/react"; 3 | import { CalendarIcon } from "@chakra-ui/icons"; 4 | import { useParseEventDate } from "src/hooks/useEvent"; 5 | 6 | type Props = { 7 | title: string; 8 | description: string; 9 | date: string; 10 | }; 11 | 12 | const EventCard: FC = ({ title, description, date }) => { 13 | const { parsedEventDate } = useParseEventDate(date); 14 | 15 | return ( 16 | <> 17 | 18 | 23 | 24 | 31 | {title} 32 | 33 | 40 | {description} 41 | 42 | 43 | 44 | 45 | {parsedEventDate} 46 | 47 | 48 | 49 | 50 | 51 | ); 52 | }; 53 | 54 | export default EventCard; 55 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/events/GroupCard.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Flex, Heading } from "@chakra-ui/react"; 2 | import { FC } from "react"; 3 | 4 | type Props = { title: string }; 5 | 6 | const EventGroupCard: FC = ({ title }) => { 7 | return ( 8 | 18 | 19 | 20 | {title} 21 | 22 | 23 | 24 | ); 25 | }; 26 | 27 | export default EventGroupCard; 28 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/events/MintNFTLoginRequired.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Button, HStack, Heading, Text } from "@chakra-ui/react"; 2 | import { FC, ReactNode } from "react"; 3 | import { useAddress, useChainId, useSwitchChain } from "@thirdweb-dev/react"; 4 | import { useLocale } from "../../../hooks/useLocale"; 5 | import Image from "next/image"; 6 | import SelectMintWallet from "./SelectMintWallet"; 7 | 8 | type Props = { 9 | children: ReactNode; 10 | requiredChainID: number; 11 | forbiddenText: string; 12 | allowMagicLink: boolean; 13 | }; 14 | 15 | const MintNFTLoginRequired: FC = ({ 16 | children, 17 | requiredChainID, 18 | forbiddenText, 19 | allowMagicLink, 20 | }) => { 21 | const address = useAddress(); 22 | const chainId = useChainId()!; 23 | 24 | const { t } = useLocale(); 25 | 26 | const switchNetwork = useSwitchChain(); 27 | 28 | return ( 29 | <> 30 | {!address ? ( 31 | 38 | 39 | 40 | {forbiddenText} 41 | 42 | civitan 48 | 49 | 50 | 51 | ) : chainId !== requiredChainID ? ( 52 | 59 | {t.PLEASE_SWITCH_NETWORK} 60 | 61 | 71 | 72 | 73 | ) : ( 74 | children 75 | )} 76 | 77 | ); 78 | }; 79 | 80 | export default MintNFTLoginRequired; 81 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/events/OrganizerInfo.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Link as ChakraUILink, 3 | Spinner, 4 | Table, 5 | Tbody, 6 | Td, 7 | Text, 8 | Th, 9 | Tr, 10 | } from "@chakra-ui/react"; 11 | import Link from "next/link"; 12 | import { FC, useMemo } from "react"; 13 | import { useEventGroups } from "src/hooks/useEvent"; 14 | import { useLocale } from "../../../hooks/useLocale"; 15 | import { Event } from "types/Event"; 16 | import ENSName from "../web3/ENSName"; 17 | 18 | type Props = { 19 | eventgroupid: string; 20 | }; 21 | 22 | export const OrganizerRows: FC = ({ eventgroupid }: Props) => { 23 | const { t } = useLocale(); 24 | const { groups, isLoading } = useEventGroups(); 25 | const findgroup: Event.EventGroup = useMemo(() => { 26 | return groups?.find( 27 | (item: Event.EventGroup) => item.groupId.toString() == eventgroupid 28 | ); 29 | }, [groups, eventgroupid]); 30 | return ( 31 | <> 32 | {isLoading && ( 33 | 34 | 35 | 36 | 37 | 38 | )} 39 | {findgroup && ( 40 | <> 41 | 42 | 43 | {t.EVENTGROUPS} 44 | 45 | 46 | 47 | 48 | {findgroup.name} 49 | 50 | 51 | 52 | 53 | 54 | 55 | {t.ORGANIZER} 56 | 57 | 58 | 59 | 60 | 61 | 62 | )} 63 | 64 | ); 65 | }; 66 | const OrganizerInfo: FC = ({ eventgroupid }) => { 67 | return ( 68 | <> 69 | 70 | 71 | 72 | 73 |
74 | 75 | ); 76 | }; 77 | export default OrganizerInfo; 78 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/events/Paginate.tsx: -------------------------------------------------------------------------------- 1 | import { Link as ChakraUILink, Box, HStack, Flex } from "@chakra-ui/react"; 2 | import { FC, useCallback } from "react"; 3 | 4 | type PaginateProps = { 5 | pageCount: number; 6 | currentPage: number; 7 | pageChanged: (page: number) => void; 8 | }; 9 | 10 | const Paginate: FC = ({ 11 | pageCount, 12 | currentPage, 13 | pageChanged, 14 | }) => { 15 | const handleClick = useCallback( 16 | (page: number) => { 17 | pageChanged(page); 18 | }, 19 | [pageChanged] 20 | ); 21 | 22 | return ( 23 | <> 24 | {pageCount > 1 && ( 25 | 26 | Page: 27 | {new Array(pageCount).fill(null).map((_, index) => ( 28 | <> 29 | {index + 1 === currentPage ? ( 30 | 41 | {index + 1} 42 | 43 | ) : ( 44 | handleClick(index + 1)} 54 | cursor="pointer" 55 | _hover={{ 56 | backgroundColor: "yellow.400", 57 | }} 58 | > 59 | {index + 1} 60 | 61 | )} 62 | 63 | ))} 64 | 65 | )} 66 | 67 | ); 68 | }; 69 | 70 | export default Paginate; 71 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/events/SelectMintWallet.tsx: -------------------------------------------------------------------------------- 1 | import { FC, useState } from "react"; 2 | import { VStack } from "@chakra-ui/react"; 3 | import { Text } from "@chakra-ui/react"; 4 | import { useLocale } from "src/hooks/useLocale"; 5 | import MagicLinkConnectButton from "../web3/MagicLinkConnectButton"; 6 | import MetamaskConnectButton from "../web3/MetamaskConnectButton"; 7 | import WalletConnectButton from "../web3/WalletConnectButton"; 8 | type Props = { 9 | allowMagicLink: boolean; 10 | }; 11 | 12 | const SelectMintWallet: FC = ({ allowMagicLink }) => { 13 | const [magicLinkSelected, setMagicLinkSelected] = useState(false); 14 | const [walletConnectSelected, setWalletConnectSelected] = 15 | useState(false); 16 | const { t } = useLocale(); 17 | 18 | return ( 19 | 20 | {!magicLinkSelected && !walletConnectSelected && ( 21 | <> 22 | 23 | {t.SELECT_WALLET} 24 | 25 | 26 | 27 | )} 28 | {!magicLinkSelected && ( 29 | 34 | )} 35 | {!walletConnectSelected && ( 36 | <> 37 | 43 | {!allowMagicLink && ( 44 | {t.NOT_ALLOWED_MAGIC_LINK} 45 | )} 46 | 47 | )} 48 | 49 | ); 50 | }; 51 | 52 | export default SelectMintWallet; 53 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/form/AlertMessage.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Alert, 3 | AlertIcon, 4 | AlertTitle, 5 | AlertDescription, 6 | } from "@chakra-ui/react"; 7 | import { FC, ReactNode } from "react"; 8 | 9 | type Props = { 10 | status?: "info" | "warning" | "success" | "error" | "loading" | undefined; 11 | mt?: number; 12 | children?: ReactNode; 13 | title?: string; 14 | }; 15 | 16 | const AlertMessage: FC = ({ status, mt, title, children }) => { 17 | return ( 18 | 19 | 20 | {title} 21 | {children && {children}} 22 | 23 | ); 24 | }; 25 | 26 | export default AlertMessage; 27 | 28 | AlertMessage.defaultProps = { 29 | status: "error", 30 | mt: 2, 31 | title: "Error occurred", 32 | }; 33 | -------------------------------------------------------------------------------- /frontend/src/components/atoms/form/AnimationFileInput.tsx: -------------------------------------------------------------------------------- 1 | import { Button, Flex, FormLabel, Input } from "@chakra-ui/react"; 2 | import { ChangeEvent, FC, useCallback, useMemo, useState } from "react"; 3 | import { useLocale } from "src/hooks/useLocale"; 4 | import { ipfs2http } from "utils/ipfs2http"; 5 | import { v4 as uuid } from "uuid"; 6 | 7 | type Props = { 8 | onChange: (file: File | undefined) => void; 9 | value?: string; 10 | removeAnimationURL: () => void; 11 | }; 12 | 13 | const AnimationFileInput: FC = ({ 14 | onChange, 15 | value, 16 | removeAnimationURL, 17 | }) => { 18 | const { t } = useLocale(); 19 | const [file, setFile] = useState(); 20 | 21 | const handleFileChange = (e: ChangeEvent) => { 22 | const file = e.target.files?.[0]; 23 | if (!file) return; 24 | onChange(file); 25 | 26 | const reader = new FileReader(); 27 | reader.readAsDataURL(file); 28 | reader.onload = () => { 29 | setFile(reader.result?.toString()); 30 | }; 31 | }; 32 | 33 | const inputId = uuid(); 34 | 35 | const previewString = useMemo(() => { 36 | if (file) return file; 37 | return typeof value === "string" ? ipfs2http(value) : ""; 38 | }, [value, file]); 39 | 40 | const handleRemove = useCallback(() => { 41 | removeAnimationURL(); 42 | onChange(undefined); 43 | setFile(undefined); 44 | }, []); 45 | 46 | return ( 47 | <> 48 | 49 | 59 | {(file || value) && ( 60 | 69 | )} 70 | 71 | { 77 | handleFileChange(e); 78 | }} 79 | /> 80 | {previewString && ( 81 |