Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to indexer #24

Merged
merged 34 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c24d034
Create Dockerfile
sergeyfilyanin Jan 15, 2024
3258667
Update Dockerfile
sergeyfilyanin Jan 15, 2024
9ddcd5f
Update Dockerfile
sergeyfilyanin Jan 15, 2024
06fe0f0
Add collection header component
nikitayutanov Jan 15, 2024
a163643
Fix token limit display
nikitayutanov Jan 15, 2024
9c4c176
Fix nft mint with price
nikitayutanov Jan 15, 2024
d5474d8
Add collection list nfts preview
nikitayutanov Jan 15, 2024
10940eb
Fix nft image ratio
nikitayutanov Jan 15, 2024
a2175a9
Minor improvements, add NFTs display and market forms validation (#11)
nikitayutanov Jan 23, 2024
86335bb
Migrate to indexer (#12)
nikitayutanov Feb 12, 2024
a56786d
Log public envs
nikitayutanov Feb 12, 2024
970a210
Add reply subscriptions to messages (#13)
nikitayutanov Feb 14, 2024
208bc1b
Add alerts on success replies
nikitayutanov Feb 14, 2024
0fa65ac
Add button loadings on message submit
nikitayutanov Feb 14, 2024
1cd909c
Improve UX (#14)
nikitayutanov Feb 16, 2024
13945a0
Add list component (#15)
nikitayutanov Feb 16, 2024
61385d3
Add mint permission (#16)
nikitayutanov Feb 18, 2024
acdf52b
Fix permission to mint submit
nikitayutanov Feb 18, 2024
a780100
Fix not enough gas error
nikitayutanov Feb 20, 2024
e8b7bef
Migrate to pinata
nikitayutanov Feb 21, 2024
534f799
Fix pinata upload
nikitayutanov Feb 22, 2024
5818082
Fetch collection types in create page (#18)
nikitayutanov Feb 22, 2024
b8ddbb1
Add fees (#20)
nikitayutanov Feb 27, 2024
2fecb8f
Drop docker contract address env
nikitayutanov Feb 27, 2024
8082901
Bump @gear-js/vara-ui
nikitayutanov Feb 27, 2024
f803254
Revert first bid validation
nikitayutanov Feb 27, 2024
33df414
Upload images to ipfs in chunks (#21)
nikitayutanov Feb 28, 2024
f00f72d
Change NFTs preview placeholder
nikitayutanov Feb 28, 2024
0fde7fb
Add collection header gradient
nikitayutanov Feb 28, 2024
c68139c
Add create collection nfts limit
nikitayutanov Feb 28, 2024
14c38d5
Add create collection countdown (#22)
nikitayutanov Feb 29, 2024
760295c
Add account filter (#23)
nikitayutanov Feb 29, 2024
ec15e3c
Change submit nfts button text on upload
nikitayutanov Feb 29, 2024
af67c4c
Upload image batches sequentially
nikitayutanov Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/deploy-to-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ jobs:
tags: ${{ needs.prepair.outputs.image_name }}
build-args: |
VITE_NODE_ADDRESS=${{ secrets.VITE_NODE_ADDRESS }}
VITE_IPFS_ADDRESS=${{ secrets.VITE_IPFS_ADDRESS }}
VITE_IPFS_UPLOAD_ADDRESS=${{ secrets.VITE_IPFS_UPLOAD_ADDRESS }}
VITE_IPFS_GATEWAY_ADDRESS=${{ secrets.VITE_IPFS_GATEWAY_ADDRESS }}
VITE_CONTRACT_ADDRESS=${{ secrets.VITE_CONTRACT_ADDRESS }}
VITE_INDEXER_ADDRESS=${{ secrets.VITE_INDEXER_ADDRESS }}
VITE_INDEXER_WS_ADDRESS=${{ secrets.VITE_INDEXER_WS_ADDRESS }}

deploy-to-k8s:
needs: [prepair, build-and-push-image]
Expand Down
6 changes: 4 additions & 2 deletions frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VITE_NODE_ADDRESS=
VITE_IPFS_ADDRESS=
VITE_CONTRACT_ADDRESS=
VITE_IPFS_UPLOAD_ADDRESS=
VITE_IPFS_GATEWAY_ADDRESS=
VITE_INDEXER_ADDRESS=
VITE_INDEXER_WS_ADDRESS=
1 change: 1 addition & 0 deletions frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
graphql
32 changes: 32 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM node:18-alpine
MAINTAINER GEAR

COPY ./frontend /opt

RUN apk update

RUN apk add xsel

RUN npm install -g pnpm

ARG VITE_NODE_ADDRESS \
VITE_IPFS_UPLOAD_ADDRESS \
VITE_IPFS_GATEWAY_ADDRESS \
VITE_INDEXER_ADDRESS \
VITE_INDEXER_WS_ADDRESS
ENV VITE_NODE_ADDRESS=${VITE_NODE_ADDRESS} \
VITE_IPFS_UPLOAD_ADDRESS=${VITE_IPFS_UPLOAD_ADDRESS} \
VITE_IPFS_GATEWAY_ADDRESS=${VITE_IPFS_GATEWAY_ADDRESS} \
VITE_INDEXER_ADDRESS=${VITE_INDEXER_ADDRESS} \
VITE_INDEXER_WS_ADDRESS=${VITE_INDEXER_WS_ADDRESS} \
DISABLE_ESLINT_PLUGIN=true

WORKDIR /opt

RUN pnpm install

RUN pnpm build

RUN npm install --global serve

CMD ["serve", "-s", "/opt/dist"]
23 changes: 23 additions & 0 deletions frontend/codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { CodegenConfig } from '@graphql-codegen/cli';
import { loadEnv } from 'vite';

const config: CodegenConfig = {
schema: loadEnv('', process.cwd(), '').VITE_INDEXER_ADDRESS,
documents: ['src/**/*.{ts,tsx}'],
ignoreNoDocuments: true, // for better experience with the watcher
generates: {
'./src/graphql/': {
preset: 'client',
plugins: [],
config: {
scalars: {
DateTime: 'string',
BigInt: 'string',
},
avoidOptionals: true,
},
},
},
};

export default config;
23 changes: 14 additions & 9 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,32 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"start": "vite --open",
"start": "vite --open --port 3000",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"codegen": "graphql-codegen"
},
"dependencies": {
"@gear-js/api": "0.35.2",
"@gear-js/react-hooks": "0.9.5",
"@gear-js/vara-ui": "0.0.6",
"@gear-js/api": "0.36.3",
"@gear-js/react-hooks": "0.10.3",
"@gear-js/vara-ui": "0.0.7",
"@hookform/resolvers": "3.3.3",
"@polkadot/api": "10.10.1",
"@polkadot/api-derive": "10.10.1",
"@polkadot/api": "10.11.2",
"@polkadot/react-identicon": "3.6.4",
"@polkadot/types": "10.10.1",
"kubo-rpc-client": "3.0.2",
"graphql-ws": "5.14.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.49.2",
"react-router-dom": "6.21.0",
"urql": "4.0.6",
"zod": "3.22.4"
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@graphql-typed-document-node/core": "3.2.0",
"@polkadot/types": "10.11.2",
"@types/react": "18.2.43",
"@types/react-dom": "18.2.17",
"@typescript-eslint/eslint-plugin": "6.14.0",
Expand All @@ -39,6 +43,7 @@
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.5",
"graphql": "16.8.1",
"sass": "1.69.5",
"typescript": "5.2.2",
"vite": "5.0.8",
Expand Down
Loading