├── packages
├── ui
│ ├── src
│ │ ├── components
│ │ │ ├── accordion
│ │ │ │ └── Accordion
│ │ │ ├── switch
│ │ │ │ ├── index.ts
│ │ │ │ └── Switch.tsx
│ │ │ ├── text
│ │ │ │ ├── index.ts
│ │ │ │ └── Title.tsx
│ │ │ ├── box
│ │ │ │ ├── index.ts
│ │ │ │ └── FixedBottom.tsx
│ │ │ └── button
│ │ │ │ ├── index.ts
│ │ │ │ ├── Button.tsx
│ │ │ │ └── QButton.tsx
│ │ ├── theme
│ │ │ ├── default-props.ts
│ │ │ ├── utils
│ │ │ │ └── default-props.ts
│ │ │ ├── fonts.ts
│ │ │ ├── components
│ │ │ │ ├── container.ts
│ │ │ │ ├── code.ts
│ │ │ │ ├── skip-link.ts
│ │ │ │ ├── list.ts
│ │ │ │ ├── kbd.ts
│ │ │ │ ├── form-label.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── link.ts
│ │ │ │ ├── spinner.ts
│ │ │ │ ├── breadcrumb.ts
│ │ │ │ ├── tooltip.ts
│ │ │ │ ├── form-error.ts
│ │ │ │ ├── divider.ts
│ │ │ │ ├── editable.ts
│ │ │ │ ├── form.ts
│ │ │ │ ├── heading.ts
│ │ │ │ ├── skeleton.ts
│ │ │ │ ├── textarea.ts
│ │ │ │ ├── accordion.ts
│ │ │ │ ├── stat.ts
│ │ │ │ ├── pin-input.ts
│ │ │ │ ├── close-button.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── badge.ts
│ │ │ │ ├── popover.ts
│ │ │ │ ├── radio.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── progress.ts
│ │ │ │ ├── number-input.ts
│ │ │ │ ├── switch.ts
│ │ │ │ ├── tag.ts
│ │ │ │ └── alert.ts
│ │ │ ├── styles.ts
│ │ │ ├── index.ts
│ │ │ └── text-styles.ts
│ │ ├── index.ts
│ │ └── hooks
│ │ │ └── useThemeColor.tsx
│ ├── .gitignore
│ ├── example
│ │ ├── src
│ │ │ ├── vite-env.d.ts
│ │ │ ├── main.tsx
│ │ │ ├── App.tsx
│ │ │ └── favicon.svg
│ │ ├── .gitignore
│ │ ├── vite.config.ts
│ │ ├── index.html
│ │ ├── tsconfig.json
│ │ └── package.json
│ ├── .gitattributes
│ ├── test
│ │ └── blah.test.tsx
│ ├── .storybook
│ │ ├── preview.js
│ │ └── main.js
│ ├── stories
│ │ ├── hooks
│ │ │ ├── useCustomColor.tsx
│ │ │ └── useColor.tsx
│ │ ├── QButton.stories.tsx
│ │ ├── ColorMode.tsx
│ │ └── Button.stories.tsx
│ ├── workflows
│ │ └── publish.yml
│ ├── tsconfig.json
│ └── README.md
├── web
│ ├── src
│ │ ├── styles
│ │ │ ├── globals.css
│ │ │ ├── createEmotionCache.ts
│ │ │ └── customTheme
│ │ │ │ ├── index.ts
│ │ │ │ ├── fonts.ts
│ │ │ │ ├── components
│ │ │ │ └── button.ts
│ │ │ │ └── colors.ts
│ │ ├── types
│ │ │ └── index.ts
│ │ ├── components
│ │ │ ├── motion
│ │ │ │ └── Box.tsx
│ │ │ ├── layout
│ │ │ │ ├── ThemeToggle.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── NavLink.tsx
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── Buttons
│ │ │ │ ├── DiscordButton.tsx
│ │ │ │ └── TwitterButton.tsx
│ │ │ ├── Circles
│ │ │ │ └── Circle.tsx
│ │ │ ├── static
│ │ │ │ └── WelcomeText.tsx
│ │ │ └── Icons
│ │ │ │ └── ScaffoldIcon.tsx
│ │ ├── hooks
│ │ │ └── useCustomColor.tsx
│ │ └── pages
│ │ │ ├── 404.tsx
│ │ │ ├── about.tsx
│ │ │ └── _app.tsx
│ ├── .husky
│ │ ├── pre-push
│ │ ├── pre-commit
│ │ └── commit-msg
│ ├── public
│ │ ├── favicon.ico
│ │ ├── dCompass-home.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── modern-15-pill.png
│ │ ├── mstile-150x150.png
│ │ ├── apple-touch-icon.png
│ │ ├── dCompass-skill-tree.png
│ │ ├── next-app-chakra-ts.png
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-256x256.png
│ │ ├── android-chrome-512x512.png
│ │ ├── browserconfig.xml
│ │ ├── manifest.json
│ │ ├── site.webmanifest
│ │ ├── safari-pinned-tab.svg
│ │ ├── chakra-ui-logomark-colored.svg
│ │ ├── vercel.svg
│ │ ├── ts-logo-512.svg
│ │ ├── nextjs-icon-dark.svg
│ │ └── nextjs-icon-light.svg
│ ├── .prettierrc
│ ├── .eslintrc
│ ├── next-env.d.ts
│ ├── next-sitemap.config.js
│ ├── .vscode
│ │ └── extensions.json
│ ├── commitlint.config.js
│ ├── README.md
│ ├── .gitignore
│ ├── .versionrc
│ ├── tsconfig.json
│ ├── next-seo.config.js
│ ├── package.json
│ └── next.config.js
├── dapp
│ ├── src
│ │ ├── core
│ │ │ ├── libs
│ │ │ │ └── siwe
│ │ │ │ │ ├── apg.d.ts
│ │ │ │ │ ├── siwe.ts
│ │ │ │ │ └── regex.ts
│ │ │ ├── constants
│ │ │ │ ├── coutries.d.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── countries.ts
│ │ │ │ └── emojis.ts
│ │ │ ├── types
│ │ │ │ ├── merge.ts
│ │ │ │ └── eth-types.ts
│ │ │ ├── connectors
│ │ │ │ ├── getLibrary.ts
│ │ │ │ └── wallets.ts
│ │ │ ├── helpers.ts
│ │ │ └── hooks
│ │ │ │ ├── useCustomColor.tsx
│ │ │ │ └── useResolveEnsName.tsx
│ │ ├── styles
│ │ │ ├── globals.css
│ │ │ ├── customTheme
│ │ │ │ ├── default-values.ts
│ │ │ │ ├── fonts.ts
│ │ │ │ ├── theme
│ │ │ │ │ ├── foundations
│ │ │ │ │ │ ├── borders.ts
│ │ │ │ │ │ ├── blur.ts
│ │ │ │ │ │ ├── radius.ts
│ │ │ │ │ │ ├── breakpoints.ts
│ │ │ │ │ │ ├── z-index.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── spacing.ts
│ │ │ │ │ │ ├── transition.ts
│ │ │ │ │ │ ├── shadows.ts
│ │ │ │ │ │ ├── sizes.ts
│ │ │ │ │ │ └── typography.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── text.ts
│ │ │ │ │ └── link.ts
│ │ │ │ ├── README.md
│ │ │ │ ├── styles.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── useThemeColor.tsx
│ │ │ │ └── colors.ts
│ │ │ └── createEmotionCache.ts
│ │ ├── components
│ │ │ ├── motion
│ │ │ │ └── Box.tsx
│ │ │ ├── layout
│ │ │ │ ├── CenteredFrame.tsx
│ │ │ │ ├── Container.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── custom
│ │ │ │ ├── Card.tsx
│ │ │ │ ├── CardMedia.tsx
│ │ │ │ ├── NotReviewerCard.tsx
│ │ │ │ └── NotConnectedCard.tsx
│ │ │ ├── Buttons
│ │ │ │ ├── ThemeToggle.tsx
│ │ │ │ └── ConnectButton.tsx
│ │ │ ├── Navigation
│ │ │ │ └── LinkItem.tsx
│ │ │ └── Icons
│ │ │ │ └── ScaffoldIcon.tsx
│ │ ├── contexts
│ │ │ ├── Web3ProviderNetwork.tsx
│ │ │ ├── Web3Reducer.ts
│ │ │ └── Web3Manager.tsx
│ │ └── pages
│ │ │ ├── 404.tsx
│ │ │ ├── api
│ │ │ └── image-storage.ts
│ │ │ └── index.tsx
│ ├── .husky
│ │ ├── pre-push
│ │ ├── pre-commit
│ │ └── commit-msg
│ ├── public
│ │ ├── favicon.ico
│ │ ├── metamask.png
│ │ ├── portisIcon.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── mstile-150x150.png
│ │ ├── apple-touch-icon.png
│ │ ├── images
│ │ │ ├── nightcity.png
│ │ │ └── nightcity1.png
│ │ ├── arrow-right-white.png
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-256x256.png
│ │ ├── browserconfig.xml
│ │ ├── manifest.json
│ │ ├── site.webmanifest
│ │ ├── vercel.svg
│ │ ├── polygon_logo.svg
│ │ └── optimism_logo.svg
│ ├── .eslintrc.json
│ ├── .prettierrc.json
│ ├── .lintstagedrc.json
│ ├── next-sitemap.config.js
│ ├── .example.env
│ ├── .vscode
│ │ └── extensions.json
│ ├── next-env.d.ts
│ ├── commitlint.config.js
│ ├── README.md
│ ├── .gitignore
│ ├── next.config.js
│ ├── .versionrc
│ ├── tsconfig.json
│ ├── next-seo.config.js
│ └── lib
│ │ └── apolloClient.js
├── .DS_Store
├── hardhat-ts
│ ├── example.mnemonic.secret
│ ├── .gitignore
│ ├── generated
│ │ └── .gitignore
│ ├── .prettierrc
│ ├── helpers
│ │ └── types
│ │ │ ├── __global.ts
│ │ │ └── hardhat-type-extensions.ts
│ ├── scripts
│ │ ├── watch.ts
│ │ └── old js
│ │ │ └── scripts
│ │ │ └── watch.js
│ ├── test
│ │ └── sample-test.ts
│ ├── contracts
│ │ ├── Greeter.sol
│ │ └── YourContract.sol
│ ├── example.env
│ ├── deploy
│ │ └── 00_deploy_your_contract.ts
│ └── tsconfig.json
├── schemas
│ └── lib
│ │ ├── schemas.js.map
│ │ ├── schemas.js
│ │ ├── contributors
│ │ ├── contributors-schema.js.map
│ │ ├── contributors-schema.d.ts
│ │ └── contributors-schema.js
│ │ ├── model.json
│ │ └── schemas.d.ts
└── subgraph
│ ├── config
│ └── config.json
│ ├── src
│ ├── schema.graphql
│ ├── subgraph.template.yaml
│ └── mapping.ts
│ ├── package.json
│ └── abis
│ ├── kovan_YourContract.json
│ ├── mumbai_YourContract.json
│ ├── rinkeby_YourContract.json
│ └── localhost_YourContract.json
├── .DS_Store
├── CONTRIBUTING.md
├── lerna.json
├── package.json
├── tsconfig.json
└── .gitignore
/packages/ui/src/components/accordion/Accordion:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/web/src/styles/globals.css:
--------------------------------------------------------------------------------
1 | /* Global Styling here */
2 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/libs/siwe/apg.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'apg-js';
2 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/libs/siwe/siwe.ts:
--------------------------------------------------------------------------------
1 | export * from './client';
2 |
--------------------------------------------------------------------------------
/packages/ui/src/components/switch/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Switch';
2 |
--------------------------------------------------------------------------------
/packages/ui/src/components/text/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Title';
2 |
--------------------------------------------------------------------------------
/packages/ui/src/components/box/index.ts:
--------------------------------------------------------------------------------
1 | export * from './FixedBottom';
2 |
--------------------------------------------------------------------------------
/packages/ui/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .DS_Store
3 | node_modules
4 | .cache
5 | dist
6 |
--------------------------------------------------------------------------------
/packages/ui/example/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/web/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export type Merge
= Omit
& T;
2 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/constants/coutries.d.ts:
--------------------------------------------------------------------------------
1 | declare module "states-cities-db";
2 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/types/merge.ts:
--------------------------------------------------------------------------------
1 | export type Merge
= Omit
& T;
2 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/.DS_Store
--------------------------------------------------------------------------------
/packages/dapp/.husky/pre-push:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | yarn lint
5 |
--------------------------------------------------------------------------------
/packages/ui/example/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
6 |
--------------------------------------------------------------------------------
/packages/web/.husky/pre-push:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | yarn lint
5 |
--------------------------------------------------------------------------------
/packages/ui/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/packages/ui/src/components/button/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Button';
2 | export * from './QButton';
3 |
--------------------------------------------------------------------------------
/packages/dapp/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | yarn lint-staged
5 |
--------------------------------------------------------------------------------
/packages/web/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | yarn lint-staged
5 |
--------------------------------------------------------------------------------
/packages/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/.DS_Store
--------------------------------------------------------------------------------
/packages/dapp/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | yarn commitlint --edit $1
5 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/example.mnemonic.secret:
--------------------------------------------------------------------------------
1 | aim they either frame door access noble long source interest juice early
--------------------------------------------------------------------------------
/packages/ui/src/theme/default-props.ts:
--------------------------------------------------------------------------------
1 | export const colorScheme = 'primary';
2 | export const borderRadius = 'md';
3 |
--------------------------------------------------------------------------------
/packages/web/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | yarn commitlint --edit $1
5 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/globals.css:
--------------------------------------------------------------------------------
1 | /* Global Styling here */
2 | .blockies {
3 | border-radius: 0.375rem;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
3 | mnemonic.secret
4 |
5 | #Hardhat files
6 | cache
7 | artifacts
8 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/constants/index.ts:
--------------------------------------------------------------------------------
1 | export const GITHUB_HOST = "github.com";
2 | export const TWITTER_HOST = "twitter.com";
3 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/default-values.ts:
--------------------------------------------------------------------------------
1 | export const colorScheme = "primary";
2 | export const borderRadius = "xl";
3 |
--------------------------------------------------------------------------------
/packages/web/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/favicon.ico
--------------------------------------------------------------------------------
/packages/dapp/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/favicon.ico
--------------------------------------------------------------------------------
/packages/dapp/public/metamask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/metamask.png
--------------------------------------------------------------------------------
/packages/hardhat-ts/generated/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
5 | !contract-types
--------------------------------------------------------------------------------
/packages/dapp/public/portisIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/portisIcon.png
--------------------------------------------------------------------------------
/packages/dapp/public/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/favicon-16x16.png
--------------------------------------------------------------------------------
/packages/dapp/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/favicon-32x32.png
--------------------------------------------------------------------------------
/packages/dapp/public/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/mstile-150x150.png
--------------------------------------------------------------------------------
/packages/web/public/dCompass-home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/dCompass-home.png
--------------------------------------------------------------------------------
/packages/web/public/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/favicon-16x16.png
--------------------------------------------------------------------------------
/packages/web/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/favicon-32x32.png
--------------------------------------------------------------------------------
/packages/web/public/modern-15-pill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/modern-15-pill.png
--------------------------------------------------------------------------------
/packages/web/public/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/mstile-150x150.png
--------------------------------------------------------------------------------
/packages/dapp/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/packages/dapp/public/images/nightcity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/images/nightcity.png
--------------------------------------------------------------------------------
/packages/web/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "endOfLine": "lf",
3 | "semi": true,
4 | "singleQuote": false,
5 | "tabWidth": 2,
6 | "trailingComma": "es5"
7 | }
8 |
--------------------------------------------------------------------------------
/packages/web/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/packages/dapp/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "sznm/react",
4 | "plugin:react/jsx-runtime",
5 | "plugin:@next/next/recommended"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/dapp/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "endOfLine": "lf",
3 | "semi": true,
4 | "singleQuote": false,
5 | "tabWidth": 2,
6 | "trailingComma": "es5"
7 | }
8 |
--------------------------------------------------------------------------------
/packages/dapp/public/arrow-right-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/arrow-right-white.png
--------------------------------------------------------------------------------
/packages/dapp/public/images/nightcity1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/images/nightcity1.png
--------------------------------------------------------------------------------
/packages/ui/src/theme/utils/default-props.ts:
--------------------------------------------------------------------------------
1 | export const colorScheme = 'violet';
2 | export const borderRadius = 'md';
3 | export const primary = 'violet.200';
4 |
--------------------------------------------------------------------------------
/packages/web/public/dCompass-skill-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/dCompass-skill-tree.png
--------------------------------------------------------------------------------
/packages/web/public/next-app-chakra-ts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/next-app-chakra-ts.png
--------------------------------------------------------------------------------
/packages/web/public/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/android-chrome-192x192.png
--------------------------------------------------------------------------------
/packages/web/public/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/android-chrome-256x256.png
--------------------------------------------------------------------------------
/packages/web/public/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/web/public/android-chrome-512x512.png
--------------------------------------------------------------------------------
/packages/dapp/public/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/android-chrome-192x192.png
--------------------------------------------------------------------------------
/packages/dapp/public/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/moonshotcollective/scaffold-moonshot-starter/HEAD/packages/dapp/public/android-chrome-256x256.png
--------------------------------------------------------------------------------
/packages/web/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "next/core-web-vitals",
4 | "next",
5 | "plugin:react/jsx-runtime",
6 | "plugin:@next/next/recommended"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ### Contributing
2 |
3 | ## Creating a new package
4 |
5 | npx lerna create @scaffold-eth/
6 |
7 | ## Publishing a package
8 |
9 | npx lerna publish
10 |
--------------------------------------------------------------------------------
/packages/web/src/styles/createEmotionCache.ts:
--------------------------------------------------------------------------------
1 | import createCache from "@emotion/cache";
2 |
3 | export default function createEmotionCache() {
4 | return createCache({ key: "chakra-emotion-css" });
5 | }
6 |
--------------------------------------------------------------------------------
/packages/dapp/.lintstagedrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "src/**/*.{js,jsx,ts,tsx}": [
3 | "eslint --fix --max-warnings=0",
4 | "prettier --write"
5 | ],
6 | "src/**/*.{json,css,scss,md}": ["prettier --write"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/ui/example/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()]
7 | })
8 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/fonts.ts:
--------------------------------------------------------------------------------
1 | import { DeepPartial, Theme } from "@chakra-ui/react";
2 |
3 | const fonts: DeepPartial = {
4 | body: "Inter",
5 | heading: "Inter",
6 | };
7 |
8 | export default fonts;
9 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "packages": [
3 | "packages/*"
4 | ],
5 | "publishConfig": {
6 | "access": "public"
7 | },
8 | "version": "independent",
9 | "npmClient": "yarn",
10 | "useWorkspaces": true
11 | }
12 |
--------------------------------------------------------------------------------
/packages/schemas/lib/schemas.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":";;;AAAA,4EAAwE;AAE3D,QAAA,OAAO,GAAG;IACrB,IAAI,EAAE;QACJ,YAAY,EAAE,wCAAkB;KACjC;CACF,CAAC"}
--------------------------------------------------------------------------------
/packages/dapp/src/styles/createEmotionCache.ts:
--------------------------------------------------------------------------------
1 | import createCache from "@emotion/cache";
2 |
3 | function createEmotionCache() {
4 | return createCache({ key: "chakra-emotion-css" });
5 | }
6 | export default createEmotionCache;
7 |
--------------------------------------------------------------------------------
/packages/web/src/styles/customTheme/index.ts:
--------------------------------------------------------------------------------
1 | import { extendTheme } from "@chakra-ui/react";
2 |
3 | import { customTheme } from "@moonshotcollective/ui";
4 |
5 | const theme = extendTheme(customTheme);
6 |
7 | export default theme;
8 |
--------------------------------------------------------------------------------
/packages/dapp/next-sitemap.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next-sitemap').IConfig} */
2 | const NextSitemapConfig = {
3 | siteUrl: "https://demo.scaffold-eth.io",
4 | generateRobotsTxt: true,
5 | };
6 |
7 | module.exports = NextSitemapConfig;
8 |
--------------------------------------------------------------------------------
/packages/web/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 |
--------------------------------------------------------------------------------
/packages/web/next-sitemap.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next-sitemap').IConfig} */
2 | const NextSitemapConfig = {
3 | siteUrl: "https://coordination.party",
4 | generateRobotsTxt: true,
5 | };
6 |
7 | module.exports = NextSitemapConfig;
8 |
--------------------------------------------------------------------------------
/packages/dapp/.example.env:
--------------------------------------------------------------------------------
1 | # EXPOSED VARIABLES (prefixed with NEXT_PUBLIC)
2 | NEXT_PUBLIC_INFURA_ID=
3 | NEXT_PUBLIC_WALLETCONNECT_RPC_URL=
4 | NEXT_PUBLIC_WALLETCONNECT_CHAIN_ID=
5 |
6 | # PRIVATE VARIABLES
7 | NFTSTORAGE_TOKEN=
8 | WEB3STORAGE_TOKEN=
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/fonts.ts:
--------------------------------------------------------------------------------
1 | import { DeepPartial, Theme } from "@chakra-ui/react";
2 |
3 | const fonts: DeepPartial = {
4 | body: "Montserrat",
5 | heading: "Montserrat",
6 | };
7 |
8 | export default fonts;
9 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/borders.ts:
--------------------------------------------------------------------------------
1 | const borders = {
2 | none: 0,
3 | '1px': '1px solid',
4 | '2px': '2px solid',
5 | '4px': '4px solid',
6 | '8px': '8px solid',
7 | }
8 |
9 | export default borders
10 |
--------------------------------------------------------------------------------
/packages/ui/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './components/button';
2 | export * from './components/switch';
3 | export * from './components/text';
4 | export * from './components/box';
5 |
6 | export * from './theme/colors';
7 |
8 | export * from './theme';
9 |
--------------------------------------------------------------------------------
/packages/web/src/styles/customTheme/fonts.ts:
--------------------------------------------------------------------------------
1 | import { DeepPartial, Theme } from "@chakra-ui/react";
2 |
3 | const fonts: DeepPartial = {
4 | body: "Lexend, sans-serif",
5 | heading: "Roboto Mono",
6 | };
7 |
8 | export default fonts;
9 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/blur.ts:
--------------------------------------------------------------------------------
1 | const blur = {
2 | none: '0',
3 | sm: '4px',
4 | base: '8px',
5 | md: '12px',
6 | lg: '16px',
7 | xl: '24px',
8 | '2xl': '40px',
9 | '3xl': '64px',
10 | }
11 |
12 | export default blur
13 |
--------------------------------------------------------------------------------
/packages/dapp/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "dbaeumer.vscode-eslint",
4 | "vivaxy.vscode-conventional-commits",
5 | "dsznajder.es7-react-js-snippets",
6 | "mhutchie.git-graph",
7 | "oderwat.indent-rainbow"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/ui/example/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "es5",
4 | "requirePragma": false,
5 | "arrowParens": "always",
6 | "jsxBracketSameLine": true,
7 | "tabWidth": 2,
8 | "printWidth": 160,
9 | "endOfLine": "lf"
10 | }
11 |
--------------------------------------------------------------------------------
/packages/dapp/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | // NOTE: This file should not be edited
6 | // see https://nextjs.org/docs/basic-features/typescript for more information.
7 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/container.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleObject } from "@chakra-ui/theme-tools"
2 |
3 | const baseStyle: SystemStyleObject = {
4 | w: "100%",
5 | mx: "auto",
6 | maxW: "60ch",
7 | px: "1rem",
8 | }
9 |
10 | export default {
11 | baseStyle,
12 | }
13 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/radius.ts:
--------------------------------------------------------------------------------
1 | const radii = {
2 | none: '0',
3 | sm: '0.125rem',
4 | base: '0.25rem',
5 | md: '0.375rem',
6 | lg: '0.5rem',
7 | xl: '0.75rem',
8 | '2xl': '1rem',
9 | '3xl': '1.5rem',
10 | full: '9999px',
11 | }
12 |
13 | export default radii
14 |
--------------------------------------------------------------------------------
/packages/web/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "dbaeumer.vscode-eslint",
4 | "vivaxy.vscode-conventional-commits",
5 | "coenraads.bracket-pair-colorizer",
6 | "dsznajder.es7-react-js-snippets",
7 | "mhutchie.git-graph",
8 | "oderwat.indent-rainbow"
9 | ]
10 | }
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/components/index.ts:
--------------------------------------------------------------------------------
1 | import Link from "./link";
2 | import Menu from "./menu";
3 | import Modal from "./modal";
4 | import Tabs from "./tabs";
5 | import Text from "./text";
6 |
7 | export default {
8 | Link,
9 | Menu,
10 | Modal,
11 | Tabs,
12 | Text,
13 | };
14 |
--------------------------------------------------------------------------------
/packages/dapp/public/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/web/public/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/constants/countries.ts:
--------------------------------------------------------------------------------
1 | import sc from "states-cities-db";
2 |
3 | const COUNTRIES = sc.getCountries();
4 |
5 | const getCountryTelCode = (country: string) =>
6 | country &&
7 | COUNTRIES.find(({ iso }: { iso: string }) => iso === country).prefix;
8 |
9 | export { COUNTRIES, getCountryTelCode };
10 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/breakpoints.ts:
--------------------------------------------------------------------------------
1 | import { createBreakpoints } from '@chakra-ui/theme-tools'
2 |
3 | const breakpoints = createBreakpoints({
4 | base: '0em',
5 | sm: '30em',
6 | md: '48em',
7 | lg: '62em',
8 | xl: '80em',
9 | '2xl': '96em',
10 | })
11 |
12 | export default breakpoints
13 |
--------------------------------------------------------------------------------
/packages/ui/src/components/switch/Switch.tsx:
--------------------------------------------------------------------------------
1 | import { Switch as ChakraSwitch, SwitchProps } from '@chakra-ui/react';
2 | import React from 'react';
3 |
4 | export { SwitchProps } from '@chakra-ui/react';
5 |
6 | export const Switch = (args: SwitchProps & { children?: React.ReactNode }) => {
7 | return ;
8 | };
9 |
--------------------------------------------------------------------------------
/packages/web/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "CPK",
3 | "name": "Coordination party kit",
4 | "lang": "en",
5 | "start_url": "/",
6 | "background_color": "#FFFFFF",
7 | "theme_color": "#FFFFFF",
8 | "dir": "ltr",
9 | "display": "standalone",
10 | "orientation": "portrait",
11 | "prefer_related_applications": false
12 | }
13 |
--------------------------------------------------------------------------------
/packages/dapp/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "sms",
3 | "name": "scaffold-moonshot-starter",
4 | "lang": "en",
5 | "start_url": "/",
6 | "background_color": "#FFFFFF",
7 | "theme_color": "#FFFFFF",
8 | "dir": "ltr",
9 | "display": "standalone",
10 | "orientation": "portrait",
11 | "prefer_related_applications": false
12 | }
13 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/index.ts:
--------------------------------------------------------------------------------
1 | import foundations from "./foundations";
2 |
3 | const direction = "ltr";
4 |
5 | const config = {
6 | useSystemColorMode: false,
7 | initialColorMode: "light",
8 | cssVarPrefix: "chakra",
9 | };
10 |
11 | export const customTheme = {
12 | direction,
13 | ...foundations,
14 | config,
15 | };
16 |
--------------------------------------------------------------------------------
/packages/subgraph/config/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "mumbai_YourContractAddress": "0x7F1933E4D383e474696DcB545C607Ac8784Cc5CE",
3 | "localhost_YourContractAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
4 | "rinkeby_YourContractAddress": "0xC7C2304baf37Efd486eA35FB2A8ed05313036DC5",
5 | "kovan_YourContractAddress": "0x43B6F70B0eCB72a0f3b2125e9053021759d5Dd14"
6 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@scaffold-eth/scaffold-moonshot-starter",
3 | "license": "GPL-3.0-or-later",
4 | "devDependencies": {
5 | "lerna": "^4.0.0"
6 | },
7 | "workspaces": [
8 | "packages/*"
9 | ],
10 | "scripts": {
11 | "bootstrap": "yarn install; lerna bootstrap;",
12 | "start": "lerna run start --parallel"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/subgraph/src/schema.graphql:
--------------------------------------------------------------------------------
1 | type Purpose @entity {
2 | id: ID!
3 | sender: Sender!
4 | purpose: String!
5 | createdAt: BigInt!
6 | transactionHash: String!
7 | }
8 |
9 | type Sender @entity {
10 | id: ID!
11 | address: Bytes!
12 | purposes: [Purpose!] @derivedFrom(field: "sender")
13 | createdAt: BigInt!
14 | purposeCount: BigInt!
15 | }
16 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/z-index.ts:
--------------------------------------------------------------------------------
1 | const zIndices = {
2 | hide: -1,
3 | auto: 'auto',
4 | base: 0,
5 | docked: 10,
6 | dropdown: 1000,
7 | sticky: 1100,
8 | banner: 1200,
9 | overlay: 1300,
10 | modal: 1400,
11 | popover: 1500,
12 | skipLink: 1600,
13 | toast: 1700,
14 | tooltip: 1800,
15 | }
16 |
17 | export default zIndices
18 |
--------------------------------------------------------------------------------
/packages/schemas/lib/schemas.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.schemas = void 0;
4 | const contributors_schema_1 = require("./contributors/contributors-schema");
5 | exports.schemas = {
6 | dapp: {
7 | Contributors: contributors_schema_1.ContributorsSchema,
8 | },
9 | };
10 | //# sourceMappingURL=schemas.js.map
--------------------------------------------------------------------------------
/packages/web/commitlint.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('@commitlint/types').UserConfig} */
2 | const CommitLintConfiguration = {
3 | extends: ["@commitlint/config-conventional"],
4 | // add your own scope here if needed
5 | // "scope-enum": [2, "always", ["components", "pages", "utils"]],
6 | "scope-case": [2, "always", "kebab-case"],
7 | };
8 |
9 | module.exports = CommitLintConfiguration;
10 |
--------------------------------------------------------------------------------
/packages/dapp/commitlint.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('@commitlint/types').UserConfig} */
2 | const CommitLintConfiguration = {
3 | extends: ["@commitlint/config-conventional"],
4 | // add your own scope here if needed
5 | // "scope-enum": [2, "always", ["components", "pages", "utils"]],
6 | "scope-case": [2, "always", "kebab-case"],
7 | };
8 |
9 | module.exports = CommitLintConfiguration;
10 |
--------------------------------------------------------------------------------
/packages/ui/src/components/button/Button.tsx:
--------------------------------------------------------------------------------
1 | import { Button as ChakraButton, ButtonProps } from '@chakra-ui/react';
2 | import React from 'react';
3 |
4 | export { ButtonProps } from '@chakra-ui/react';
5 |
6 | export const Button = (args: ButtonProps & { children?: React.ReactNode }) => {
7 | return (
8 | {args.children || 'Hello World'}
9 | );
10 | };
11 |
--------------------------------------------------------------------------------
/packages/ui/test/blah.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import * as ReactDOM from 'react-dom';
3 | import { Default as QButton } from '../stories/QButton.stories';
4 |
5 | describe('Button', () => {
6 | it('renders without crashing', () => {
7 | const div = document.createElement('div');
8 | ReactDOM.render(, div);
9 | ReactDOM.unmountComponentAtNode(div);
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/packages/ui/.storybook/preview.js:
--------------------------------------------------------------------------------
1 | import '@fontsource/inter';
2 |
3 | import { ChakraProvider } from '@chakra-ui/react';
4 | import * as React from 'react';
5 | import { customTheme } from '../src/theme';
6 |
7 | const withChakra = (StoryFn) => {
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 |
15 | export const decorators = [withChakra];
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/code.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleObject } from "@chakra-ui/theme-tools"
2 | import Badge from "./badge"
3 |
4 | const { variants, defaultProps } = Badge
5 |
6 | const baseStyle: SystemStyleObject = {
7 | fontFamily: "mono",
8 | fontSize: "sm",
9 | px: "0.2em",
10 | borderRadius: "sm",
11 | }
12 |
13 | export default {
14 | baseStyle,
15 | variants,
16 | defaultProps,
17 | }
18 |
--------------------------------------------------------------------------------
/packages/web/src/components/motion/Box.tsx:
--------------------------------------------------------------------------------
1 | import { chakra, HTMLChakraProps } from "@chakra-ui/react";
2 | import { motion, HTMLMotionProps } from "framer-motion";
3 | import React from "react";
4 | import { Merge } from "types/index";
5 |
6 | type MotionBoxProps = Merge, HTMLMotionProps<"div">>;
7 |
8 | const MotionBox: React.FC = motion(chakra.div);
9 |
10 | export default MotionBox;
11 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/helpers/types/__global.ts:
--------------------------------------------------------------------------------
1 | // hardhat.ts
2 |
3 | // eslint-disable-next-line
4 | import '@nomiclabs/hardhat-ethers';
5 | import { ExternalProvider } from '@ethersproject/providers/src.ts/web3-provider';
6 |
7 | export {};
8 |
9 | declare global {
10 | interface hre {
11 | ethers: ExternalProvider;
12 | }
13 | interface Window {
14 | ethereum: ExternalProvider;
15 | }
16 | }
17 |
18 | export {};
19 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/motion/Box.tsx:
--------------------------------------------------------------------------------
1 | import { chakra, HTMLChakraProps } from "@chakra-ui/react";
2 | import { motion, HTMLMotionProps } from "framer-motion";
3 |
4 | import { Merge } from "core/types/merge";
5 |
6 | type MotionBoxProps = Merge, HTMLMotionProps<"div">>;
7 |
8 | // eslint-disable-next-line import/prefer-default-export
9 | export const MotionBox: React.FC = motion(chakra.div);
10 |
--------------------------------------------------------------------------------
/packages/ui/example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/ui/stories/hooks/useCustomColor.tsx:
--------------------------------------------------------------------------------
1 | import { useColorModeValue } from '@chakra-ui/react';
2 |
3 | function useCustomColor() {
4 | const violetColor = useColorModeValue('violet.800', 'ice');
5 | const titleColor = useColorModeValue('fresh', 'moon');
6 | const accentColorScheme = useColorModeValue('green', 'yellow');
7 |
8 | return { violetColor, titleColor, accentColorScheme };
9 | }
10 |
11 | export default useCustomColor;
12 |
--------------------------------------------------------------------------------
/packages/dapp/README.md:
--------------------------------------------------------------------------------
1 | ## Getting Started
2 |
3 | ```bash
4 | yarn dev
5 | ```
6 |
7 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
8 |
9 | ## References
10 |
11 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
12 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
13 | - [Chakra UI](https://chakra-ui.com)
14 | - [TypeScript](https://www.typescriptlang.org)
15 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/layout/CenteredFrame.tsx:
--------------------------------------------------------------------------------
1 | import { VStack, Box } from "@chakra-ui/react";
2 | import React from "react";
3 |
4 | interface Children {
5 | children: React.ReactNode;
6 | }
7 | const CenteredFrame = ({ children }: Children) => {
8 | return (
9 |
10 | {children}
11 |
12 | );
13 | };
14 |
15 | export default CenteredFrame;
16 |
--------------------------------------------------------------------------------
/packages/web/README.md:
--------------------------------------------------------------------------------
1 | ## Getting Started
2 |
3 | ```bash
4 | yarn dev
5 | ```
6 |
7 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
8 |
9 | ## References
10 |
11 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
12 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
13 | - [Chakra UI](https://chakra-ui.com)
14 | - [TypeScript](https://www.typescriptlang.org)
15 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/custom/Card.tsx:
--------------------------------------------------------------------------------
1 | import { VStack, StackProps } from "@chakra-ui/react";
2 |
3 | function Card(props: StackProps) {
4 | const { children, ...others } = props;
5 | return (
6 |
15 | {children}
16 |
17 | );
18 | }
19 |
20 | export default Card;
21 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/layout/Container.tsx:
--------------------------------------------------------------------------------
1 | import { VStack } from "@chakra-ui/react";
2 | import React from "react";
3 | interface Children {
4 | children: React.ReactNode;
5 | }
6 | const Container = (props: Children) => {
7 | const { children } = props;
8 | return (
9 |
14 | {children}
15 |
16 | );
17 | };
18 |
19 | export default Container;
20 |
--------------------------------------------------------------------------------
/packages/schemas/lib/contributors/contributors-schema.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"contributors-schema.js","sourceRoot":"","sources":["../../src/contributors/contributors-schema.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,+BAA+B;aACtC;SACF;KACF;IACD,WAAW,EAAE;QACX,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,iCAAiC;YAC1C,SAAS,EAAE,GAAG;SACf;KACF;CACF,CAAC"}
--------------------------------------------------------------------------------
/packages/web/src/components/layout/ThemeToggle.tsx:
--------------------------------------------------------------------------------
1 | import { IconButton, useColorMode } from "@chakra-ui/react";
2 | import { RiMoonFill, RiSunLine } from "react-icons/ri";
3 |
4 | const ThemeToggle = () => {
5 | const { colorMode, toggleColorMode } = useColorMode();
6 |
7 | return (
8 | : }
11 | onClick={toggleColorMode}
12 | />
13 | );
14 | };
15 |
16 | export default ThemeToggle;
17 |
--------------------------------------------------------------------------------
/packages/dapp/src/contexts/Web3ProviderNetwork.tsx:
--------------------------------------------------------------------------------
1 | import { createWeb3ReactRoot } from '@web3-react/core'
2 | import { ctxNetworkConstant } from '../core/connectors';
3 |
4 |
5 | const Web3ReactProviderDefault = createWeb3ReactRoot(ctxNetworkConstant)
6 |
7 | const Web3ReactProviderDefaultSSR = ({ children, getLibrary }: any) => {
8 | return (
9 |
10 | {children}
11 |
12 | )
13 | }
14 |
15 | export default Web3ReactProviderDefaultSSR;
--------------------------------------------------------------------------------
/packages/dapp/src/components/custom/CardMedia.tsx:
--------------------------------------------------------------------------------
1 | import { VStack, Image } from "@chakra-ui/react";
2 |
3 | function CardMedia({ children, src, ...others }: any) {
4 | return (
5 |
14 |
15 | {children}
16 |
17 | );
18 | }
19 |
20 | export default CardMedia;
21 |
--------------------------------------------------------------------------------
/packages/web/public/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/android-chrome-256x256.png",
12 | "sizes": "256x256",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/packages/dapp/public/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/android-chrome-256x256.png",
12 | "sizes": "256x256",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/packages/web/src/components/CodeBlock.tsx:
--------------------------------------------------------------------------------
1 | import { CodeProps } from "@chakra-ui/layout";
2 | import { Code } from "@chakra-ui/react";
3 | import React from "react";
4 |
5 | type CodeBlockProps = CodeProps;
6 |
7 | const CodeBlock = (props: CodeBlockProps) => {
8 | return (
9 |
18 | );
19 | };
20 |
21 | export default CodeBlock;
22 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/skip-link.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleFunction } from "@chakra-ui/theme-tools"
2 | import { mode } from "@chakra-ui/theme-tools"
3 |
4 | const baseStyle: SystemStyleFunction = (props) => ({
5 | borderRadius: "md",
6 | fontWeight: "semibold",
7 | _focus: {
8 | boxShadow: "outline",
9 | padding: "1rem",
10 | position: "fixed",
11 | top: "1.5rem",
12 | insetStart: "1.5rem",
13 | bg: mode("white", "gray.700")(props),
14 | },
15 | })
16 |
17 | export default {
18 | baseStyle,
19 | }
20 |
--------------------------------------------------------------------------------
/packages/schemas/lib/contributors/contributors-schema.d.ts:
--------------------------------------------------------------------------------
1 | export declare const ContributorsSchema: {
2 | $schema: string;
3 | title: string;
4 | type: string;
5 | items: {
6 | type: string;
7 | title: string;
8 | properties: {
9 | id: {
10 | $ref: string;
11 | };
12 | };
13 | };
14 | definitions: {
15 | CeramicStreamId: {
16 | type: string;
17 | pattern: string;
18 | maxLength: number;
19 | };
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/list.ts:
--------------------------------------------------------------------------------
1 | import { listAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleObject,
4 | SystemStyleObject,
5 | } from "@chakra-ui/theme-tools"
6 |
7 | const baseStyleIcon: SystemStyleObject = {
8 | marginEnd: "0.5rem",
9 | display: "inline",
10 | verticalAlign: "text-bottom",
11 | }
12 |
13 | const baseStyle: PartsStyleObject = {
14 | container: {},
15 | item: {},
16 | icon: baseStyleIcon,
17 | }
18 |
19 | export default {
20 | parts: parts.keys,
21 | baseStyle,
22 | }
23 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/kbd.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleFunction } from "@chakra-ui/theme-tools"
2 | import { mode } from "@chakra-ui/theme-tools"
3 |
4 | const baseStyle: SystemStyleFunction = (props) => {
5 | return {
6 | bg: mode("gray.100", "whiteAlpha")(props),
7 | borderRadius: "md",
8 | borderWidth: "1px",
9 | borderBottomWidth: "3px",
10 | fontSize: "0.8em",
11 | fontWeight: "bold",
12 | lineHeight: "normal",
13 | px: "0.4em",
14 | whiteSpace: "nowrap",
15 | }
16 | }
17 |
18 | export default {
19 | baseStyle,
20 | }
21 |
--------------------------------------------------------------------------------
/packages/web/src/components/Buttons/DiscordButton.tsx:
--------------------------------------------------------------------------------
1 | import { IconButton, Link } from "@chakra-ui/react";
2 | import { RiDiscordFill } from "react-icons/ri";
3 |
4 | const DiscordButton = () => {
5 | return (
6 |
11 | }
15 | />
16 |
17 | );
18 | };
19 |
20 | export default DiscordButton;
21 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/scripts/watch.ts:
--------------------------------------------------------------------------------
1 | import watch from 'node-watch';
2 | import { exec } from 'child_process';
3 |
4 | const run = () => {
5 | console.log('🛠 Compiling & Deploying...');
6 | exec('yarn deploy', function (error, stdout, stderr) {
7 | console.log(stdout);
8 | if (error) console.log(error);
9 | if (stderr) console.log(stderr);
10 | });
11 | };
12 |
13 | console.log('🔬 Watching Contracts...');
14 | watch('./contracts', { recursive: true }, function (evt, name) {
15 | console.log('%s changed.', name);
16 | run();
17 | });
18 | run();
19 |
--------------------------------------------------------------------------------
/packages/web/src/components/Buttons/TwitterButton.tsx:
--------------------------------------------------------------------------------
1 | import { IconButton, Link } from "@chakra-ui/react";
2 | import { RiTwitterFill } from "react-icons/ri";
3 |
4 | const TwitterButton = () => {
5 | return (
6 |
11 | }
15 | />
16 |
17 | );
18 | };
19 |
20 | export default TwitterButton;
21 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/test/sample-test.ts:
--------------------------------------------------------------------------------
1 | const { expect } = require("chai");
2 |
3 | describe("Greeter", function() {
4 | it("Should return the new greeting once it's changed", async function() {
5 | const Greeter = await ethers.getContractFactory("Greeter");
6 | const greeter = await Greeter.deploy("Hello, world!");
7 |
8 | await greeter.deployed();
9 | expect(await greeter.greet()).to.equal("Hello, world!");
10 |
11 | await greeter.setGreeting("Hola, mundo!");
12 | expect(await greeter.greet()).to.equal("Hola, mundo!");
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/packages/ui/stories/hooks/useColor.tsx:
--------------------------------------------------------------------------------
1 | import { useColorModeValue } from '@chakra-ui/react';
2 | import { colors } from '../../src';
3 |
4 | function useColor() {
5 | const textVioletColor = useColorModeValue(
6 | colors.neutralDark,
7 | colors.neutralLight
8 | );
9 | const titleColor = useColorModeValue(
10 | colors.accentLight[500],
11 | colors.accentDark[500]
12 | );
13 | const accentColorScheme = useColorModeValue('accentLight', 'accentDark');
14 |
15 | return { textVioletColor, titleColor, accentColorScheme };
16 | }
17 |
18 | export default useColor;
19 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/scripts/old js/scripts/watch.js:
--------------------------------------------------------------------------------
1 | const watch = require("node-watch");
2 | const { exec } = require("child_process");
3 |
4 | const run = () => {
5 | console.log("🛠 Compiling & Deploying...");
6 | exec("yarn deploy", function (error, stdout, stderr) {
7 | console.log(stdout);
8 | if (error) console.log(error);
9 | if (stderr) console.log(stderr);
10 | });
11 | };
12 |
13 | console.log("🔬 Watching Contracts...");
14 | watch("./contracts", { recursive: true }, function (evt, name) {
15 | console.log("%s changed.", name);
16 | run();
17 | });
18 | run();
19 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/form-label.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleFunction } from '@chakra-ui/theme-tools';
2 | import { mode } from '@chakra-ui/theme-tools';
3 |
4 | const baseStyle: SystemStyleFunction = (props) => {
5 | return {
6 | fontSize: 'md',
7 | marginEnd: 3,
8 | mb: 2,
9 | color: mode('fog', 'white')(props),
10 | fontWeight: 'medium',
11 | transitionProperty: 'common',
12 | transitionDuration: 'normal',
13 | opacity: 1,
14 | _disabled: {
15 | opacity: 0.4,
16 | },
17 | };
18 | };
19 |
20 | export default {
21 | baseStyle,
22 | };
23 |
--------------------------------------------------------------------------------
/packages/web/src/styles/customTheme/components/button.ts:
--------------------------------------------------------------------------------
1 | import { DeepPartial, Theme } from "@chakra-ui/react";
2 |
3 | const Button: DeepPartial = {
4 | variants: {
5 | solid: {
6 | bg: "purple.400",
7 | color: "violet.50",
8 | type: "button",
9 | borderRadius: "full",
10 | textTransform: "uppercase",
11 | _hover: {
12 | boxShadow: "lg",
13 | fontWeight: "bold",
14 | background: "green.500",
15 | color: "purple.400",
16 | },
17 | },
18 | },
19 | };
20 |
21 | export default Button;
22 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/README.md:
--------------------------------------------------------------------------------
1 | # Chakra UI Theme
2 |
3 | This is a Chakra UI theme generated with [Hypertheme Editor](https://hyperthe.me).
4 |
5 | ## Usage
6 |
7 | Comment line 3 and uncomment line 4 in `styles/customTheme/index.ts`
8 | Use it in inside your ChakraProvider (already set up in this project)
9 |
10 | ```tsx
11 | import * as React from "react";
12 | import { ChakraProvider } from "@chakra-ui/react";
13 | import theme from "./theme";
14 |
15 | function App() {
16 | return ...rest of code;
17 | }
18 |
19 | export default App;
20 | ```
21 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/styles.ts:
--------------------------------------------------------------------------------
1 | import { Styles } from '@chakra-ui/theme-tools';
2 | import useThemeColor from '../hooks/useThemeColor';
3 |
4 | const { getTextColor, getBgColor } = useThemeColor();
5 |
6 | const styles: Styles = {
7 | global: (props) => ({
8 | body: {
9 | fontFamily: 'body',
10 | fontSize: ['16px', '110%', '120%', '140%'],
11 | color: getTextColor(props),
12 | bg: getBgColor(props),
13 | transitionProperty: 'background-color',
14 | transitionDuration: 'normal',
15 | lineHeight: 'base',
16 | },
17 | }),
18 | };
19 |
20 | export default styles;
21 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/Buttons/ThemeToggle.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | IconButton,
3 | useColorMode,
4 | } from "@chakra-ui/react";
5 | import React from "react";
6 | import { RiMoonFill, RiSunLine } from "react-icons/ri";
7 |
8 | const ThemeToggle = () => {
9 | const { colorMode, toggleColorMode } = useColorMode();
10 |
11 | return (
12 | : }
18 | />
19 | );
20 | };
21 |
22 | export default ThemeToggle;
23 |
--------------------------------------------------------------------------------
/packages/ui/example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "useDefineForClassFields": true,
5 | "lib": ["DOM", "DOM.Iterable", "ESNext"],
6 | "allowJs": false,
7 | "skipLibCheck": false,
8 | "esModuleInterop": false,
9 | "allowSyntheticDefaultImports": true,
10 | "strict": true,
11 | "forceConsistentCasingInFileNames": true,
12 | "module": "ESNext",
13 | "moduleResolution": "Node",
14 | "resolveJsonModule": true,
15 | "isolatedModules": true,
16 | "noEmit": true,
17 | "jsx": "react-jsx"
18 | },
19 | "include": ["./src"]
20 | }
21 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/styles.ts:
--------------------------------------------------------------------------------
1 | import { mode, Styles } from "@chakra-ui/theme-tools";
2 | import { colors } from "./colors";
3 |
4 | const styles: Styles = {
5 | global: (props) => ({
6 | body: {
7 | fontFamily: "body",
8 | fontSize: ["16px", "110%", "120%", "140%"],
9 | color: mode(colors.neutralDarkest, colors.neutralLightest)(props),
10 | bg: mode(colors.neutralLightest, colors.neutralDarkest)(props),
11 | transitionProperty: "background-color",
12 | transitionDuration: "normal",
13 | lineHeight: "base",
14 | },
15 | }),
16 | };
17 |
18 | export default styles;
19 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/text.ts:
--------------------------------------------------------------------------------
1 | import { SystemStyleObject, SystemStyleFunction } from '@chakra-ui/theme-tools';
2 | import useThemeColor from '../../hooks/useThemeColor';
3 |
4 | const baseStyle: SystemStyleFunction = (props) => {
5 | const { getPrimaryColor, getInverseTextColor } = useThemeColor();
6 | return {
7 | _selection: {
8 | bg: getPrimaryColor(props),
9 | color: getInverseTextColor(props),
10 | },
11 | };
12 | };
13 |
14 | const sizes: Record = {};
15 |
16 | const defaultProps = {};
17 |
18 | export default {
19 | baseStyle,
20 | sizes,
21 | defaultProps,
22 | };
23 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/components/text.ts:
--------------------------------------------------------------------------------
1 | import { SystemStyleObject, SystemStyleFunction } from '@chakra-ui/theme-tools';
2 | import useThemeColor from "../useThemeColor";
3 |
4 | const baseStyle: SystemStyleFunction = (props) => {
5 | const { getPrimaryColor, getInverseTextColor } = useThemeColor();
6 | return {
7 | _selection: {
8 | bg: getPrimaryColor(props),
9 | color: getInverseTextColor(props),
10 | },
11 | };
12 | };
13 |
14 | const sizes: Record = {};
15 |
16 | const defaultProps = {};
17 |
18 | export default {
19 | baseStyle,
20 | sizes,
21 | defaultProps,
22 | };
23 |
--------------------------------------------------------------------------------
/packages/web/src/components/layout/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@chakra-ui/react";
2 | import { ReactNode } from "react";
3 | import Footer from "./Footer";
4 | import Navbar from "./Navbar";
5 |
6 | type LayoutProps = {
7 | children: ReactNode;
8 | };
9 |
10 | const Layout = ({ children }: LayoutProps) => {
11 | return (
12 | <>
13 |
14 |
15 |
16 | {children}
17 |
18 |
19 |
20 | >
21 | );
22 | };
23 |
24 | export default Layout;
25 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/contracts/Greeter.sol:
--------------------------------------------------------------------------------
1 | //SPDX-License-Identifier: Unlicense
2 | pragma solidity ^0.8.3;
3 |
4 | import "hardhat/console.sol";
5 |
6 |
7 | contract Greeter {
8 | string greeting;
9 |
10 | constructor(string memory _greeting) {
11 | console.log("Deploying a Greeter with greeting:", _greeting);
12 | greeting = _greeting;
13 | }
14 |
15 | function greet() public view returns (string memory) {
16 | return greeting;
17 | }
18 |
19 | function setGreeting(string memory _greeting) public {
20 | console.log("Changing greeting from '%s' to '%s'", greeting, _greeting);
21 | greeting = _greeting;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/ui/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "version": "0.0.0",
4 | "scripts": {
5 | "dev": "vite",
6 | "build": "tsc && vite build",
7 | "serve": "vite preview"
8 | },
9 | "dependencies": {
10 | "@chakra-ui/react": "^1.6.9",
11 | "@emotion/react": "^11.4.1",
12 | "@emotion/styled": "^11.3.0",
13 | "framer-motion": "^4.1.17",
14 | "react": "^17.0.0",
15 | "react-dom": "^17.0.0"
16 | },
17 | "devDependencies": {
18 | "@types/react": "^17.0.0",
19 | "@types/react-dom": "^17.0.0",
20 | "@vitejs/plugin-react": "^1.0.0",
21 | "typescript": "^4.3.2",
22 | "vite": "^2.6.4"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/ui/example/src/App.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | ChakraProvider,
3 | Button as ChakraButton,
4 | Heading,
5 | Box,
6 | } from '@chakra-ui/react';
7 | import { Button, QButton, Switch, customTheme } from '../../.';
8 |
9 | function App() {
10 | return (
11 |
12 |
13 | Custom Design Library
14 |
15 | Hello OK
16 | Hello OK
17 |
18 |
19 |
20 | );
21 | }
22 |
23 | export default App;
24 |
--------------------------------------------------------------------------------
/packages/dapp/.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 |
27 | # local env files
28 | .env.local
29 | .env.development.local
30 | .env.test.local
31 | .env.production.local
32 |
33 | # vercel
34 | .vercel
35 |
36 | **/public/workbox-*.js
37 | **/public/sw.js
38 | **/public/service-worker.js
39 |
40 | # sitemap
41 | robots.txt
42 | sitemap.xml
--------------------------------------------------------------------------------
/packages/web/.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 |
27 | # local env files
28 | .env.local
29 | .env.development.local
30 | .env.test.local
31 | .env.production.local
32 |
33 | # vercel
34 | .vercel
35 |
36 | **/public/workbox-*.js
37 | **/public/sw.js
38 | **/public/service-worker.js
39 |
40 | # sitemap
41 | robots.txt
42 | sitemap.xml
--------------------------------------------------------------------------------
/packages/dapp/next.config.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-var-requires */
2 | const withPWA = require("next-pwa");
3 |
4 | /** @type {import('next').NextConfig} */
5 | module.exports = withPWA({
6 | pwa: {
7 | disable:
8 | process.env.NODE_ENV === "development" ||
9 | process.env.NODE_ENV === "preview" ||
10 | process.env.NODE_ENV === "production",
11 | // delete two lines above to enable PWA in production deployment
12 | // add your own icons to public/manifest.json
13 | // to re-generate manifest.json, you can visit https://tomitm.github.io/appmanifest/
14 | dest: "public",
15 | register: true,
16 | },
17 | reactStrictMode: true,
18 | });
19 |
--------------------------------------------------------------------------------
/packages/web/public/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
16 |
--------------------------------------------------------------------------------
/packages/ui/.storybook/main.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
3 | addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
4 | // https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
5 | typescript: {
6 | check: true, // type-check stories during Storybook build
7 | },
8 | webpackFinal: async (config) => {
9 | return {
10 | ...config,
11 | resolve: {
12 | ...config.resolve,
13 | alias: {
14 | ...config.resolve.alias,
15 | '@emotion/core': '@emotion/react',
16 | 'emotion-theming': '@emotion/react',
17 | },
18 | },
19 | };
20 | },
21 | };
--------------------------------------------------------------------------------
/packages/ui/src/components/button/QButton.tsx:
--------------------------------------------------------------------------------
1 | import { Button as ChakraButton, ButtonProps } from '@chakra-ui/react';
2 | import React from 'react';
3 |
4 | export { ButtonProps } from '@chakra-ui/react';
5 |
6 | export const QButton = (args: ButtonProps & { children?: React.ReactNode }) => {
7 | return (
8 |
20 | {args.children || 'Hello World'}
21 |
22 | );
23 | };
24 |
--------------------------------------------------------------------------------
/packages/ui/stories/QButton.stories.tsx:
--------------------------------------------------------------------------------
1 | import { Meta, Story } from '@storybook/react';
2 | import React from 'react';
3 | import { ButtonProps, QButton } from '../src/components/button';
4 |
5 | const meta: Meta = {
6 | title: 'Components/QButtonExample',
7 | component: QButton,
8 | argTypes: {
9 | text: {
10 | control: {
11 | type: 'text',
12 | },
13 | },
14 | },
15 | parameters: {
16 | controls: { expanded: true },
17 | },
18 | };
19 | export default meta;
20 | const Template: Story = (args) => ;
21 | export const Default = Template.bind({});
22 | Default.args = {
23 | variant: 'solid',
24 | children: 'My Button 1',
25 | };
26 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/index.ts:
--------------------------------------------------------------------------------
1 | import blur from "./blur";
2 | import borders from "./borders";
3 | import breakpoints from "./breakpoints";
4 | import colors from "./colors";
5 | import radii from "./radius";
6 | import shadows from "./shadows";
7 | import sizes from "./sizes";
8 | import spacing from "./spacing";
9 | import transition from "./transition";
10 | import typography from "./typography";
11 | import zIndices from "./z-index";
12 |
13 | const foundations = {
14 | breakpoints,
15 | zIndices,
16 | radii,
17 | blur,
18 | colors,
19 | ...typography,
20 | sizes,
21 | shadows,
22 | space: spacing,
23 | borders,
24 | transition,
25 | };
26 |
27 | export default foundations;
28 |
--------------------------------------------------------------------------------
/packages/schemas/lib/model.json:
--------------------------------------------------------------------------------
1 | {"definitions":{"basicProfile":"kjzl6cwe1jw145cjbeko9kil8g9bxszjhyde21ob8epxuxkaon1izyqsu8wgcic","cryptoAccounts":"kjzl6cwe1jw149z4rvwzi56mjjukafta30kojzktd9dsrgqdgz4wlnceu59f95f","alsoKnownAs":"kjzl6cwe1jw146zfmqa10a5x1vry6au3t362p44uttz4l0k4hi88o41zplhmxnf","contributors":"kjzl6cwe1jw145jxz1kyzh5p5yokbuns3dsx8g7xhu9z2xn47yup53wuauawqc5"},"schemas":{"BasicProfile":"ceramic://k3y52l7qbv1frxt706gqfzmq6cbqdkptzk8uudaryhlkf6ly9vx21hqu4r6k1jqio","CryptoAccounts":"ceramic://k3y52l7qbv1frypussjburqg4fykyyycfu0p9znc75lv2t5cg4xaslhagkd7h7mkg","AlsoKnownAs":"ceramic://k3y52l7qbv1fryojt8n8cw2k04p9wp67ly59iwqs65dejso566fij5wsdrb871yio","Contributors":"ceramic://k3y52l7qbv1frxpxunozrl751yh73vheie7vyd5agv2rl8t49rtsg8f7mw1scciyo"},"tiles":{}}
--------------------------------------------------------------------------------
/packages/schemas/lib/schemas.d.ts:
--------------------------------------------------------------------------------
1 | export declare const schemas: {
2 | dapp: {
3 | Contributors: {
4 | $schema: string;
5 | title: string;
6 | type: string;
7 | items: {
8 | type: string;
9 | title: string;
10 | properties: {
11 | id: {
12 | $ref: string;
13 | };
14 | };
15 | };
16 | definitions: {
17 | CeramicStreamId: {
18 | type: string;
19 | pattern: string;
20 | maxLength: number;
21 | };
22 | };
23 | };
24 | };
25 | };
26 |
--------------------------------------------------------------------------------
/packages/ui/src/components/text/Title.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Text as ChakraText,
3 | TextProps,
4 | useColorModeValue,
5 | } from '@chakra-ui/react';
6 | import React from 'react';
7 | import { colors } from '../../theme/colors';
8 |
9 | export { TextProps } from '@chakra-ui/react';
10 |
11 | export const Title = (args: TextProps & { children?: React.ReactNode }) => {
12 | const titleColor = useColorModeValue(
13 | colors.accentLight[500],
14 | colors.accentDark[500]
15 | );
16 |
17 | return (
18 |
25 | {args.children || 'Hello World'}
26 |
27 | );
28 | };
29 |
--------------------------------------------------------------------------------
/packages/web/src/hooks/useCustomColor.tsx:
--------------------------------------------------------------------------------
1 | import { useColorModeValue } from "@chakra-ui/react";
2 | import { colors } from "@moonshotcollective/ui";
3 |
4 | function useCustomColor() {
5 | const primaryColor = useColorModeValue(
6 | colors.primary[500],
7 | colors.primary[200]
8 | );
9 | const getOverBgColor = useColorModeValue(
10 | colors.neutralLighter,
11 | colors.neutralDarker
12 | );
13 | const accentColor = useColorModeValue(
14 | colors.accentLight[500],
15 | colors.accentDark[300]
16 | );
17 | const accentColorScheme = useColorModeValue("accentLight", "accentDark");
18 |
19 | return { primaryColor, getOverBgColor, accentColor, accentColorScheme };
20 | }
21 |
22 | export default useCustomColor;
23 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/spacing.ts:
--------------------------------------------------------------------------------
1 | const spacing = {
2 | 1: '0.25rem',
3 | 2: '0.5rem',
4 | 3: '0.75rem',
5 | 4: '1rem',
6 | 5: '1.25rem',
7 | 6: '1.5rem',
8 | 7: '1.75rem',
9 | 8: '2rem',
10 | 9: '2.25rem',
11 | 10: '2.5rem',
12 | 12: '3rem',
13 | 14: '3.5rem',
14 | 16: '4rem',
15 | 20: '5rem',
16 | 24: '6rem',
17 | 28: '7rem',
18 | 32: '8rem',
19 | 36: '9rem',
20 | 40: '10rem',
21 | 44: '11rem',
22 | 48: '12rem',
23 | 52: '13rem',
24 | 56: '14rem',
25 | 60: '15rem',
26 | 64: '16rem',
27 | 72: '18rem',
28 | 80: '20rem',
29 | 96: '24rem',
30 | px: '1px',
31 | '0.5': '0.125rem',
32 | '1.5': '0.375rem',
33 | '2.5': '0.625rem',
34 | '3.5': '0.875rem',
35 | }
36 |
37 | export default spacing
38 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/index.ts:
--------------------------------------------------------------------------------
1 | import { extendTheme, withDefaultColorScheme } from '@chakra-ui/react';
2 | import { colors } from './colors';
3 | import components from './components';
4 | import fonts from './fonts';
5 | import layerStyles from './layer-styles';
6 | import styles from './styles';
7 | import textStyles from './text-styles';
8 | import { colorScheme } from './default-props';
9 |
10 | const config = {
11 | initialColorMode: 'dark',
12 | useSystemColorMode: false,
13 | };
14 |
15 | export const customTheme = extendTheme(
16 | {
17 | config,
18 | components,
19 | colors,
20 | fonts,
21 | styles,
22 | layerStyles,
23 | textStyles,
24 | },
25 | withDefaultColorScheme({ colorScheme: colorScheme })
26 | );
27 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/layout/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@chakra-ui/react";
2 | import { ReactNode } from "react";
3 |
4 | import Footer from "./Footer";
5 | import Navbar from "./Navbar";
6 | import BottomBar from "../../../../dapp/src/components/layout/BottomBar";
7 |
8 | type LayoutProps = {
9 | children: ReactNode;
10 | };
11 |
12 | const Layout = ({ children }: LayoutProps) => {
13 | return (
14 | <>
15 |
16 |
17 |
18 | {children}
19 |
20 |
21 |
22 |
23 | >
24 | );
25 | };
26 |
27 | export default Layout;
28 |
--------------------------------------------------------------------------------
/packages/dapp/src/components/custom/NotReviewerCard.tsx:
--------------------------------------------------------------------------------
1 | import { Text, Heading, VStack, Button } from "@chakra-ui/react";
2 | import { useRouter } from "next/router";
3 |
4 | function NotReviewerCard() {
5 | const router = useRouter();
6 | return (
7 |
8 | You shall not pass!
9 |
10 | Sorry, this address is not a reviewer If you think this is an error,
11 | please contact our support team.
12 |
13 |
16 |
17 | );
18 | }
19 |
20 | export default NotReviewerCard;
21 |
--------------------------------------------------------------------------------
/packages/subgraph/src/subgraph.template.yaml:
--------------------------------------------------------------------------------
1 | specVersion: 0.0.2
2 | schema:
3 | file: ./src/schema.graphql
4 | dataSources:
5 | - kind: ethereum/contract
6 | name: YourContract
7 | network: localhost
8 | source:
9 | address: "{{localhost_YourContractAddress}}"
10 | abi: YourContract
11 | startBlock: 1
12 | mapping:
13 | kind: ethereum/events
14 | apiVersion: 0.0.4
15 | language: wasm/assemblyscript
16 | entities:
17 | - Purpose
18 | - Sender
19 | abis:
20 | - name: YourContract
21 | file: ./abis/localhost_YourContract.json
22 | eventHandlers:
23 | - event: SetPurpose(address,string)
24 | handler: handleSetPurpose
25 | file: ./src/mapping.ts
26 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/link.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleFunction } from '@chakra-ui/theme-tools';
2 | import { mode } from '@chakra-ui/theme-tools';
3 | import { colors } from '../colors';
4 |
5 | const baseStyle: SystemStyleFunction = (props) => {
6 | return {
7 | transitionProperty: 'common',
8 | transitionDuration: 'fast',
9 | transitionTimingFunction: 'ease-out',
10 | cursor: 'pointer',
11 | textDecoration: 'none',
12 | outline: 'none',
13 | color: 'inherit',
14 | _hover: {
15 | color: mode(colors.primary[500], colors.primary[500])(props),
16 | textDecoration: 'none',
17 | },
18 | _focus: {
19 | boxShadow: 'none',
20 | },
21 | };
22 | };
23 |
24 | export default {
25 | baseStyle,
26 | };
27 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/spinner.ts:
--------------------------------------------------------------------------------
1 | import { cssVar, SystemStyleObject } from "@chakra-ui/theme-tools"
2 |
3 | const $size = cssVar("spinner-size")
4 |
5 | const baseStyle: SystemStyleObject = {
6 | width: [$size.reference],
7 | height: [$size.reference],
8 | }
9 |
10 | const sizes: Record = {
11 | xs: {
12 | [$size.variable]: "0.75rem",
13 | },
14 | sm: {
15 | [$size.variable]: "1rem",
16 | },
17 | md: {
18 | [$size.variable]: "1.5rem",
19 | },
20 | lg: {
21 | [$size.variable]: "2rem",
22 | },
23 | xl: {
24 | [$size.variable]: "3rem",
25 | },
26 | }
27 |
28 | const defaultProps = {
29 | size: "md",
30 | }
31 |
32 | export default {
33 | baseStyle,
34 | sizes,
35 | defaultProps,
36 | }
37 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/breadcrumb.ts:
--------------------------------------------------------------------------------
1 | import { breadcrumbAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleObject,
4 | SystemStyleObject,
5 | } from "@chakra-ui/theme-tools"
6 |
7 | const baseStyleLink: SystemStyleObject = {
8 | transitionProperty: "common",
9 | transitionDuration: "fast",
10 | transitionTimingFunction: "ease-out",
11 | cursor: "pointer",
12 | textDecoration: "none",
13 | outline: "none",
14 | color: "inherit",
15 | _hover: {
16 | textDecoration: "underline",
17 | },
18 | _focus: {
19 | boxShadow: "outline",
20 | },
21 | }
22 |
23 | const baseStyle: PartsStyleObject = {
24 | link: baseStyleLink,
25 | }
26 |
27 | export default {
28 | parts: parts.keys,
29 | baseStyle,
30 | }
31 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/tooltip.ts:
--------------------------------------------------------------------------------
1 | import { mode, cssVar, SystemStyleFunction } from '@chakra-ui/theme-tools';
2 |
3 | const $bg = cssVar('tooltip-bg');
4 | const $arrowBg = cssVar('popper-arrow-bg');
5 |
6 | const baseStyle: SystemStyleFunction = (props) => {
7 | const bg = mode('gray.700', 'gray.300')(props);
8 | return {
9 | [$bg.variable]: `colors.${bg}`,
10 | px: '8px',
11 | py: '2px',
12 | bg: [$bg.reference],
13 | [$arrowBg.variable]: [$bg.reference],
14 | color: mode('whiteAlpha.900', 'gray.900')(props),
15 | borderRadius: 'sm',
16 | fontWeight: 'medium',
17 | fontSize: 'sm',
18 | boxShadow: 'md',
19 | maxW: '320px',
20 | zIndex: 'tooltip',
21 | };
22 | };
23 |
24 | export default {
25 | baseStyle,
26 | };
27 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/components/link.ts:
--------------------------------------------------------------------------------
1 | import type { SystemStyleFunction } from '@chakra-ui/theme-tools';
2 | import { mode } from '@chakra-ui/theme-tools';
3 | import { colors } from '../colors';
4 |
5 | const baseStyle: SystemStyleFunction = (props) => {
6 | return {
7 | transitionProperty: 'common',
8 | transitionDuration: 'fast',
9 | transitionTimingFunction: 'ease-out',
10 | cursor: 'pointer',
11 | textDecoration: 'none',
12 | outline: 'none',
13 | color: 'inherit',
14 | _hover: {
15 | color: mode(colors.primary[500], colors.primary[500])(props),
16 | textDecoration: 'none',
17 | },
18 | _focus: {
19 | boxShadow: 'none',
20 | },
21 | };
22 | };
23 |
24 | export default {
25 | baseStyle,
26 | };
27 |
--------------------------------------------------------------------------------
/packages/dapp/.versionrc:
--------------------------------------------------------------------------------
1 | {
2 | "types": [
3 | {
4 | "type": "feat",
5 | "section": "Features"
6 | },
7 | {
8 | "type": "fix",
9 | "section": "Bug Fixes"
10 | },
11 | {
12 | "type": "refactor",
13 | "section": "Improvements"
14 | },
15 | {
16 | "type": "test",
17 | "section": "Tests",
18 | "hidden": true
19 | },
20 | {
21 | "type": "chore",
22 | "section": "Chores",
23 | "hidden": true
24 | },
25 | {
26 | "type": "build",
27 | "section": "Build System",
28 | "hidden": true
29 | },
30 | {
31 | "type": "revert",
32 | "section": "Reverts",
33 | "hidden": true
34 | },
35 | {
36 | "type": "ci",
37 | "hidden": true
38 | }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/packages/ui/stories/ColorMode.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Flex,
3 | IconButton,
4 | useColorMode,
5 | useColorModeValue,
6 | } from '@chakra-ui/react';
7 | import { FaMoon, FaSun } from 'react-icons/fa';
8 |
9 | export const ColorModeToggleBar = () => {
10 | const { toggleColorMode } = useColorMode();
11 | const SwitchIcon = useColorModeValue(FaMoon, FaSun);
12 | const nextMode = useColorModeValue('dark', 'light');
13 |
14 | return (
15 |
16 | }
25 | />
26 |
27 | );
28 | };
29 |
--------------------------------------------------------------------------------
/packages/web/.versionrc:
--------------------------------------------------------------------------------
1 | {
2 | "types": [
3 | {
4 | "type": "feat",
5 | "section": "Features"
6 | },
7 | {
8 | "type": "fix",
9 | "section": "Bug Fixes"
10 | },
11 | {
12 | "type": "refactor",
13 | "section": "Improvements"
14 | },
15 | {
16 | "type": "test",
17 | "section": "Tests",
18 | "hidden": true
19 | },
20 | {
21 | "type": "chore",
22 | "section": "Chores",
23 | "hidden": true
24 | },
25 | {
26 | "type": "build",
27 | "section": "Build System",
28 | "hidden": true
29 | },
30 | {
31 | "type": "revert",
32 | "section": "Reverts",
33 | "hidden": true
34 | },
35 | {
36 | "type": "ci",
37 | "hidden": true
38 | }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/packages/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "strict": true,
12 | "forceConsistentCasingInFileNames": true,
13 | "noEmit": true,
14 | "esModuleInterop": true,
15 | "module": "esnext",
16 | "moduleResolution": "node",
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "jsx": "preserve",
20 | "baseUrl": "src",
21 | "incremental": true
22 | },
23 | "include": [
24 | "next-env.d.ts",
25 | "**/*.ts",
26 | "**/*.tsx",
27 | "src",
28 | "commitlint.config.js",
29 | "../dapp/dapp"
30 | ],
31 | "exclude": [
32 | "node_modules"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/packages/dapp/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "downlevelIteration": true,
12 | "strict": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "noEmit": true,
15 | "esModuleInterop": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "jsx": "preserve",
21 | "baseUrl": "src",
22 | "incremental": true
23 | },
24 | "include": [
25 | "next-env.d.ts",
26 | "**/*.ts",
27 | "**/*.tsx",
28 | "src",
29 | "commitlint.config.js"
30 | ],
31 | "exclude": [
32 | "node_modules"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/packages/schemas/lib/contributors/contributors-schema.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.ContributorsSchema = void 0;
4 | exports.ContributorsSchema = {
5 | $schema: "http://json-schema.org/draft-07/schema#",
6 | title: "Contributors",
7 | type: "array",
8 | items: {
9 | type: "object",
10 | title: "ContributorItem",
11 | properties: {
12 | id: {
13 | $ref: "#/definitions/CeramicStreamId",
14 | },
15 | },
16 | },
17 | definitions: {
18 | CeramicStreamId: {
19 | type: "string",
20 | pattern: "^ceramic://.+(\\\\?version=.+)?",
21 | maxLength: 150,
22 | },
23 | },
24 | };
25 | //# sourceMappingURL=contributors-schema.js.map
--------------------------------------------------------------------------------
/packages/dapp/src/components/Navigation/LinkItem.tsx:
--------------------------------------------------------------------------------
1 | import { useRouter } from 'next/router';
2 | import NextLink from "next/link";
3 | import { Link } from "@chakra-ui/react";
4 |
5 | const LinkItem = ({ href, _target, children, ...props }: any) => {
6 | const { pathname } = useRouter();
7 | let isActive = false;
8 |
9 | if (href !== "/") {
10 | const [, path] = href.split("/");
11 | isActive = pathname.includes(path);
12 | } else if (href === pathname) {
13 | isActive = true;
14 | }
15 |
16 | return (
17 |
18 |
24 | {children}
25 |
26 |
27 | );
28 | };
29 |
30 | export default LinkItem;
--------------------------------------------------------------------------------
/packages/dapp/src/components/custom/NotConnectedCard.tsx:
--------------------------------------------------------------------------------
1 | import { Text, Heading, VStack, Box, Button } from "@chakra-ui/react";
2 | import { useContext } from 'react';
3 | import { Web3Context } from '../../contexts/Web3Provider';
4 |
5 | import ConnectButton from "../Buttons/ConnectButton";
6 |
7 | function NotConnectedCard() {
8 | const { connectWeb3 } = useContext(Web3Context)
9 | return (
10 |
11 | Wallet not connected
12 |
13 | Please connect a wallet to continue.
14 |
15 |
16 |
17 |
18 |
19 | );
20 | }
21 |
22 | export default NotConnectedCard;
23 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/transition.ts:
--------------------------------------------------------------------------------
1 | const transition = {
2 | property: {
3 | common: 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform',
4 | colors: 'background-color, border-color, color, fill, stroke',
5 | dimensions: 'width, height',
6 | position: 'left, right, top, bottom',
7 | background: 'background-color, background-image, background-position',
8 | },
9 | easing: {
10 | 'ease-in': 'cubic-bezier(0.4, 0, 1, 1)',
11 | 'ease-out': 'cubic-bezier(0, 0, 0.2, 1)',
12 | 'ease-in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',
13 | },
14 | duration: {
15 | 'ultra-fast': '50ms',
16 | faster: '100ms',
17 | fast: '150ms',
18 | normal: '200ms',
19 | slow: '300ms',
20 | slower: '400ms',
21 | 'ultra-slow': '500ms',
22 | },
23 | }
24 |
25 | export default transition
26 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/form-error.ts:
--------------------------------------------------------------------------------
1 | import { formErrorAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleFunction,
4 | SystemStyleFunction,
5 | } from "@chakra-ui/theme-tools"
6 | import { mode } from "@chakra-ui/theme-tools"
7 |
8 | const baseStyleText: SystemStyleFunction = (props) => {
9 | return {
10 | color: mode("red.500", "red.300")(props),
11 | mt: 2,
12 | fontSize: "sm",
13 | }
14 | }
15 |
16 | const baseStyleIcon: SystemStyleFunction = (props) => {
17 | return {
18 | marginEnd: "0.5em",
19 | color: mode("red.500", "red.300")(props),
20 | }
21 | }
22 |
23 | const baseStyle: PartsStyleFunction = (props) => ({
24 | text: baseStyleText(props),
25 | icon: baseStyleIcon(props),
26 | })
27 |
28 | export default {
29 | parts: parts.keys,
30 | baseStyle,
31 | }
32 |
--------------------------------------------------------------------------------
/packages/web/public/chakra-ui-logomark-colored.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/divider.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | SystemStyleObject,
3 | SystemStyleFunction,
4 | } from '@chakra-ui/theme-tools';
5 | import useThemeColor from '../../hooks/useThemeColor';
6 |
7 | const baseStyle: SystemStyleFunction = (props) => {
8 | const { getBorderColor } = useThemeColor();
9 | return {
10 | opacity: 0.6,
11 | borderColor: 'inherit',
12 | bg: getBorderColor(props),
13 | };
14 | };
15 |
16 | const variantSolid: SystemStyleObject = {
17 | borderStyle: 'solid',
18 | };
19 |
20 | const variantDashed: SystemStyleObject = {
21 | borderStyle: 'dashed',
22 | };
23 |
24 | const variants = {
25 | solid: variantSolid,
26 | dashed: variantDashed,
27 | };
28 |
29 | const defaultProps = {
30 | variant: 'solid',
31 | };
32 |
33 | export default {
34 | baseStyle,
35 | variants,
36 | defaultProps,
37 | };
38 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/editable.ts:
--------------------------------------------------------------------------------
1 | import { editableAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleObject,
4 | SystemStyleObject,
5 | } from "@chakra-ui/theme-tools"
6 |
7 | const baseStylePreview: SystemStyleObject = {
8 | borderRadius: "md",
9 | py: "3px",
10 | transitionProperty: "common",
11 | transitionDuration: "normal",
12 | }
13 |
14 | const baseStyleInput: SystemStyleObject = {
15 | borderRadius: "md",
16 | py: "3px",
17 | transitionProperty: "common",
18 | transitionDuration: "normal",
19 | width: "full",
20 | _focus: { boxShadow: "outline" },
21 | _placeholder: { opacity: 0.6 },
22 | }
23 |
24 | const baseStyle: PartsStyleObject = {
25 | preview: baseStylePreview,
26 | input: baseStyleInput,
27 | }
28 |
29 | export default {
30 | parts: parts.keys,
31 | baseStyle,
32 | }
33 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/shadows.ts:
--------------------------------------------------------------------------------
1 | const shadows = {
2 | xs: '0 0 0 1px rgba(0, 0, 0, 0.05)',
3 | sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
4 | base: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
5 | md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
6 | lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
7 | xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
8 | '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
9 | outline: '0 0 0 3px rgba(66, 153, 225, 0.6)',
10 | inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
11 | none: 'none',
12 | 'dark-lg': 'rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px',
13 | largeSoft: 'rgba(60, 64, 67, 0.15) 0px 2px 10px 6px;',
14 | }
15 |
16 | export default shadows
17 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/example.env:
--------------------------------------------------------------------------------
1 | # This is a template for the environment variables you'll need for
2 | # deployment on Rinkeby and mainnet
3 |
4 | # To use, copy this file, rename it .env, and fill in the values
5 | # Everything will be interpreted as a string by JavaScript even though
6 | # you should not wrap values in quotation marks
7 |
8 | # Infura endpoints should be passed in WITHOUT the rest of the url
9 | # Private keys should be pasted WITHOUT the 0x prefix
10 |
11 | # Example
12 | INFURA_KEY=582dabbadbeef8...
13 | EXAMPLE_DEPLOYER_PRIVATE_KEY=deadbeef01EEdf972aBB...
14 |
15 | # Rinkeby
16 | RINKEBY_DEPLOYER_PRIVATE_KEY=
17 |
18 | # Kovan
19 | KOVAN_DEPLOYER_PRIVATE_KEY=
20 |
21 | # mainnet
22 | MAINNET_DEPLOYER_PRIVATE_KEY=
23 |
24 | # Ropsten
25 | ROPSTEN_DEPLOYER_PRIVATE_KEY=
26 |
27 | # Goerli
28 | GOERLI_DEPLOYER_PRIVATE_KEY=
29 |
30 | # xDai
31 | XDAI_DEPLOYER_PRIVATE_KEY=
--------------------------------------------------------------------------------
/packages/subgraph/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@scaffold-eth/subgraph",
3 | "license": "UNLICENSED",
4 | "version": "1.0.1",
5 | "private": true,
6 | "scripts": {
7 | "codegen": "graph codegen",
8 | "build": "graph build",
9 | "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ GITHUB_USERNAME/your-contract",
10 | "create-local": "graph create --node http://localhost:8020/ scaffold-eth/your-contract",
11 | "remove-local": "graph remove --node http://localhost:8020/ scaffold-eth/your-contract",
12 | "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 scaffold-eth/your-contract"
13 | },
14 | "dependencies": {
15 | "@graphprotocol/graph-cli": "^0.22.2",
16 | "@graphprotocol/graph-ts": "^0.22.0"
17 | },
18 | "devDependencies": {
19 | "mustache": "^4.2.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "jsx": "react",
4 | "incremental": true,
5 | "target": "ES2019",
6 | "module": "commonjs",
7 | "declaration": true,
8 | "sourceMap": true,
9 | "resolveJsonModule": true,
10 | "esModuleInterop": true,
11 | /* Strict Type-Checking Options */
12 | "strict": true,
13 | "noImplicitAny": true,
14 | "strictNullChecks": true,
15 | "strictFunctionTypes": true,
16 | "strictBindCallApply": true,
17 | "strictPropertyInitialization": true,
18 | "noImplicitThis": true,
19 | /* Additional Checks */
20 | "noUnusedLocals": true,
21 | "noUnusedParameters": true,
22 | /* Module Resolution Options */
23 | "moduleResolution": "node",
24 | /* Advanced Options */
25 | "skipLibCheck": true,
26 | "forceConsistentCasingInFileNames": true
27 | },
28 | "exclude": ["node_modules"]
29 | }
30 |
--------------------------------------------------------------------------------
/packages/web/src/components/Circles/Circle.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from "@chakra-ui/layout";
2 | import { background } from "@chakra-ui/styled-system";
3 | import React from "react";
4 |
5 | export const Circle = ({
6 | text,
7 | textColor,
8 | w,
9 | h,
10 | backgroundColor,
11 | borderColor,
12 | borderWidth,
13 | ...props
14 | }: {
15 | text: string;
16 | textColor: string;
17 | borderColor: string;
18 | borderWidth: string;
19 | backgroundColor: string;
20 | w: string;
21 | h: string;
22 | }) => {
23 | return (
24 |
36 | {text}
37 |
38 | );
39 | };
40 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/connectors/getLibrary.ts:
--------------------------------------------------------------------------------
1 | import { Web3Provider } from "@ethersproject/providers";
2 | import { SupportedChainId } from "./chains";
3 |
4 | const NETWORK_POLLING_INTERVALS: { [chainId: number]: number } = {
5 | // poll every 15s
6 | [SupportedChainId.ARBITRUM_ONE]: 15_000,
7 | [SupportedChainId.ARBITRUM_RINKEBY]: 15_000,
8 | [SupportedChainId.OPTIMISM]: 15_000,
9 | [SupportedChainId.OPTIMISTIC_KOVAN]: 15_000,
10 | };
11 |
12 | export default function getLibrary(provider: any): Web3Provider {
13 | const library = new Web3Provider(provider, "any");
14 | library.pollingInterval = 15_000;
15 | library.detectNetwork().then((network) => {
16 | const networkPollingInterval = NETWORK_POLLING_INTERVALS[network.chainId];
17 | if (networkPollingInterval) {
18 | console.debug("Setting polling interval", networkPollingInterval);
19 | library.pollingInterval = networkPollingInterval;
20 | }
21 | });
22 | return library;
23 | }
24 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/index.ts:
--------------------------------------------------------------------------------
1 | import { extendTheme } from "@chakra-ui/react";
2 |
3 | import { customTheme } from "@moonshotcollective/ui";
4 | import { colors } from "./colors";
5 | import styles from "./styles";
6 | import layerStyles from "./layer-styles";
7 | import fonts from "./fonts";
8 | import { borderRadius } from "./default-values";
9 | import components from "./components";
10 |
11 | const myTheme = {
12 | components: {
13 | ...components,
14 | Text: {
15 | baseStyle: {
16 | textTransform: "none",
17 | },
18 | },
19 | Button: {
20 | baseStyle: {
21 | fontWeight: "bold", // Normally, it is "semibold"
22 | borderRadius: borderRadius,
23 | textTransform: "none",
24 | },
25 | },
26 | },
27 | colors,
28 | fonts,
29 | styles,
30 | layerStyles,
31 | };
32 |
33 | const theme = extendTheme(
34 | customTheme
35 | // , myTheme
36 | );
37 |
38 | export default theme;
39 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/helpers/types/hardhat-type-extensions.ts:
--------------------------------------------------------------------------------
1 | import { HardhatEthersHelpers } from '@nomiclabs/hardhat-ethers/dist/src/types';
2 | import { ethers } from 'ethers';
3 |
4 | import '@typechain/hardhat';
5 | import '@nomiclabs/hardhat-waffle';
6 | import '@nomiclabs/hardhat-ethers';
7 | import '@tenderly/hardhat-tenderly';
8 | import 'hardhat-deploy';
9 |
10 | import { HardhatRuntimeEnvironment } from 'hardhat/types';
11 | import 'hardhat-deploy/src/type-extensions';
12 |
13 | export type ContractJson = {
14 | _format: string;
15 | contractName: string;
16 | abi: Record[];
17 | bytecode: string;
18 | deployedBytecode: string;
19 | linkReferences: Record;
20 | deployedLinkReferences: Record;
21 | address: string;
22 | };
23 |
24 | export type { HardhatRuntimeEnvironment as HardhatRuntimeEnvironmentExtended };
25 |
26 | export type TEthers = typeof ethers & HardhatEthersHelpers;
27 |
--------------------------------------------------------------------------------
/packages/ui/src/hooks/useThemeColor.tsx:
--------------------------------------------------------------------------------
1 | import { mode } from '@chakra-ui/theme-tools';
2 | import { colors } from '../theme/colors';
3 |
4 | function useThemeColor() {
5 | const getTextColor = mode(colors.neutralDarkest, colors.neutralLightest);
6 | const getInverseTextColor = mode(
7 | colors.neutralLightest,
8 | colors.neutralDarkest
9 | );
10 | const getBgColor = mode(colors.neutralLightest, colors.neutralDarkest);
11 | const getOverBgColor = mode(colors.neutralLighter, colors.neutralDarker);
12 | const getHover2Color = mode(colors.neutralLight, colors.neutralDark);
13 | const getBorderColor = mode(colors.borderLight, colors.borderDark);
14 | const getPrimaryColor = mode(colors.primary[500], colors.primary[200]);
15 |
16 | return {
17 | getTextColor,
18 | getInverseTextColor,
19 | getBgColor,
20 | getOverBgColor,
21 | getHover2Color,
22 | getBorderColor,
23 | getPrimaryColor,
24 | };
25 | }
26 |
27 | export default useThemeColor;
28 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/useThemeColor.tsx:
--------------------------------------------------------------------------------
1 | import { mode } from '@chakra-ui/theme-tools';
2 | import { colors } from './colors';
3 |
4 | function useThemeColor() {
5 | const getTextColor = mode(colors.neutralDarkest, colors.neutralLightest);
6 | const getInverseTextColor = mode(
7 | colors.neutralLightest,
8 | colors.neutralDarkest
9 | );
10 | const getBgColor = mode(colors.neutralLightest, colors.neutralDarkest);
11 | const getOverBgColor = mode(colors.neutralLighter, colors.neutralDarker);
12 | const getHover2Color = mode(colors.neutralLight, colors.neutralDark);
13 | const getBorderColor = mode(colors.borderLight, colors.borderDark);
14 | const getPrimaryColor = mode(colors.primary[500], colors.primary[200]);
15 |
16 | return {
17 | getTextColor,
18 | getInverseTextColor,
19 | getBgColor,
20 | getOverBgColor,
21 | getHover2Color,
22 | getBorderColor,
23 | getPrimaryColor,
24 | };
25 | }
26 |
27 | export default useThemeColor;
28 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/form.ts:
--------------------------------------------------------------------------------
1 | import { formAnatomy as parts } from "@chakra-ui/anatomy";
2 | import type {
3 | PartsStyleFunction,
4 | SystemStyleFunction,
5 | } from "@chakra-ui/theme-tools";
6 | import { mode } from "@chakra-ui/theme-tools";
7 |
8 | const baseStyleRequiredIndicator: SystemStyleFunction = (props) => {
9 | return {
10 | marginStart: 1,
11 | color: mode("pink.500", "pink.300")(props),
12 | };
13 | };
14 |
15 | const baseStyleHelperText: SystemStyleFunction = (props) => {
16 | return {
17 | mt: 2,
18 | color: mode("gray.500", "whiteAlpha.600")(props),
19 | lineHeight: "normal",
20 | fontSize: "sm",
21 | };
22 | };
23 |
24 | const baseStyle: PartsStyleFunction = (props) => ({
25 | container: { width: "100%", position: "relative" },
26 | requiredIndicator: baseStyleRequiredIndicator(props),
27 | helperText: baseStyleHelperText(props),
28 | });
29 |
30 | export default {
31 | parts: parts.keys,
32 | baseStyle,
33 | };
34 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/helpers.ts:
--------------------------------------------------------------------------------
1 | import CID from "cids";
2 | import { ethers } from "ethers";
3 |
4 | function capitalize([first, ...rest]: string) {
5 | return first.toUpperCase() + rest.join("").toLowerCase();
6 | }
7 |
8 | function convertToKebabCase(string: string) {
9 | return string.replace(/\s+/g, "-").toLowerCase();
10 | }
11 |
12 | function splitCIDS(cids: string[]) {
13 | const base16cids = Array(cids.length);
14 | const firstParts = Array(cids.length);
15 | const secondParts = Array(cids.length);
16 | cids.forEach((elem, index) => {
17 | base16cids[index] = new CID(elem).toV1().toString("base16");
18 | firstParts[index] = `0x${base16cids[index].slice(1, 9)}`;
19 | secondParts[index] = `0x${base16cids[index].slice(9)}`;
20 | });
21 | return { base16cids, firstParts, secondParts };
22 | }
23 |
24 | function hexToString(balance: ethers.BigNumber) {
25 | return ethers.utils.formatEther(balance);
26 | }
27 |
28 | export { capitalize, convertToKebabCase, splitCIDS, hexToString };
29 |
--------------------------------------------------------------------------------
/packages/web/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Button, Heading, Image } from "@chakra-ui/react";
2 | import Link from "next/link";
3 |
4 | import MotionBox from "components/motion/Box";
5 |
6 | const Page404 = () => {
7 | return (
8 |
9 |
15 |
19 |
20 |
21 |
22 |
23 | Page not Found.
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | );
33 | };
34 |
35 | export default Page404;
36 |
--------------------------------------------------------------------------------
/packages/dapp/src/contexts/Web3Reducer.ts:
--------------------------------------------------------------------------------
1 | import { ethers } from "ethers";
2 |
3 | /* eslint-disable import/prefer-default-export */
4 | export type State = {
5 | loading: boolean;
6 | account?: string;
7 | chainId?: number;
8 | provider?: ethers.providers.Web3Provider;
9 | ens?: string;
10 | contracts?: any;
11 | connectWeb3?: any;
12 | logout?: any;
13 | };
14 | export const Web3Reducer = (state: State, action: Record) => {
15 | switch (action.type) {
16 | case "SET_ACCOUNT":
17 | return {
18 | ...state,
19 | account: action.payload,
20 | };
21 | case "SET_ENS":
22 | return {
23 | ...state,
24 | ens: action.payload,
25 | };
26 | case "SET_PROVIDER":
27 | return {
28 | ...state,
29 | provider: action.payload,
30 | };
31 | case "SET_CONTRACTS":
32 | return {
33 | ...state,
34 | contracts: action.payload,
35 | };
36 | default:
37 | return state;
38 | }
39 | };
40 |
--------------------------------------------------------------------------------
/packages/ui/src/components/box/FixedBottom.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Box as ChakraBox,
3 | BoxProps,
4 | useColorModeValue,
5 | } from '@chakra-ui/react';
6 | import React from 'react';
7 | import { colors } from '../../theme/colors';
8 |
9 | export { ButtonProps } from '@chakra-ui/react';
10 |
11 | export const FixedBottom = (
12 | args: BoxProps & { children?: React.ReactNode }
13 | ) => {
14 | const getOverBgColor = useColorModeValue(
15 | colors.neutralLighter,
16 | colors.neutralDarker
17 | );
18 | const primaryColor = useColorModeValue(
19 | colors.primary[500],
20 | colors.primary[200]
21 | );
22 |
23 | return (
24 |
36 | {args.children}
37 |
38 | );
39 | };
40 |
--------------------------------------------------------------------------------
/packages/dapp/next-seo.config.js:
--------------------------------------------------------------------------------
1 | export const appStaticContent = {
2 | currentAppLink: "https://demo.scaffold-eth.io",
3 | name: "Scaffold ETH",
4 | description: "Bootstrap & customize your dApp in minutes",
5 | };
6 |
7 | /** @type {import('next-seo').DefaultSeoProps} */
8 | const defaultSEOConfig = {
9 | title: appStaticContent.name,
10 | titleTemplate: `%s | ${appStaticContent.name}`,
11 | defaultTitle: appStaticContent.name,
12 | description: appStaticContent.description,
13 | canonical: appStaticContent.currentAppLink,
14 | openGraph: {
15 | url: appStaticContent.currentAppLink,
16 | title: appStaticContent.name,
17 | description: appStaticContent.description,
18 | images: [
19 | {
20 | url: "https://avatars.githubusercontent.com/u/90008925?s=200&v=4",
21 | },
22 | ],
23 | site_name: appStaticContent.name,
24 | },
25 | twitter: {
26 | handle: "@buidlguidl",
27 | cardType: "summary_large_image",
28 | },
29 | };
30 |
31 | export default defaultSEOConfig;
32 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/heading.ts:
--------------------------------------------------------------------------------
1 | import { SystemStyleObject } from "@chakra-ui/theme-tools";
2 |
3 | const baseStyle: SystemStyleObject = {
4 | fontFamily: "heading",
5 | fontWeight: "bold",
6 | color: "moon",
7 | };
8 |
9 | const sizes: Record = {
10 | "4xl": {
11 | fontSize: ["6xl", null, "7xl"],
12 | lineHeight: 1,
13 | },
14 | "3xl": {
15 | fontSize: ["5xl", null, "6xl"],
16 | lineHeight: 1,
17 | },
18 | "2xl": {
19 | fontSize: ["4xl", null, "5xl"],
20 | lineHeight: [1.2, null, 1],
21 | },
22 | xl: {
23 | fontSize: ["3xl", null, "4xl"],
24 | lineHeight: [1.33, null, 1.2],
25 | },
26 | lg: {
27 | fontSize: ["2xl", null, "3xl"],
28 | lineHeight: [1.33, null, 1.2],
29 | },
30 | md: { fontSize: "xl", lineHeight: 1.2 },
31 | sm: { fontSize: "md", lineHeight: 1.2 },
32 | xs: { fontSize: "sm", lineHeight: 1.2 },
33 | };
34 |
35 | const defaultProps = {
36 | size: "xl",
37 | };
38 |
39 | export default {
40 | baseStyle,
41 | sizes,
42 | defaultProps,
43 | };
44 |
--------------------------------------------------------------------------------
/packages/dapp/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Button, Heading, Image } from "@chakra-ui/react";
2 | import Link from "next/link";
3 |
4 | import { MotionBox } from "components/motion/Box";
5 |
6 | const Page404 = () => {
7 | return (
8 |
9 |
16 |
20 |
21 |
22 |
23 |
24 | Page not Found.
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | );
35 | };
36 |
37 | export default Page404;
38 |
--------------------------------------------------------------------------------
/packages/web/next-seo.config.js:
--------------------------------------------------------------------------------
1 | export const appStaticContent = {
2 | dappLink: "https://demo.scaffold-eth.io",
3 | currentAppLink: "https://example.scaffold-eth.io",
4 | name: "Scaffold ETH Demo",
5 | description: "Bootstrap & customize your dApp in minutes",
6 | };
7 |
8 | /** @type {import('next-seo').DefaultSeoProps} */
9 | const defaultSEOConfig = {
10 | title: appStaticContent.name,
11 | titleTemplate: `%s | ${appStaticContent.name}`,
12 | defaultTitle: appStaticContent.name,
13 | description: appStaticContent.description,
14 | canonical: appStaticContent.currentAppLink,
15 | openGraph: {
16 | url: appStaticContent.currentAppLink,
17 | title: appStaticContent.name,
18 | description: appStaticContent.description,
19 | images: [
20 | {
21 | url: "https://avatars.githubusercontent.com/u/90008925?s=200&v=4",
22 | },
23 | ],
24 | site_name: appStaticContent.name,
25 | },
26 | twitter: {
27 | handle: "@buidlguidl",
28 | cardType: "summary_large_image",
29 | },
30 | };
31 |
32 | export default defaultSEOConfig;
33 |
--------------------------------------------------------------------------------
/packages/ui/stories/Button.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Meta, Story } from '@storybook/react';
3 | import { QButton, ButtonProps } from '../src/components/button';
4 |
5 | import { ColorModeToggleBar } from './ColorMode';
6 | const meta: Meta = {
7 | title: 'Components/ButtonExample',
8 | component: QButton,
9 | argTypes: {
10 | text: {
11 | control: {
12 | type: 'text',
13 | },
14 | },
15 | },
16 | parameters: {
17 | controls: { expanded: true },
18 | },
19 | };
20 | export default meta;
21 | const Template: Story = (args) => ;
22 | export const Default = Template.bind({});
23 | Default.args = {
24 | variant: 'solid',
25 | children: 'My Button 1',
26 | };
27 |
28 | export const All = () => (
29 | <>
30 |
31 | Button
32 | Button
33 | Button
34 | Button
35 | Button
36 | >
37 | );
38 |
--------------------------------------------------------------------------------
/packages/web/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/dapp/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/subgraph/src/mapping.ts:
--------------------------------------------------------------------------------
1 | import { BigInt, Address } from "@graphprotocol/graph-ts"
2 | import {
3 | YourContract,
4 | SetPurpose
5 | } from "../generated/YourContract/YourContract"
6 | import { Purpose, Sender } from "../generated/schema"
7 |
8 | export function handleSetPurpose(event: SetPurpose): void {
9 |
10 | let senderString = event.params.sender.toHexString()
11 |
12 | let sender = Sender.load(senderString)
13 |
14 | if (sender == null) {
15 | sender = new Sender(senderString)
16 | sender.address = event.params.sender
17 | sender.createdAt = event.block.timestamp
18 | sender.purposeCount = BigInt.fromI32(1)
19 | }
20 | else {
21 | sender.purposeCount = sender.purposeCount.plus(BigInt.fromI32(1))
22 | }
23 |
24 | let purpose = new Purpose(event.transaction.hash.toHex() + "-" + event.logIndex.toString())
25 |
26 | purpose.purpose = event.params.purpose
27 | purpose.sender = senderString
28 | purpose.createdAt = event.block.timestamp
29 | purpose.transactionHash = event.transaction.hash.toHex()
30 |
31 | purpose.save()
32 | sender.save()
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/contracts/YourContract.sol:
--------------------------------------------------------------------------------
1 | pragma solidity >=0.8.0 <0.9.0;
2 | //SPDX-License-Identifier: MIT
3 |
4 | import 'hardhat/console.sol';
5 |
6 | //import "@openzeppelin/contracts/access/Ownable.sol"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
7 |
8 | contract YourContract {
9 | event SetPurpose(address sender, string purpose);
10 |
11 | string _purpose = 'Building Unstoppable Apps';
12 |
13 | //error EmptyPurposeError(uint code, string message);
14 |
15 | constructor() {
16 | // what should we do on deploy?
17 | }
18 |
19 | function purpose() public view returns (string memory) {
20 | return _purpose;
21 | }
22 |
23 | function setPurpose(string memory newPurpose) public payable {
24 | // if(bytes(newPurpose).length == 0){
25 | // revert EmptyPurposeError({
26 | // code: 1,
27 | // message: "Purpose can not be empty"
28 | // });
29 | // }
30 |
31 | _purpose = newPurpose;
32 | console.log(msg.sender, 'set purpose to', _purpose);
33 | emit SetPurpose(msg.sender, _purpose);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/skeleton.ts:
--------------------------------------------------------------------------------
1 | import { keyframes } from "@chakra-ui/system"
2 | import type { SystemStyleFunction } from "@chakra-ui/theme-tools"
3 | import { getColor, mode } from "@chakra-ui/theme-tools"
4 |
5 | const fade = (startColor: string, endColor: string) =>
6 | keyframes({
7 | from: { borderColor: startColor, background: startColor },
8 | to: { borderColor: endColor, background: endColor },
9 | })
10 |
11 | const baseStyle: SystemStyleFunction = (props) => {
12 | const defaultStartColor = mode("gray.100", "gray.800")(props)
13 | const defaultEndColor = mode("gray.400", "gray.600")(props)
14 |
15 | const {
16 | startColor = defaultStartColor,
17 | endColor = defaultEndColor,
18 | speed,
19 | theme,
20 | } = props
21 |
22 | const start = getColor(theme, startColor)
23 | const end = getColor(theme, endColor)
24 |
25 | return {
26 | opacity: 0.7,
27 | borderRadius: "2px",
28 | borderColor: start,
29 | background: end,
30 | animation: `${speed}s linear infinite alternate ${fade(start, end)}`,
31 | }
32 | }
33 |
34 | export default {
35 | baseStyle,
36 | }
37 |
--------------------------------------------------------------------------------
/packages/subgraph/abis/kovan_YourContract.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [],
4 | "stateMutability": "nonpayable",
5 | "type": "constructor"
6 | },
7 | {
8 | "anonymous": false,
9 | "inputs": [
10 | {
11 | "indexed": false,
12 | "internalType": "address",
13 | "name": "sender",
14 | "type": "address"
15 | },
16 | {
17 | "indexed": false,
18 | "internalType": "string",
19 | "name": "purpose",
20 | "type": "string"
21 | }
22 | ],
23 | "name": "SetPurpose",
24 | "type": "event"
25 | },
26 | {
27 | "inputs": [],
28 | "name": "purpose",
29 | "outputs": [
30 | {
31 | "internalType": "string",
32 | "name": "",
33 | "type": "string"
34 | }
35 | ],
36 | "stateMutability": "view",
37 | "type": "function"
38 | },
39 | {
40 | "inputs": [
41 | {
42 | "internalType": "string",
43 | "name": "newPurpose",
44 | "type": "string"
45 | }
46 | ],
47 | "name": "setPurpose",
48 | "outputs": [],
49 | "stateMutability": "payable",
50 | "type": "function"
51 | }
52 | ]
--------------------------------------------------------------------------------
/packages/subgraph/abis/mumbai_YourContract.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [],
4 | "stateMutability": "nonpayable",
5 | "type": "constructor"
6 | },
7 | {
8 | "anonymous": false,
9 | "inputs": [
10 | {
11 | "indexed": false,
12 | "internalType": "address",
13 | "name": "sender",
14 | "type": "address"
15 | },
16 | {
17 | "indexed": false,
18 | "internalType": "string",
19 | "name": "purpose",
20 | "type": "string"
21 | }
22 | ],
23 | "name": "SetPurpose",
24 | "type": "event"
25 | },
26 | {
27 | "inputs": [],
28 | "name": "purpose",
29 | "outputs": [
30 | {
31 | "internalType": "string",
32 | "name": "",
33 | "type": "string"
34 | }
35 | ],
36 | "stateMutability": "view",
37 | "type": "function"
38 | },
39 | {
40 | "inputs": [
41 | {
42 | "internalType": "string",
43 | "name": "newPurpose",
44 | "type": "string"
45 | }
46 | ],
47 | "name": "setPurpose",
48 | "outputs": [],
49 | "stateMutability": "payable",
50 | "type": "function"
51 | }
52 | ]
--------------------------------------------------------------------------------
/packages/subgraph/abis/rinkeby_YourContract.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [],
4 | "stateMutability": "nonpayable",
5 | "type": "constructor"
6 | },
7 | {
8 | "anonymous": false,
9 | "inputs": [
10 | {
11 | "indexed": false,
12 | "internalType": "address",
13 | "name": "sender",
14 | "type": "address"
15 | },
16 | {
17 | "indexed": false,
18 | "internalType": "string",
19 | "name": "purpose",
20 | "type": "string"
21 | }
22 | ],
23 | "name": "SetPurpose",
24 | "type": "event"
25 | },
26 | {
27 | "inputs": [],
28 | "name": "purpose",
29 | "outputs": [
30 | {
31 | "internalType": "string",
32 | "name": "",
33 | "type": "string"
34 | }
35 | ],
36 | "stateMutability": "view",
37 | "type": "function"
38 | },
39 | {
40 | "inputs": [
41 | {
42 | "internalType": "string",
43 | "name": "newPurpose",
44 | "type": "string"
45 | }
46 | ],
47 | "name": "setPurpose",
48 | "outputs": [],
49 | "stateMutability": "payable",
50 | "type": "function"
51 | }
52 | ]
--------------------------------------------------------------------------------
/packages/subgraph/abis/localhost_YourContract.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [],
4 | "stateMutability": "nonpayable",
5 | "type": "constructor"
6 | },
7 | {
8 | "anonymous": false,
9 | "inputs": [
10 | {
11 | "indexed": false,
12 | "internalType": "address",
13 | "name": "sender",
14 | "type": "address"
15 | },
16 | {
17 | "indexed": false,
18 | "internalType": "string",
19 | "name": "purpose",
20 | "type": "string"
21 | }
22 | ],
23 | "name": "SetPurpose",
24 | "type": "event"
25 | },
26 | {
27 | "inputs": [],
28 | "name": "purpose",
29 | "outputs": [
30 | {
31 | "internalType": "string",
32 | "name": "",
33 | "type": "string"
34 | }
35 | ],
36 | "stateMutability": "view",
37 | "type": "function"
38 | },
39 | {
40 | "inputs": [
41 | {
42 | "internalType": "string",
43 | "name": "newPurpose",
44 | "type": "string"
45 | }
46 | ],
47 | "name": "setPurpose",
48 | "outputs": [],
49 | "stateMutability": "payable",
50 | "type": "function"
51 | }
52 | ]
--------------------------------------------------------------------------------
/packages/dapp/src/components/Buttons/ConnectButton.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Button,
3 | HStack,
4 | IconButton,
5 | } from "@chakra-ui/react";
6 | import { useWeb3React } from '@web3-react/core';
7 | import { IoMdExit } from "react-icons/io";
8 | import React, { useContext } from "react";
9 |
10 | import { Web3Context } from "../../contexts/Web3Provider";
11 | import Address from "../custom/Address";
12 |
13 | function ConnectButton({ w }: { w?: string }) {
14 | const { account, connectWeb3, logout } = useContext(Web3Context);
15 | const { active } = useWeb3React();
16 |
17 | return (
18 |
19 | {account ? (
20 | <>
21 |
28 | } onClick={logout} />
29 | >
30 | ) : active && (
31 |
34 | )}
35 |
36 | );
37 | }
38 |
39 | export default ConnectButton;
40 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/textarea.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | SystemStyleInterpolation,
3 | SystemStyleObject,
4 | } from '@chakra-ui/theme-tools';
5 | import { colorScheme } from '../default-props';
6 | import Input from './input';
7 |
8 | const baseStyle: SystemStyleObject = {
9 | ...Input.baseStyle.field,
10 | paddingY: '8px',
11 | minHeight: '80px',
12 | lineHeight: 'short',
13 | verticalAlign: 'top',
14 | };
15 |
16 | const variants: Record = {
17 | outline: (props) => Input.variants.outline(props).field ?? {},
18 | flushed: (props) => Input.variants.flushed(props).field ?? {},
19 | filled: (props) => Input.variants.filled(props).field ?? {},
20 | unstyled: Input.variants.unstyled.field ?? {},
21 | };
22 |
23 | const sizes: Record = {
24 | xs: Input.sizes.xs.field ?? {},
25 | sm: Input.sizes.sm.field ?? {},
26 | md: Input.sizes.md.field ?? {},
27 | lg: Input.sizes.lg.field ?? {},
28 | };
29 |
30 | const defaultProps = {
31 | size: 'md',
32 | variant: 'outline',
33 | colorScheme: colorScheme,
34 | };
35 |
36 | export default {
37 | baseStyle,
38 | sizes,
39 | variants,
40 | defaultProps,
41 | };
42 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/hooks/useCustomColor.tsx:
--------------------------------------------------------------------------------
1 | import { useColorModeValue } from "@chakra-ui/react";
2 | import { colors } from "../../styles/customTheme/colors";
3 |
4 | function useCustomColor() {
5 | const primaryColor = useColorModeValue(
6 | colors.primary[500],
7 | colors.primary[200]
8 | );
9 | const getOverBgColor = useColorModeValue(
10 | colors.neutralLighter,
11 | colors.neutralDarker
12 | );
13 | const accentColor = useColorModeValue(
14 | colors.accentLight[500],
15 | colors.accentDark[500]
16 | );
17 | const coloredText = useColorModeValue(
18 | colors.neutralDark,
19 | colors.neutralLight
20 | );
21 | const accentColorScheme = useColorModeValue("accentLight", "accentDark");
22 |
23 | const getTextColor = useColorModeValue(
24 | colors.neutralDarkest,
25 | colors.neutralLightest
26 | );
27 | const getBgColor = useColorModeValue(
28 | colors.neutralLightest,
29 | colors.neutralDarkest
30 | );
31 | return {
32 | primaryColor,
33 | getOverBgColor,
34 | accentColor,
35 | coloredText,
36 | accentColorScheme,
37 | getTextColor,
38 | getBgColor,
39 | };
40 | }
41 |
42 | export default useCustomColor;
43 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/sizes.ts:
--------------------------------------------------------------------------------
1 | const sizes = {
2 | 1: '0.25rem',
3 | 2: '0.5rem',
4 | 3: '0.75rem',
5 | 4: '1rem',
6 | 5: '1.25rem',
7 | 6: '1.5rem',
8 | 7: '1.75rem',
9 | 8: '2rem',
10 | 9: '2.25rem',
11 | 10: '2.5rem',
12 | 12: '3rem',
13 | 14: '3.5rem',
14 | 16: '4rem',
15 | 20: '5rem',
16 | 24: '6rem',
17 | 28: '7rem',
18 | 32: '8rem',
19 | 36: '9rem',
20 | 40: '10rem',
21 | 44: '11rem',
22 | 48: '12rem',
23 | 52: '13rem',
24 | 56: '14rem',
25 | 60: '15rem',
26 | 64: '16rem',
27 | 72: '18rem',
28 | 80: '20rem',
29 | 96: '24rem',
30 | px: '1px',
31 | '0.5': '0.125rem',
32 | '1.5': '0.375rem',
33 | '2.5': '0.625rem',
34 | '3.5': '0.875rem',
35 | max: 'max-content',
36 | min: 'min-content',
37 | full: '100%',
38 | '3xs': '14rem',
39 | '2xs': '16rem',
40 | xs: '20rem',
41 | sm: '24rem',
42 | md: '28rem',
43 | lg: '32rem',
44 | xl: '36rem',
45 | '2xl': '42rem',
46 | '3xl': '48rem',
47 | '4xl': '56rem',
48 | '5xl': '64rem',
49 | '6xl': '72rem',
50 | '7xl': '80rem',
51 | '8xl': '90rem',
52 | container: {
53 | sm: '640px',
54 | md: '768px',
55 | lg: '1024px',
56 | xl: '1280px',
57 | },
58 | }
59 |
60 | export default sizes
61 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/constants/emojis.ts:
--------------------------------------------------------------------------------
1 | export const emojis = [
2 | "✌",
3 | "😂",
4 | "😝",
5 | "😁",
6 | "😱",
7 | "👉",
8 | "🙌",
9 | "🍻",
10 | "🔥",
11 | "🌈",
12 | "☀",
13 | "🎈",
14 | "🌹",
15 | "💄",
16 | "🎀",
17 | "⚽",
18 | "🎾",
19 | "🏁",
20 | "😡",
21 | "👿",
22 | "🐻",
23 | "🐶",
24 | "🐬",
25 | "🐟",
26 | "🍀",
27 | "👀",
28 | "🚗",
29 | "🍎",
30 | "💝",
31 | "💙",
32 | "👌",
33 | "❤",
34 | "😍",
35 | "😉",
36 | "😓",
37 | "😳",
38 | "💪",
39 | "💩",
40 | "🍸",
41 | "🔑",
42 | "💖",
43 | "🌟",
44 | "🎉",
45 | "🌺",
46 | "🎶",
47 | "👠",
48 | "🏈",
49 | "⚾",
50 | "🏆",
51 | "👽",
52 | "💀",
53 | "🐵",
54 | "🐮",
55 | "🐩",
56 | "🐎",
57 | "💣",
58 | "👃",
59 | "👂",
60 | "🍓",
61 | "💘",
62 | "💜",
63 | "👊",
64 | "💋",
65 | "😘",
66 | "😜",
67 | "😵",
68 | "🙏",
69 | "👋",
70 | "🚽",
71 | "💃",
72 | "💎",
73 | "🚀",
74 | "🌙",
75 | "🎁",
76 | "⛄",
77 | "🌊",
78 | "⛵",
79 | "🏀",
80 | "🎱",
81 | "💰",
82 | "👶",
83 | "👸",
84 | "🐰",
85 | "🐷",
86 | "🐍",
87 | "🐫",
88 | "🔫",
89 | "👄",
90 | "🚲",
91 | "🍉",
92 | "💛",
93 | "💚",
94 | ];
95 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/accordion.ts:
--------------------------------------------------------------------------------
1 | import { accordionAnatomy as parts } from '@chakra-ui/anatomy';
2 | import type {
3 | PartsStyleObject,
4 | SystemStyleObject,
5 | } from '@chakra-ui/theme-tools';
6 |
7 | const baseStyleContainer: SystemStyleObject = {
8 | borderTopWidth: '0px',
9 | borderColor: 'inherit',
10 | _last: {
11 | borderBottomWidth: '0px',
12 | },
13 | };
14 |
15 | const baseStyleButton: SystemStyleObject = {
16 | transitionProperty: 'common',
17 | transitionDuration: 'normal',
18 | fontSize: '1rem',
19 | _focus: {
20 | boxShadow: 'none',
21 | },
22 | _hover: {
23 | bg: 'blackAlpha.50',
24 | },
25 | _disabled: {
26 | opacity: 0.4,
27 | cursor: 'not-allowed',
28 | },
29 | px: 4,
30 | py: 2,
31 | };
32 |
33 | const baseStylePanel: SystemStyleObject = {
34 | pt: 2,
35 | px: 4,
36 | pb: 5,
37 | };
38 |
39 | const baseStyleIcon: SystemStyleObject = {
40 | fontSize: '1.25em',
41 | };
42 |
43 | const baseStyle: PartsStyleObject = {
44 | container: baseStyleContainer,
45 | button: baseStyleButton,
46 | panel: baseStylePanel,
47 | icon: baseStyleIcon,
48 | };
49 |
50 | export default {
51 | parts: parts.keys,
52 | baseStyle,
53 | };
54 |
--------------------------------------------------------------------------------
/packages/web/src/pages/about.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Heading,
3 | HStack,
4 | Text,
5 | VStack,
6 | Box
7 | } from "@chakra-ui/react";
8 | import { useRouter } from "next/router";
9 |
10 |
11 | const About = () => {
12 | const router = useRouter();
13 |
14 | function goTo(destination: string) {
15 | router.push(destination);
16 | }
17 | return (
18 |
19 |
20 |
21 | About
22 |
23 |
24 | Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dignissimos esse rerum doloremque eligendi tenetur reprehenderit consequuntur adipisci officia amet quam architecto, commodi deserunt neque debitis porro non iusto asperiores molestiae!
25 |
26 |
27 | Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dignissimos esse rerum doloremque eligendi tenetur reprehenderit consequuntur adipisci officia amet quam architecto, commodi deserunt neque debitis porro non iusto asperiores molestiae!
28 |
29 |
30 |
31 | );
32 | };
33 |
34 | export default About;
35 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/stat.ts:
--------------------------------------------------------------------------------
1 | import { statAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleObject,
4 | SystemStyleObject,
5 | } from "@chakra-ui/theme-tools"
6 |
7 | const baseStyleLabel: SystemStyleObject = {
8 | fontWeight: "medium",
9 | }
10 |
11 | const baseStyleHelpText: SystemStyleObject = {
12 | opacity: 0.8,
13 | marginBottom: 2,
14 | }
15 |
16 | const baseStyleNumber: SystemStyleObject = {
17 | verticalAlign: "baseline",
18 | fontWeight: "semibold",
19 | }
20 |
21 | const baseStyleIcon: SystemStyleObject = {
22 | marginEnd: 1,
23 | w: "14px",
24 | h: "14px",
25 | verticalAlign: "middle",
26 | }
27 |
28 | const baseStyle: PartsStyleObject = {
29 | container: {},
30 | label: baseStyleLabel,
31 | helpText: baseStyleHelpText,
32 | number: baseStyleNumber,
33 | icon: baseStyleIcon,
34 | }
35 |
36 | const sizes: Record> = {
37 | md: {
38 | label: { fontSize: "sm" },
39 | helpText: { fontSize: "sm" },
40 | number: { fontSize: "2xl" },
41 | },
42 | }
43 |
44 | const defaultProps = {
45 | size: "md",
46 | }
47 |
48 | export default {
49 | parts: parts.keys,
50 | baseStyle,
51 | sizes,
52 | defaultProps,
53 | }
54 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/pin-input.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | SystemStyleInterpolation,
3 | SystemStyleObject,
4 | } from "@chakra-ui/theme-tools"
5 | import Input from "./input"
6 |
7 | const baseStyle: SystemStyleObject = {
8 | ...Input.baseStyle.field,
9 | textAlign: "center",
10 | }
11 |
12 | const sizes: Record = {
13 | lg: {
14 | fontSize: "lg",
15 | w: 12,
16 | h: 12,
17 | borderRadius: "md",
18 | },
19 | md: {
20 | fontSize: "md",
21 | w: 10,
22 | h: 10,
23 | borderRadius: "md",
24 | },
25 | sm: {
26 | fontSize: "sm",
27 | w: 8,
28 | h: 8,
29 | borderRadius: "sm",
30 | },
31 | xs: {
32 | fontSize: "xs",
33 | w: 6,
34 | h: 6,
35 | borderRadius: "sm",
36 | },
37 | }
38 |
39 | const variants: Record = {
40 | outline: (props) => Input.variants.outline(props).field ?? {},
41 | flushed: (props) => Input.variants.flushed(props).field ?? {},
42 | filled: (props) => Input.variants.filled(props).field ?? {},
43 | unstyled: Input.variants.unstyled.field ?? {},
44 | }
45 |
46 | const defaultProps = Input.defaultProps
47 |
48 | export default {
49 | baseStyle,
50 | sizes,
51 | variants,
52 | defaultProps,
53 | }
54 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/close-button.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | SystemStyleFunction,
3 | SystemStyleObject,
4 | } from "@chakra-ui/theme-tools"
5 | import { cssVar, mode } from "@chakra-ui/theme-tools"
6 |
7 | const $size = cssVar("close-button-size")
8 |
9 | const baseStyle: SystemStyleFunction = (props) => {
10 | const hoverBg = mode(`blackAlpha.100`, `whiteAlpha.100`)(props)
11 | const activeBg = mode(`blackAlpha.200`, `whiteAlpha.200`)(props)
12 |
13 | return {
14 | w: [$size.reference],
15 | h: [$size.reference],
16 | borderRadius: "md",
17 | transitionProperty: "common",
18 | transitionDuration: "normal",
19 | _disabled: {
20 | opacity: 0.4,
21 | cursor: "not-allowed",
22 | boxShadow: "none",
23 | },
24 | _hover: { bg: hoverBg },
25 | _active: { bg: activeBg },
26 | _focus: {
27 | boxShadow: "outline",
28 | },
29 | }
30 | }
31 |
32 | const sizes: Record = {
33 | lg: {
34 | [$size.variable]: "40px",
35 | fontSize: "16px",
36 | },
37 | md: {
38 | [$size.variable]: "32px",
39 | fontSize: "12px",
40 | },
41 | sm: {
42 | [$size.variable]: "24px",
43 | fontSize: "10px",
44 | },
45 | }
46 |
47 | const defaultProps = {
48 | size: "md",
49 | }
50 |
51 | export default {
52 | baseStyle,
53 | sizes,
54 | defaultProps,
55 | }
56 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/deploy/00_deploy_your_contract.ts:
--------------------------------------------------------------------------------
1 | import { DeployFunction } from 'hardhat-deploy/types';
2 | import { parseEther } from 'ethers/lib/utils';
3 | import { HardhatRuntimeEnvironmentExtended } from 'helpers/types/hardhat-type-extensions';
4 |
5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironmentExtended) => {
6 | const { getNamedAccounts, deployments } = hre as any;
7 | const { deploy } = deployments;
8 | const { deployer } = await getNamedAccounts();
9 | await deploy('YourContract', {
10 | // Learn more about args here: https://www.npmjs.com/package/hardhat-deploy#deploymentsdeploy
11 | from: deployer,
12 | // args: ["Hello"],
13 | log: true,
14 | });
15 |
16 | /*
17 | // Getting a previously deployed contract
18 | const YourContract = await ethers.getContract("YourContract", deployer);
19 | await YourContract.setPurpose("Hello");
20 |
21 | //const yourContract = await ethers.getContractAt('YourContract', "0xaAC799eC2d00C013f1F11c37E654e59B0429DF6A") //<-- if you want to instantiate a version of a contract at a specific address!
22 | */
23 | };
24 | export default func;
25 | func.tags = ['YourContract'];
26 |
27 | /*
28 | Tenderly verification
29 | let verification = await tenderly.verify({
30 | name: contractName,
31 | address: contractAddress,
32 | network: targetNetwork,
33 | });
34 | */
35 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/theme/foundations/typography.ts:
--------------------------------------------------------------------------------
1 | const typography = {
2 | letterSpacing: {
3 | tighter: '-0.05em',
4 | tight: '-0.025em',
5 | normal: '0',
6 | wide: '0.025em',
7 | wider: '0.05em',
8 | widest: '0.1em',
9 | },
10 | lineHeights: {
11 | 3: '.75rem',
12 | 4: '1rem',
13 | 5: '1.25rem',
14 | 6: '1.5rem',
15 | 7: '1.75rem',
16 | 8: '2rem',
17 | 9: '2.25rem',
18 | 10: '2.5rem',
19 | normal: 'normal',
20 | none: '1',
21 | shorter: '1.25',
22 | short: '1.375',
23 | base: '1.5',
24 | tall: '1.625',
25 | taller: '2',
26 | },
27 | fontWeights: {
28 | hairline: '100',
29 | thin: '200',
30 | light: '300',
31 | normal: '400',
32 | medium: '500',
33 | semibold: '600',
34 | bold: '700',
35 | extrabold: '800',
36 | black: '900',
37 | },
38 | fonts: {
39 | heading: 'Work Sans, system-ui, sans-serif',
40 | body: 'Inter, system-ui, sans-serif',
41 | mono: 'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace',
42 | },
43 | fontSizes: {
44 | xs: '0.75rem',
45 | sm: '0.875rem',
46 | md: '1rem',
47 | lg: '1.125rem',
48 | xl: '1.25rem',
49 | '2xl': '1.5rem',
50 | '3xl': '1.875rem',
51 | '4xl': '2.25rem',
52 | '5xl': '3rem',
53 | '6xl': '3.75rem',
54 | '7xl': '4.5rem',
55 | '8xl': '6rem',
56 | '9xl': '8rem',
57 | },
58 | }
59 |
60 | export default typography
61 |
--------------------------------------------------------------------------------
/packages/hardhat-ts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2018",
4 | "lib": ["DOM", "DOM.Iterable", "ES2018", "ESNext"],
5 | "types": ["node", "ethers"],
6 | "allowJs": false,
7 | "skipLibCheck": false,
8 | "esModuleInterop": true,
9 | "allowSyntheticDefaultImports": true,
10 | "strict": true,
11 | "typeRoots": ["node_modules/@types", "src/helpers/definitions"] /* List of folders to include type definitions from. */,
12 | "sourceMap": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "module": "CommonJS",
15 | "moduleResolution": "node",
16 | "incremental": true,
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "noEmit": true,
20 | "rootDir": ".",
21 | "baseUrl": ".",
22 | "outDir": "dist",
23 | "paths": {
24 | "~~/*": ["./src/*"],
25 | "scripts/*": ["./scripts/*"],
26 | "helpers/*": ["./helpers/*"],
27 | "contracts/*": ["./contracts/*"],
28 | "tests/*": ["./tests/*"],
29 | "typechain/*": ["./typechain/*"],
30 | "*": ["node_modules/*"]
31 | }
32 | },
33 | "include": ["types", "scripts", "test", "helpers", "./hardhat.config.ts", "./deploy", "./typechain"],
34 | "exclude": ["**/node_modules", ".husky", "./src/styles/css", "./tailwind.config.js"],
35 | "files": ["./hardhat.config.ts", "helpers/types/__global.ts"]
36 | }
37 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/select.ts:
--------------------------------------------------------------------------------
1 | import { selectAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleFunction,
4 | PartsStyleObject,
5 | SystemStyleFunction,
6 | SystemStyleObject,
7 | } from "@chakra-ui/theme-tools"
8 | import { mode } from "@chakra-ui/theme-tools"
9 | import Input from "./input"
10 |
11 | const baseStyleField: SystemStyleFunction = (props) => {
12 | return {
13 | ...Input.baseStyle.field,
14 | bg: mode("white", "gray.700")(props),
15 | appearance: "none",
16 | paddingBottom: "1px",
17 | lineHeight: "normal",
18 | "> option, > optgroup": {
19 | bg: mode("white", "gray.700")(props),
20 | },
21 | }
22 | }
23 |
24 | const baseStyleIcon: SystemStyleObject = {
25 | width: "1.5rem",
26 | height: "100%",
27 | insetEnd: "0.5rem",
28 | position: "relative",
29 | color: "currentColor",
30 | fontSize: "1.25rem",
31 | _disabled: {
32 | opacity: 0.5,
33 | },
34 | }
35 |
36 | const baseStyle: PartsStyleFunction = (props) => ({
37 | field: baseStyleField(props),
38 | icon: baseStyleIcon,
39 | })
40 |
41 | const sizes: Record> = {
42 | ...Input.sizes,
43 | xs: {
44 | ...Input.sizes.xs,
45 | icon: { insetEnd: "0.25rem" },
46 | },
47 | }
48 |
49 | export default {
50 | parts: parts.keys,
51 | baseStyle,
52 | sizes,
53 | variants: Input.variants,
54 | defaultProps: Input.defaultProps,
55 | }
56 |
--------------------------------------------------------------------------------
/packages/ui/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: Node.js CI
5 |
6 | on:
7 | push:
8 | branches: [ main ]
9 | pull_request:
10 | branches: '*'
11 |
12 | jobs:
13 | quality:
14 |
15 | runs-on: ${{ matrix.os }}
16 |
17 | strategy:
18 | matrix:
19 | node-version: [10.x, 12.x, 14.x, 15.x]
20 | os: [ubuntu-latest, windows-latest]
21 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
22 |
23 | steps:
24 | - uses: actions/checkout@v2
25 | - name: Use Node.js ${{ matrix.node-version }}
26 | uses: actions/setup-node@v2
27 | with:
28 | node-version: ${{ matrix.node-version }}
29 | - run: npm ci
30 | - run: npm test
31 |
32 | publish:
33 | runs-on: ubuntu-latest
34 | if: ${{ github.ref == 'refs/heads/main' }}
35 | needs: [quality]
36 | steps:
37 | - uses: actions/checkout@v2
38 | - name: Use Node.js ${{ matrix.node-version }}
39 | uses: actions/setup-node@v2
40 | with:
41 | node-version: ${{ matrix.node-version }}
42 | - run: npm ci
43 | - run: npm run semantic-release
44 | env:
45 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 |
--------------------------------------------------------------------------------
/packages/dapp/public/polygon_logo.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/packages/web/src/components/static/WelcomeText.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Box,
3 | Heading,
4 | useBreakpointValue,
5 | useColorMode,
6 | } from "@chakra-ui/react";
7 | import { useClipboard } from "@chakra-ui/hooks";
8 | import { Code } from "@chakra-ui/layout";
9 | import React from "react";
10 | import { HiClipboardCheck } from "react-icons/hi";
11 |
12 | const WelcomeText = ({
13 | address,
14 | username,
15 | }: {
16 | address: string;
17 | username: string;
18 | }) => {
19 | const { hasCopied, onCopy } = useClipboard(address);
20 | const { colorMode } = useColorMode();
21 | const textSize = useBreakpointValue({
22 | base: "xs",
23 | sm: "md",
24 | });
25 |
26 | return (
27 | <>
28 |
29 | Welcome {username}!
30 |
31 |
32 |
38 |
39 | {address ? (
40 | <>
41 | Your current address is
42 |
43 | {address}
44 |
45 | >
46 | ) : (
47 | "Please authenticate to access the dApp!"
48 | )}
49 |
50 | {hasCopied && }
51 |
52 |
53 | >
54 | );
55 | };
56 |
57 | export default WelcomeText;
58 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/text-styles.ts:
--------------------------------------------------------------------------------
1 | const textStyles = {
2 | hero: {
3 | // you can also use responsive styles
4 | fontSize: [
5 | `${44 * 1}px`,
6 | `${44 * 1.1}px`,
7 | `${44 * 1.2}px`,
8 | `${44 * 1.4}px`,
9 | ],
10 | fontWeight: 'normal',
11 | lineHeight: '110%',
12 | letterSpacing: '-2%',
13 | },
14 | h1: {
15 | // you can also use responsive styles
16 | fontSize: [
17 | `${31.4 * 1}px`,
18 | `${31.4 * 1.1}px`,
19 | `${31.4 * 1.2}px`,
20 | `${31.4 * 1.4}px`,
21 | ],
22 | fontWeight: 'normal',
23 | lineHeight: '110%',
24 | letterSpacing: '-2%',
25 | },
26 | h2: {
27 | fontSize: [
28 | `${22.4 * 1}px`,
29 | `${22.4 * 1.1}px`,
30 | `${22.4 * 1.2}px`,
31 | `${22.4 * 1.4}px`,
32 | ],
33 | fontWeight: 'normal',
34 | lineHeight: '110%',
35 | letterSpacing: '-1%',
36 | },
37 | p: {
38 | fontSize: [
39 | `${16 * 1}px`,
40 | `${16 * 1.1}px`,
41 | `${16 * 1.2}px`,
42 | `${16 * 1.4}px`,
43 | ],
44 | fontWeight: 'normal',
45 | lineHeight: '110%',
46 | letterSpacing: '-1%',
47 | },
48 | small: {
49 | fontSize: [
50 | `${12 * 1}px`,
51 | `${12 * 1.1}px`,
52 | `${12 * 1.2}px`,
53 | `${12 * 1.4}px`,
54 | ],
55 | fontWeight: 'normal',
56 | lineHeight: '110%',
57 | letterSpacing: '-1%',
58 | },
59 | glow: {
60 | textShadow:
61 | '0 0 20px rgb(192 219 255 / 35%), 0 0 22px rgb(65 120 255 / 24%)',
62 | },
63 | };
64 |
65 | export default textStyles;
66 |
--------------------------------------------------------------------------------
/packages/ui/example/src/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/packages/dapp/src/styles/customTheme/colors.ts:
--------------------------------------------------------------------------------
1 | import { DeepPartial, Theme } from "@chakra-ui/react";
2 | import { colors as uiColors } from "@moonshotcollective/ui";
3 |
4 | /** extend additional color here */
5 | const myColors: DeepPartial<
6 | Record
7 | > = {
8 | // Basic
9 | neutralDarkest: "#001C33",
10 | neutralDarker: "#003966",
11 | neutralDark: "#005599",
12 | neutralLightest: "#5CB6FF",
13 | neutralLighter: "#8ACBFF",
14 | neutralLight: "#B8DFFF",
15 |
16 | borderDark: "#003966",
17 | borderLight: "#B8DFFF",
18 |
19 | // Functional
20 | success: "#9AF1A8",
21 | error: "#F86D97",
22 |
23 | // Main
24 | primary: {
25 | "50": "#E6FBFF",
26 | "100": "#B9F3FE",
27 | "200": "#8CEBFD",
28 | "300": "#5FE3FC",
29 | "400": "#32DCFB",
30 | "500": "#05D4FA",
31 | "600": "#04AAC8",
32 | "700": "#037F96",
33 | "800": "#025564",
34 | "900": "#012A32",
35 | },
36 | accentDark: {
37 | "50": "#E8FCF0",
38 | "100": "#BFF8D6",
39 | "200": "#95F3BB",
40 | "300": "#6CEFA1",
41 | "400": "#43EA86",
42 | "500": "#19E66B",
43 | "600": "#14B856",
44 | "700": "#0F8A40",
45 | "800": "#0A5C2B",
46 | "900": "#052E15",
47 | },
48 | accentLight: {
49 | "50": "#FAEAF2",
50 | "100": "#F2C5DC",
51 | "200": "#E99FC5",
52 | "300": "#E17AAE",
53 | "400": "#D85497",
54 | "500": "#D02F81",
55 | "600": "#A62667",
56 | "700": "#7D1C4D",
57 | "800": "#531333",
58 | "900": "#2A091A",
59 | },
60 | };
61 |
62 | export const colors = {
63 | ...uiColors,
64 | // ...myColors,
65 | };
66 |
--------------------------------------------------------------------------------
/packages/ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | // see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
3 | "include": ["src", "types", "./src/ts/**/*"],
4 | "compilerOptions": {
5 | "module": "esnext",
6 | "lib": ["dom", "esnext"],
7 | "importHelpers": true,
8 | // output .d.ts declaration files for consumers
9 | "declaration": true,
10 | // output .js.map sourcemap files for consumers
11 | "sourceMap": true,
12 | // match output dir to input dir. e.g. dist/index instead of dist/src/index
13 | "rootDir": "./src",
14 | // stricter type-checking for stronger correctness. Recommended by TS
15 | "strict": true,
16 | // linter checks for common issues
17 | "noImplicitReturns": true,
18 | "noFallthroughCasesInSwitch": true,
19 | // noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
20 | "noUnusedLocals": true,
21 | "noUnusedParameters": true,
22 | // use Node's module resolution algorithm, instead of the legacy TS one
23 | "moduleResolution": "node",
24 | // transpile JSX to React.createElement
25 | "jsx": "react",
26 | // interop between ESM and CJS modules. Recommended by TS
27 | "esModuleInterop": true,
28 | // significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
29 | "skipLibCheck": true,
30 | // error out if import and file system have a casing mismatch. Recommended by TS
31 | "forceConsistentCasingInFileNames": true,
32 | // `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
33 | "noEmit": true
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/badge.ts:
--------------------------------------------------------------------------------
1 | import { getColor, mode, transparentize } from "@chakra-ui/theme-tools"
2 | import type {
3 | SystemStyleFunction,
4 | SystemStyleObject,
5 | } from "@chakra-ui/theme-tools"
6 |
7 | const baseStyle: SystemStyleObject = {
8 | px: 1,
9 | textTransform: "uppercase",
10 | fontSize: "xs",
11 | borderRadius: "sm",
12 | fontWeight: "bold",
13 | }
14 |
15 | const variantSolid: SystemStyleFunction = (props) => {
16 | const { colorScheme: c, theme } = props
17 | const dark = transparentize(`${c}.500`, 0.6)(theme)
18 | return {
19 | bg: mode(`${c}.500`, dark)(props),
20 | color: mode(`white`, `whiteAlpha.800`)(props),
21 | }
22 | }
23 |
24 | const variantSubtle: SystemStyleFunction = (props) => {
25 | const { colorScheme: c, theme } = props
26 | const darkBg = transparentize(`${c}.200`, 0.16)(theme)
27 | return {
28 | bg: mode(`${c}.100`, darkBg)(props),
29 | color: mode(`${c}.800`, `${c}.200`)(props),
30 | }
31 | }
32 |
33 | const variantOutline: SystemStyleFunction = (props) => {
34 | const { colorScheme: c, theme } = props
35 | const darkColor = transparentize(`${c}.200`, 0.8)(theme)
36 | const lightColor = getColor(theme, `${c}.500`)
37 | const color = mode(lightColor, darkColor)(props)
38 |
39 | return {
40 | color,
41 | boxShadow: `inset 0 0 0px 1px ${color}`,
42 | }
43 | }
44 |
45 | const variants = {
46 | solid: variantSolid,
47 | subtle: variantSubtle,
48 | outline: variantOutline,
49 | }
50 |
51 | const defaultProps = {
52 | variant: "subtle",
53 | colorScheme: "gray",
54 | }
55 |
56 | export default {
57 | baseStyle,
58 | variants,
59 | defaultProps,
60 | }
61 |
--------------------------------------------------------------------------------
/packages/web/public/ts-logo-512.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/web/src/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/jsx-props-no-spreading */
2 | import { ChakraProvider } from "@chakra-ui/react";
3 | import { EmotionCache } from "@emotion/cache";
4 | import { CacheProvider } from "@emotion/react";
5 | // import "@fontsource/lexend/latin.css";
6 | // import "@fontsource/roboto-mono";
7 | import "@fontsource/inter";
8 | import { DefaultSeo } from "next-seo";
9 | import { AppProps } from "next/app";
10 | import Head from "next/head";
11 |
12 | import defaultSEOConfig from "../../next-seo.config";
13 | import createEmotionCache from "styles/createEmotionCache";
14 | import customTheme from "styles/customTheme";
15 | import "styles/globals.css";
16 | import Layout from "components/layout";
17 |
18 | const clientSideEmotionCache = createEmotionCache();
19 |
20 | interface CoordinationAppProps extends AppProps {
21 | emotionCache?: EmotionCache;
22 | }
23 |
24 | const CoordinationApp = ({
25 | Component,
26 | pageProps,
27 | emotionCache = clientSideEmotionCache,
28 | }: CoordinationAppProps) => {
29 | return (
30 |
31 |
32 |
33 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | );
45 | };
46 |
47 | CoordinationApp.defaultProps = {
48 | emotionCache: clientSideEmotionCache,
49 | };
50 |
51 | export default CoordinationApp;
52 |
--------------------------------------------------------------------------------
/packages/web/src/components/layout/NavLink.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Link as ChakraLink,
3 | LinkProps,
4 | useColorModeValue,
5 | } from "@chakra-ui/react";
6 | import Link from "next/link";
7 | import { useRouter } from "next/router";
8 | import React from "react";
9 |
10 | interface NavLinkProps extends LinkProps {
11 | children?: string | React.ReactNode;
12 | to: string;
13 | activeProps?: LinkProps;
14 | _hover?: LinkProps;
15 | }
16 |
17 | function NavLink({
18 | to,
19 | activeProps,
20 | children,
21 | _hover,
22 | ...props
23 | }: NavLinkProps) {
24 | const router = useRouter();
25 | const isActive = router.pathname === to;
26 | const color = useColorModeValue("black", "selected");
27 | const hoverColors = {
28 | bg: useColorModeValue("gray.200", "brand.900"),
29 | color: useColorModeValue("purple.400", "green.500"),
30 | };
31 | if (isActive) {
32 | return (
33 |
34 |
47 | {children}
48 |
49 |
50 | );
51 | }
52 |
53 | return (
54 |
55 |
66 | {children}
67 |
68 |
69 | );
70 | }
71 |
72 | export default NavLink;
73 |
--------------------------------------------------------------------------------
/packages/ui/src/theme/components/popover.ts:
--------------------------------------------------------------------------------
1 | import { popoverAnatomy as parts } from "@chakra-ui/anatomy"
2 | import type {
3 | PartsStyleFunction,
4 | SystemStyleFunction,
5 | SystemStyleObject,
6 | } from "@chakra-ui/theme-tools"
7 | import { cssVar, mode } from "@chakra-ui/theme-tools"
8 |
9 | const $popperBg = cssVar("popper-bg")
10 |
11 | const $arrowBg = cssVar("popper-arrow-bg")
12 | const $arrowShadowColor = cssVar("popper-arrow-shadow-color")
13 |
14 | const baseStylePopper: SystemStyleObject = {
15 | zIndex: 10,
16 | }
17 |
18 | const baseStyleContent: SystemStyleFunction = (props) => {
19 | const bg = mode("white", "gray.700")(props)
20 | const shadowColor = mode("gray.200", "whiteAlpha.300")(props)
21 |
22 | return {
23 | [$popperBg.variable]: `colors.${bg}`,
24 | bg: $popperBg.reference,
25 | [$arrowBg.variable]: $popperBg.reference,
26 | [$arrowShadowColor.variable]: `colors.${shadowColor}`,
27 | width: "xs",
28 | border: "1px solid",
29 | borderColor: "inherit",
30 | borderRadius: "md",
31 | boxShadow: "sm",
32 | zIndex: "inherit",
33 | _focus: {
34 | outline: 0,
35 | boxShadow: "outline",
36 | },
37 | }
38 | }
39 |
40 | const baseStyleHeader: SystemStyleObject = {
41 | px: 3,
42 | py: 2,
43 | borderBottomWidth: "1px",
44 | }
45 |
46 | const baseStyleBody: SystemStyleObject = {
47 | px: 3,
48 | py: 2,
49 | }
50 |
51 | const baseStyleFooter: SystemStyleObject = {
52 | px: 3,
53 | py: 2,
54 | borderTopWidth: "1px",
55 | }
56 |
57 | const baseStyle: PartsStyleFunction = (props) => ({
58 | popper: baseStylePopper,
59 | content: baseStyleContent(props),
60 | header: baseStyleHeader,
61 | body: baseStyleBody,
62 | footer: baseStyleFooter,
63 | arrow: {},
64 | })
65 |
66 | export default {
67 | parts: parts.keys,
68 | baseStyle,
69 | }
70 |
--------------------------------------------------------------------------------
/packages/dapp/src/core/types/eth-types.ts:
--------------------------------------------------------------------------------
1 | import {
2 | JsonRpcProvider,
3 | StaticJsonRpcProvider,
4 | Web3Provider,
5 | Provider,
6 | JsonRpcSigner,
7 | } from "@ethersproject/providers";
8 | import { ethers, Signer, VoidSigner, Wallet, Event } from "ethers";
9 | import { Result } from "ethers/lib/utils";
10 | /**
11 | * #### Summary
12 | * A union of various ethers providers for ease of use and maximum flexiblity
13 | *
14 | * #### Notes
15 | * Used by eth-hooks, eth-components and scaffold-eth-typescript
16 | *
17 | * @category Type Definition
18 | */
19 | export type TEthersProvider =
20 | | JsonRpcProvider
21 | | Web3Provider
22 | | StaticJsonRpcProvider;
23 |
24 | /**
25 | * #### Summary
26 | * A union of various providers and signers in ethers to give maximum flexibility
27 | *
28 | * @category Type Definition
29 | */
30 | export type TEthersProviderOrSigner =
31 | | JsonRpcProvider
32 | | Web3Provider
33 | | StaticJsonRpcProvider
34 | | Signer
35 | | JsonRpcSigner
36 | | Wallet
37 | | VoidSigner;
38 |
39 | /**
40 | * #### Summary
41 | * A union of various providers in ethers to give maximum flexibility
42 | *
43 | * @category Type Definition
44 | */
45 | export type TEthersSigner = Signer | JsonRpcSigner | Wallet | VoidSigner;
46 |
47 | /**
48 | * #### Summary
49 | * A union of abstract, non initalizable providers, used by some functions
50 | *
51 | * @category Type Definition
52 | */
53 | export type TAbstractProvider = Provider;
54 |
55 | /**
56 | * #### Summary
57 | * Essentially a provider and signer and network information for ease of use.
58 | *
59 | * @category Type Definition
60 | */
61 | export type TEthersUser = {
62 | signer: Signer | undefined;
63 | provider: TEthersProvider | undefined;
64 | providerNetwork: ethers.providers.Network | undefined;
65 | address: string | undefined;
66 | };
67 |
68 | export interface TypedEvent extends Event {
69 | args: EventArgs;
70 | }
71 |
--------------------------------------------------------------------------------
/packages/web/public/nextjs-icon-dark.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/web/public/nextjs-icon-light.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/dapp/src/pages/api/image-storage.ts:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 | import * as fs from "fs";
3 | import multiparty from "multiparty";
4 | import { NextApiRequest, NextApiResponse } from "next";
5 | import { Web3Storage, File } from "web3.storage";
6 |
7 | type Form = {
8 | fields: any;
9 | files: any;
10 | };
11 |
12 | function parseForm(req: NextApiRequest): Promise