Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
2dc4ddf
first commit
Loa212 Oct 24, 2023
bb94934
add nvmrc
Loa212 Oct 24, 2023
d404031
change name
Loa212 Oct 24, 2023
cbafe82
baseLayout
Loa212 Oct 24, 2023
8fd8599
nabar
Loa212 Oct 24, 2023
0b0f469
instrument sans
Loa212 Oct 24, 2023
75871e5
add shadcn
Loa212 Oct 24, 2023
d105850
add sheet
Loa212 Oct 24, 2023
8db7a38
add autoanimate
Loa212 Oct 24, 2023
e138635
general layout
Loa212 Oct 24, 2023
c201f95
add defaults & types
Loa212 Oct 24, 2023
f846716
fix errors
Loa212 Oct 24, 2023
caecbd1
fix paths
Loa212 Oct 24, 2023
9a640b2
add tabs
Loa212 Oct 24, 2023
072e756
Buy tab
Loa212 Oct 24, 2023
a24a27a
add zustand
Loa212 Oct 24, 2023
f8068a3
Create first part of PairHeader
AmandineBI Oct 24, 2023
c03db1d
Merge branch 'feature/pairHeader' into main
AmandineBI Oct 24, 2023
6d7cd69
Merge pull request #1 from AllTrends/main
AmandineBI Oct 24, 2023
6d8beea
Add PairHeader component
AmandineBI Oct 24, 2023
65bb4b9
Merge pull request #7 from AllTrends/feature/pairHeader
AmandineBI Oct 24, 2023
69c6907
change bg
Loa212 Oct 24, 2023
6fe2c0a
show mock info on open positions
Loa212 Oct 24, 2023
a9e5521
Improve PairHeader
AmandineBI Oct 24, 2023
153db3d
Merge pull request #8 from AllTrends/issue3
AmandineBI Oct 24, 2023
655df5a
tradesStore
Loa212 Oct 24, 2023
d4b9dd0
Merge pull request #9 from AllTrends/issue2
Loa212 Oct 24, 2023
c491d7a
add some wagmi actions
Loa212 Oct 24, 2023
351e659
Finish PairHeader
AmandineBI Oct 25, 2023
1cca377
format currency
Loa212 Oct 25, 2023
f424096
parseToWholeNumbers
Loa212 Oct 25, 2023
7b834d5
Merge branch 'main' into Loa212/issue2
Loa212 Oct 25, 2023
56f8f2b
Merge pull request #10 from AllTrends/Loa212/issue2
Loa212 Oct 25, 2023
412827e
changes
Loa212 Oct 25, 2023
fbf201f
Merge pull request #12 from AllTrends/changes-on-history-and-panel
Loa212 Oct 25, 2023
8fda987
ApexCharts integration with candlestick chart
AmandineBI Oct 25, 2023
ab469c1
add test transaction
Loa212 Oct 25, 2023
18ae04c
Working financial chart
AmandineBI Oct 25, 2023
250608b
Merge branch 'main' into amandine/apexcharts_working
AmandineBI Oct 25, 2023
d044641
Merge pull request #13 from AllTrends/amandine/apexcharts_working
AmandineBI Oct 25, 2023
ddc583d
new ABI methods
Loa212 Oct 25, 2023
9b6db79
getAll
Loa212 Oct 25, 2023
5ad20df
Make the chart readable and responsive
AmandineBI Oct 25, 2023
2af4ba8
Merge pull request #14 from AllTrends/amandine/improve_financial_chart
AmandineBI Oct 25, 2023
702c72b
add open/close logic to dialog
Loa212 Oct 25, 2023
85558d0
add toaster
Loa212 Oct 25, 2023
6f35e10
show toster
Loa212 Oct 25, 2023
4056c24
Mockup chart data and add time ranges
AmandineBI Oct 25, 2023
5ef400d
Merge pull request #16 from AllTrends/amandine/fancy_chart
AmandineBI Oct 25, 2023
4070d83
Create chartDataStore
AmandineBI Oct 25, 2023
5baeda5
Create long positions
Loa212 Oct 25, 2023
2612aae
Merge pull request #17 from AllTrends/amandine/store_chart_data
AmandineBI Oct 25, 2023
17b98e3
Merge branch 'main' into Loa212/issue11
Loa212 Oct 25, 2023
eafbbe6
Merge pull request #18 from AllTrends/Loa212/issue11
Loa212 Oct 25, 2023
00604a6
add functionality
Loa212 Oct 25, 2023
0d17d7b
Merge pull request #19 from AllTrends/feat--short-position
Loa212 Oct 25, 2023
3dfc167
basic functionality
Loa212 Oct 25, 2023
23034f4
handle rejectjon from metamask
Loa212 Oct 25, 2023
b577642
Merge pull request #21 from AllTrends/feat--close-positions
Loa212 Oct 25, 2023
7e2cc42
fix env errors
Loa212 Oct 25, 2023
10a5673
Add financialDataStore and make data grouping per time period logic
AmandineBI Oct 26, 2023
ba64028
Merge branch 'main' into amandine/store_chart_data
AmandineBI Oct 26, 2023
d24e804
improvs
Loa212 Oct 26, 2023
b756300
Merge pull request #22 from AllTrends/amandine/store_chart_data
Loa212 Oct 26, 2023
c6c049a
Merge pull request #23 from AllTrends/ui-improvements
Loa212 Oct 26, 2023
10c820e
new ABI
Loa212 Oct 26, 2023
39e64d5
Add the modal text for placing orders
AmandineBI Oct 26, 2023
b390626
Update README.md
Loa212 Oct 26, 2023
846e401
Make it beautifull
AmandineBI Oct 26, 2023
b069dab
Merge pull request #25 from AllTrends/amandine/issue11
AmandineBI Oct 26, 2023
0c7ed40
Adjust chart to price
AmandineBI Oct 26, 2023
8f9b01a
changes
Loa212 Oct 26, 2023
03e3cf4
Merge pull request #26 from AllTrends/amandine/issue11
AmandineBI Oct 26, 2023
033237f
Merge pull request #27 from AllTrends/last-changes
Loa212 Oct 26, 2023
07321bd
Merge branch 'main' of https://github.com/AllTrends/www into app
piotr-wieruszewski Oct 31, 2023
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
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# walletconnect projectId:
# you can get it from https://cloud.walletconnect.com/
# by creating a new project with email & password
# you don't need a wallet for this example
# WALLET_CONNECT_PROJECT_ID = "walletconnect_project_id"

# ------------------------------------------------------------------------------
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.mjs"
# should be updated accordingly.
36 changes: 36 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
plugins: ["@typescript-eslint"],
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
rules: {
// These opinionated rules are enabled in stylistic-type-checked above.
// Feel free to reconfigure them to your own preference.
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",

"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
},
};

module.exports = config;
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
# Logs
logs
*.log
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18.2
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# DC-EBC-Hackathon
DC-EBC-Hackathon

# ALL DEX
ALLdex is a Product of the AllTrend Team form the European Blockchain Hackathon.

[Link to live demo](https://alldex.vercel.app/)
where you can open a long and short perpetual future position.

More details about functionality and Future Roadmap you can find in our WhitePaper.


## Whitepaper
[link to the withepaper v1](https://github.com/AllTrends/whitepaper)

## Run the frontend app



install dependecies

```bash
pnpm i
```

then run the app

```bash
pnpm dev
```

## License

[MIT](https://choosealicense.com/licenses/mit/)
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles/globals.css",
"baseColor": "stone",
"cssVariables": true
},
"aliases": {
"components": "src/components/",
"utils": "~/components/lib/utils"
}
}
29 changes: 29 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
await import("./src/env.mjs");

/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,

webpack: (config) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
config.resolve.fallback = { fs: false, net: false, tls: false };
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return config;
},

/**
* If you are using `appDir` then you must comment the below `i18n` config out.
*
* @see https://github.com/vercel/next.js/issues/41980
*/
i18n: {
locales: ["en"],
defaultLocale: "en",
},
};

export default config;
68 changes: 68 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "perpetual-dex",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@fontsource-variable/instrument-sans": "^5.0.3",
"@formkit/auto-animate": "^0.8.0",
"@radix-ui/react-alert-dialog": "^1.0.5",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@rainbow-me/rainbowkit": "^1.1.2",
"@t3-oss/env-nextjs": "^0.7.0",
"@tanstack/react-query": "^4.32.6",
"@trpc/client": "^10.37.1",
"@trpc/next": "^10.37.1",
"@trpc/react-query": "^10.37.1",
"@trpc/server": "^10.37.1",
"apexcharts": "^3.44.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cryptocurrency-icons": "^0.18.1",
"lucide-react": "^0.288.0",
"next": "^13.5.4",
"react": "18.2.0",
"react-apexcharts": "^1.4.1",
"react-dom": "18.2.0",
"react-hot-toast": "^2.4.1",
"react-text-mask": "^5.5.0",
"superjson": "^1.13.1",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"viem": "^1.16.6",
"wagmi": "^1.4.5",
"zod": "^3.22.4",
"zustand": "^4.4.4"
},
"devDependencies": {
"@iconify/react": "^4.1.1",
"@types/eslint": "^8.44.2",
"@types/node": "^18.16.0",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@types/react-text-mask": "^5.4.13",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.47.0",
"eslint-config-next": "^13.5.4",
"postcss": "^8.4.27",
"prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.5.1",
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6"
},
"ct3aMetadata": {
"initVersion": "7.22.0"
},
"packageManager": "pnpm@8.9.2"
}
Loading