├── FrontEnd ├── src │ ├── styles │ │ ├── header.css │ │ └── carousel.css │ ├── components │ │ ├── elements │ │ │ ├── marketInfo │ │ │ │ ├── Topvolume.tsx │ │ │ │ ├── SearchInputItem.tsx │ │ │ │ ├── ProgressBar.tsx │ │ │ │ ├── RecentList.tsx │ │ │ │ └── RecentItem.tsx │ │ │ ├── Icons │ │ │ │ ├── speculape.png │ │ │ │ └── index.tsx │ │ │ ├── buttons │ │ │ │ └── VoteBtn.tsx │ │ │ ├── profile │ │ │ │ ├── ProfileNavbar.tsx │ │ │ │ ├── ProfileFundItem.tsx │ │ │ │ ├── HistoryItem.tsx │ │ │ │ └── ProfileProposeItem.tsx │ │ │ ├── about │ │ │ │ ├── AboutFaq.tsx │ │ │ │ └── AboutSubSidebar.tsx │ │ │ ├── fund │ │ │ │ ├── CommentItem.tsx │ │ │ │ ├── SolCounter.tsx │ │ │ │ └── FundNavbar.tsx │ │ │ ├── ToastGroup.tsx │ │ │ ├── carousel │ │ │ │ ├── MarketCarousel.tsx │ │ │ │ └── MarketCarouselItem.tsx │ │ │ ├── pagination │ │ │ │ └── Pagination.tsx │ │ │ └── referral │ │ │ │ └── ReferralItem.tsx │ │ ├── layouts │ │ │ ├── index.tsx │ │ │ └── partials │ │ │ │ ├── SearchBar.tsx │ │ │ │ ├── MarketTabs.tsx │ │ │ │ ├── SidebarNav.tsx │ │ │ │ └── SidebarNavItem.tsx │ │ └── prediction_market_sdk │ │ │ ├── constants.ts │ │ │ └── util.ts │ ├── app │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── about │ │ │ └── page.tsx │ │ ├── fonts.css │ │ ├── fund │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ └── page.tsx │ ├── hooks │ │ └── useWindowSize.tsx │ ├── providers │ │ └── GlobalContext.tsx │ ├── types │ │ └── type.ts │ └── utils │ │ └── index.ts ├── public │ ├── fund.png │ ├── spec.png │ ├── carousel_11.png │ ├── carousel_12.png │ ├── carousel_13.png │ ├── carousel_21.png │ ├── carousel_22.png │ ├── carousel_23.png │ ├── vercel.svg │ ├── fonts │ │ ├── Rubik │ │ │ ├── static │ │ │ │ ├── Rubik-Black.ttf │ │ │ │ ├── Rubik-Bold.ttf │ │ │ │ ├── Rubik-Light.ttf │ │ │ │ ├── Rubik-Italic.ttf │ │ │ │ ├── Rubik-Medium.ttf │ │ │ │ ├── Rubik-Regular.ttf │ │ │ │ ├── Rubik-SemiBold.ttf │ │ │ │ ├── Rubik-BoldItalic.ttf │ │ │ │ ├── Rubik-ExtraBold.ttf │ │ │ │ ├── Rubik-BlackItalic.ttf │ │ │ │ ├── Rubik-LightItalic.ttf │ │ │ │ ├── Rubik-MediumItalic.ttf │ │ │ │ ├── Rubik-ExtraBoldItalic.ttf │ │ │ │ └── Rubik-SemiBoldItalic.ttf │ │ │ ├── Rubik-VariableFont_wght.ttf │ │ │ ├── Rubik-Italic-VariableFont_wght.ttf │ │ │ └── README.txt │ │ ├── Inter │ │ │ ├── static │ │ │ │ ├── Inter_18pt-Black.ttf │ │ │ │ ├── Inter_18pt-Bold.ttf │ │ │ │ ├── Inter_18pt-Light.ttf │ │ │ │ ├── Inter_18pt-Thin.ttf │ │ │ │ ├── Inter_24pt-Black.ttf │ │ │ │ ├── Inter_24pt-Bold.ttf │ │ │ │ ├── Inter_24pt-Light.ttf │ │ │ │ ├── Inter_24pt-Thin.ttf │ │ │ │ ├── Inter_28pt-Black.ttf │ │ │ │ ├── Inter_28pt-Bold.ttf │ │ │ │ ├── Inter_28pt-Light.ttf │ │ │ │ ├── Inter_28pt-Thin.ttf │ │ │ │ ├── Inter_18pt-Italic.ttf │ │ │ │ ├── Inter_18pt-Medium.ttf │ │ │ │ ├── Inter_18pt-Regular.ttf │ │ │ │ ├── Inter_18pt-SemiBold.ttf │ │ │ │ ├── Inter_24pt-Italic.ttf │ │ │ │ ├── Inter_24pt-Medium.ttf │ │ │ │ ├── Inter_24pt-Regular.ttf │ │ │ │ ├── Inter_24pt-SemiBold.ttf │ │ │ │ ├── Inter_28pt-Italic.ttf │ │ │ │ ├── Inter_28pt-Medium.ttf │ │ │ │ ├── Inter_28pt-Regular.ttf │ │ │ │ ├── Inter_28pt-SemiBold.ttf │ │ │ │ ├── Inter_18pt-BoldItalic.ttf │ │ │ │ ├── Inter_18pt-ExtraBold.ttf │ │ │ │ ├── Inter_18pt-ExtraLight.ttf │ │ │ │ ├── Inter_18pt-ThinItalic.ttf │ │ │ │ ├── Inter_24pt-BoldItalic.ttf │ │ │ │ ├── Inter_24pt-ExtraBold.ttf │ │ │ │ ├── Inter_24pt-ExtraLight.ttf │ │ │ │ ├── Inter_24pt-ThinItalic.ttf │ │ │ │ ├── Inter_28pt-BoldItalic.ttf │ │ │ │ ├── Inter_28pt-ExtraBold.ttf │ │ │ │ ├── Inter_28pt-ExtraLight.ttf │ │ │ │ ├── Inter_28pt-ThinItalic.ttf │ │ │ │ ├── Inter_18pt-BlackItalic.ttf │ │ │ │ ├── Inter_18pt-LightItalic.ttf │ │ │ │ ├── Inter_18pt-MediumItalic.ttf │ │ │ │ ├── Inter_24pt-BlackItalic.ttf │ │ │ │ ├── Inter_24pt-LightItalic.ttf │ │ │ │ ├── Inter_24pt-MediumItalic.ttf │ │ │ │ ├── Inter_28pt-BlackItalic.ttf │ │ │ │ ├── Inter_28pt-LightItalic.ttf │ │ │ │ ├── Inter_28pt-MediumItalic.ttf │ │ │ │ ├── Inter_18pt-ExtraBoldItalic.ttf │ │ │ │ ├── Inter_18pt-SemiBoldItalic.ttf │ │ │ │ ├── Inter_24pt-ExtraBoldItalic.ttf │ │ │ │ ├── Inter_24pt-SemiBoldItalic.ttf │ │ │ │ ├── Inter_28pt-ExtraBoldItalic.ttf │ │ │ │ ├── Inter_28pt-SemiBoldItalic.ttf │ │ │ │ ├── Inter_18pt-ExtraLightItalic.ttf │ │ │ │ ├── Inter_24pt-ExtraLightItalic.ttf │ │ │ │ └── Inter_28pt-ExtraLightItalic.ttf │ │ │ ├── Inter-VariableFont_opsz,wght.ttf │ │ │ ├── Inter-Italic-VariableFont_opsz,wght.ttf │ │ │ ├── README.txt │ │ │ └── OFL.txt │ │ ├── Anton_SC,Rubik │ │ │ ├── Anton_SC │ │ │ │ └── AntonSC-Regular.ttf │ │ │ └── Rubik │ │ │ │ ├── static │ │ │ │ ├── Rubik-Black.ttf │ │ │ │ ├── Rubik-Bold.ttf │ │ │ │ ├── Rubik-Light.ttf │ │ │ │ ├── Rubik-Italic.ttf │ │ │ │ ├── Rubik-Medium.ttf │ │ │ │ ├── Rubik-Regular.ttf │ │ │ │ ├── Rubik-SemiBold.ttf │ │ │ │ ├── Rubik-BoldItalic.ttf │ │ │ │ ├── Rubik-ExtraBold.ttf │ │ │ │ ├── Rubik-BlackItalic.ttf │ │ │ │ ├── Rubik-LightItalic.ttf │ │ │ │ ├── Rubik-MediumItalic.ttf │ │ │ │ ├── Rubik-ExtraBoldItalic.ttf │ │ │ │ └── Rubik-SemiBoldItalic.ttf │ │ │ │ ├── Rubik-VariableFont_wght.ttf │ │ │ │ ├── Rubik-Italic-VariableFont_wght.ttf │ │ │ │ └── README.txt │ │ └── Satoshi_Complete │ │ │ └── Satoshi_Complete │ │ │ └── Fonts │ │ │ ├── OTF │ │ │ ├── Satoshi-Black.otf │ │ │ ├── Satoshi-Bold.otf │ │ │ ├── Satoshi-Light.otf │ │ │ ├── Satoshi-Italic.otf │ │ │ ├── Satoshi-Medium.otf │ │ │ ├── Satoshi-Regular.otf │ │ │ ├── Satoshi-BoldItalic.otf │ │ │ ├── Satoshi-BlackItalic.otf │ │ │ ├── Satoshi-LightItalic.otf │ │ │ └── Satoshi-MediumItalic.otf │ │ │ ├── WEB │ │ │ ├── fonts │ │ │ │ ├── Satoshi-Bold.eot │ │ │ │ ├── Satoshi-Bold.ttf │ │ │ │ ├── Satoshi-Black.eot │ │ │ │ ├── Satoshi-Black.ttf │ │ │ │ ├── Satoshi-Black.woff │ │ │ │ ├── Satoshi-Bold.woff │ │ │ │ ├── Satoshi-Bold.woff2 │ │ │ │ ├── Satoshi-Italic.eot │ │ │ │ ├── Satoshi-Italic.ttf │ │ │ │ ├── Satoshi-Light.eot │ │ │ │ ├── Satoshi-Light.ttf │ │ │ │ ├── Satoshi-Light.woff │ │ │ │ ├── Satoshi-Medium.eot │ │ │ │ ├── Satoshi-Medium.ttf │ │ │ │ ├── Satoshi-Black.woff2 │ │ │ │ ├── Satoshi-Italic.woff │ │ │ │ ├── Satoshi-Italic.woff2 │ │ │ │ ├── Satoshi-Light.woff2 │ │ │ │ ├── Satoshi-Medium.woff │ │ │ │ ├── Satoshi-Medium.woff2 │ │ │ │ ├── Satoshi-Regular.eot │ │ │ │ ├── Satoshi-Regular.ttf │ │ │ │ ├── Satoshi-Regular.woff │ │ │ │ ├── Satoshi-Regular.woff2 │ │ │ │ ├── Satoshi-Variable.eot │ │ │ │ ├── Satoshi-Variable.ttf │ │ │ │ ├── Satoshi-Variable.woff │ │ │ │ ├── Satoshi-BlackItalic.eot │ │ │ │ ├── Satoshi-BlackItalic.ttf │ │ │ │ ├── Satoshi-BoldItalic.eot │ │ │ │ ├── Satoshi-BoldItalic.ttf │ │ │ │ ├── Satoshi-BoldItalic.woff │ │ │ │ ├── Satoshi-LightItalic.eot │ │ │ │ ├── Satoshi-LightItalic.ttf │ │ │ │ ├── Satoshi-Variable.woff2 │ │ │ │ ├── Satoshi-BlackItalic.woff │ │ │ │ ├── Satoshi-BlackItalic.woff2 │ │ │ │ ├── Satoshi-BoldItalic.woff2 │ │ │ │ ├── Satoshi-LightItalic.woff │ │ │ │ ├── Satoshi-LightItalic.woff2 │ │ │ │ ├── Satoshi-MediumItalic.eot │ │ │ │ ├── Satoshi-MediumItalic.ttf │ │ │ │ ├── Satoshi-MediumItalic.woff │ │ │ │ ├── Satoshi-MediumItalic.woff2 │ │ │ │ ├── Satoshi-VariableItalic.eot │ │ │ │ ├── Satoshi-VariableItalic.ttf │ │ │ │ ├── Satoshi-VariableItalic.woff │ │ │ │ └── Satoshi-VariableItalic.woff2 │ │ │ └── README.md │ │ │ └── Variable │ │ │ ├── Satoshi-Variable.ttf │ │ │ └── Satoshi-VariableItalic.ttf │ ├── file.svg │ ├── window.svg │ ├── globe.svg │ └── next.svg ├── postcss.config.mjs ├── next.config.ts ├── eslint.config.mjs ├── .gitignore ├── tsconfig.json ├── tailwind.config.ts └── package.json ├── BackEnd ├── .gitignore ├── .env.example ├── env.example ├── src │ ├── controller │ │ ├── bot │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ ├── index.ts │ │ ├── referral │ │ │ ├── utils.ts │ │ │ └── index.ts │ │ ├── oracle │ │ │ └── index.ts │ │ ├── initialize │ │ │ └── index.ts │ │ ├── market │ │ │ └── utils.ts │ │ └── profile │ │ │ └── index.ts │ ├── router │ │ ├── profile │ │ │ └── index.ts │ │ ├── referral │ │ │ └── index.ts │ │ ├── oracle │ │ │ └── index.ts │ │ ├── index.ts │ │ └── market │ │ │ └── index.ts │ ├── prediction.json │ ├── model │ │ ├── referral.ts │ │ ├── recent.ts │ │ └── market.ts │ ├── oracle_service │ │ └── simulateFeed.ts │ ├── prediction_market_sdk │ │ ├── constants.ts │ │ ├── event.ts │ │ ├── config.ts │ │ └── util.ts │ ├── middleware │ │ └── proposeValidator.ts │ ├── index.ts │ ├── type │ │ └── index.ts │ └── config.ts ├── tsconfig.json └── package.json └── prediction-market-smartcontract ├── programs └── prediction │ ├── src │ ├── states │ │ ├── market.rs │ │ ├── mod.rs │ │ └── global.rs │ ├── instructions │ │ ├── mod.rs │ │ ├── init.rs │ │ ├── get_oracle_res.rs │ │ └── deposite_liquidity.rs │ ├── constants.rs │ ├── errors.rs │ ├── events.rs │ ├── utils.rs │ └── lib.rs │ ├── Xargo.toml │ └── Cargo.toml ├── .prettierignore ├── .gitignore ├── Cargo.toml ├── tsconfig.json ├── package.json ├── Anchor.toml └── tests ├── const.ts └── utils.ts /FrontEnd/src/styles/header.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BackEnd/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /BackEnd/.env.example: -------------------------------------------------------------------------------- 1 | PORT = 2 | DB_URL = 3 | PASSKEY = -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/marketInfo/Topvolume.tsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/states/market.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BackEnd/env.example: -------------------------------------------------------------------------------- 1 | PORT = 2 | DB_URL = 3 | PASSKEY = 4 | FEE_AUTHORITY = -------------------------------------------------------------------------------- /BackEnd/src/controller/bot/index.ts: -------------------------------------------------------------------------------- 1 | import { execute } from "./utils"; 2 | 3 | export default { execute } -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/states/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod global; 2 | pub mod market; 3 | -------------------------------------------------------------------------------- /FrontEnd/public/fund.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fund.png -------------------------------------------------------------------------------- /FrontEnd/public/spec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/spec.png -------------------------------------------------------------------------------- /FrontEnd/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/src/app/favicon.ico -------------------------------------------------------------------------------- /FrontEnd/public/carousel_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/carousel_11.png -------------------------------------------------------------------------------- /FrontEnd/public/carousel_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/carousel_12.png -------------------------------------------------------------------------------- /FrontEnd/public/carousel_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/carousel_13.png -------------------------------------------------------------------------------- /FrontEnd/public/carousel_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/carousel_21.png -------------------------------------------------------------------------------- /FrontEnd/public/carousel_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/carousel_22.png -------------------------------------------------------------------------------- /FrontEnd/public/carousel_23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/carousel_23.png -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /FrontEnd/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: { 3 | "@tailwindcss/postcss": {}, 4 | }, 5 | }; 6 | export default config; -------------------------------------------------------------------------------- /prediction-market-smartcontract/.prettierignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | node_modules 6 | dist 7 | build 8 | test-ledger 9 | -------------------------------------------------------------------------------- /FrontEnd/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-Black.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-Light.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/Icons/speculape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/src/components/elements/Icons/speculape.png -------------------------------------------------------------------------------- /prediction-market-smartcontract/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | **/*.rs.bk 6 | node_modules 7 | test-ledger 8 | .yarn 9 | prediction.json 10 | -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Black.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Light.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Thin.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Black.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Light.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Thin.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Black.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Light.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Thin.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/Rubik-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/Rubik-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/Inter-VariableFont_opsz,wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/Inter-VariableFont_opsz,wght.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraLight.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-ThinItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraLight.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-ThinItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraLight.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-ThinItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/static/Rubik-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/static/Rubik-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/Rubik-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Rubik/Rubik-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Anton_SC/AntonSC-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Anton_SC/AntonSC-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Black.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Light.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_18pt-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_24pt-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Inter/static/Inter_28pt-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/Rubik-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/Rubik-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/static/Rubik-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/Rubik-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/Rubik-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod betting; 2 | pub mod create_market; 3 | pub mod deposite_liquidity; 4 | pub mod get_oracle_res; 5 | pub mod init; 6 | pub mod token_mint; -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Black.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Bold.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Light.otf -------------------------------------------------------------------------------- /BackEnd/src/router/profile/index.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | import { getProfile } from "../../controller"; 3 | 4 | const router = Router(); 5 | 6 | router.get("/", getProfile.getProfileData); 7 | 8 | export default router; -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Italic.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Medium.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-Regular.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-BoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-BoldItalic.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-BlackItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-BlackItalic.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-LightItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-LightItalic.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-MediumItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/OTF/Satoshi-MediumItalic.otf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Bold.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.ttf -------------------------------------------------------------------------------- /BackEnd/src/prediction.json: -------------------------------------------------------------------------------- 1 | [231,45,54,232,164,216,138,219,104,104,155,73,118,200,69,17,92,160,115,214,79,44,255,44,130,57,139,221,239,200,210,87,121,9,13,242,110,228,216,22,0,87,24,90,36,225,233,26,162,59,249,158,3,91,29,84,210,20,87,172,147,167,69,24] -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/Variable/Satoshi-Variable.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/Variable/Satoshi-Variable.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Black.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Italic.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Light.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Medium.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/Variable/Satoshi-VariableItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/Variable/Satoshi-VariableItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BlackItalic.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-BoldItalic.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-LightItalic.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-MediumItalic.woff2 -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.eot -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.ttf -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.woff -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackSky-Jose/Prediction-market/HEAD/FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.woff2 -------------------------------------------------------------------------------- /BackEnd/src/router/referral/index.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | import { referral } from "../../controller" 3 | const router = Router(); 4 | 5 | router.post("/", referral.getReferCode); 6 | router.post("/claim", referral.claimReward); 7 | 8 | export default router -------------------------------------------------------------------------------- /prediction-market-smartcontract/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | 6 | [profile.release] 7 | overflow-checks = true 8 | lto = "fat" 9 | codegen-units = 1 10 | [profile.release.build-override] 11 | opt-level = 3 12 | incremental = false 13 | codegen-units = 1 14 | -------------------------------------------------------------------------------- /FrontEnd/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | webpack: (config) => { 6 | config.resolve.fallback = { fs: false }; 7 | 8 | return config; 9 | } 10 | }; 11 | 12 | export default nextConfig; 13 | -------------------------------------------------------------------------------- /BackEnd/src/router/oracle/index.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | import { oracle } from "../../controller"; 3 | import { proposeValidator } from "../../middleware/proposeValidator"; 4 | 5 | const router = Router(); 6 | 7 | router.post("/registFeed", proposeValidator, oracle.registFeed); 8 | 9 | export default router; -------------------------------------------------------------------------------- /BackEnd/src/controller/index.ts: -------------------------------------------------------------------------------- 1 | import { initialize } from "./initialize"; 2 | import * as market from "./market"; 3 | import * as oracle from "./oracle"; 4 | import * as referral from "./referral"; 5 | import * as getProfile from "./profile"; 6 | 7 | export { 8 | initialize, 9 | market, 10 | oracle, 11 | referral, 12 | getProfile, 13 | } -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/constants.rs: -------------------------------------------------------------------------------- 1 | pub const GLOBAL_SEED: &'static str = "global_seed"; 2 | pub const MARKET_SEED: &'static str = "market_seed"; 3 | pub const MINT_SEED_A: &'static str = "mint_a_seed"; 4 | pub const MINT_SEED_B: &'static str = "mint_b_seed"; 5 | pub const SOL_USDC_FEED: &str = "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"; 6 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["mocha", "chai"], 4 | "typeRoots": ["./node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "esModuleInterop": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /FrontEnd/public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /FrontEnd/public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BackEnd/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { Router, Request, Response } from "express"; 2 | import marketRouter from "./market"; 3 | import oracleRouter from "./oracle"; 4 | import referralRouter from './referral'; 5 | import getProfile from './profile' 6 | 7 | const router = Router(); 8 | router.use("/market", marketRouter); 9 | router.use("/oracle", oracleRouter); 10 | router.use("/referral", referralRouter); 11 | router.use("/profile", getProfile); 12 | 13 | export default router; 14 | -------------------------------------------------------------------------------- /BackEnd/src/controller/referral/utils.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | /** 4 | * Generates a referral code from a wallet address. 5 | * @param walletAddress The user's wallet address (e.g., 0xabc...123) 6 | * @returns A short, unique referral code 7 | */ 8 | export function generateReferralCodeFromWallet(walletAddress: string): string { 9 | const hash = crypto.createHash('sha256').update(walletAddress).digest('hex'); 10 | 11 | return hash.slice(0, 8); // take first 8 characters 12 | } -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/Icons/index.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | import { IconName, Icons } from "./Icons"; 3 | 4 | interface Props { 5 | name: IconName; 6 | size?: number; 7 | className?: string; 8 | color?: string; 9 | } 10 | 11 | const Icon: FC = ({ name, size, className, color }) => { 12 | const SvgIcon = Icons[name]; 13 | return SvgIcon ? ( 14 | 15 | ) : null; 16 | }; 17 | 18 | export default Icon; 19 | -------------------------------------------------------------------------------- /FrontEnd/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { dirname } from "path"; 2 | import { fileURLToPath } from "url"; 3 | import { FlatCompat } from "@eslint/eslintrc"; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | const compat = new FlatCompat({ 9 | baseDirectory: __dirname, 10 | }); 11 | 12 | const eslintConfig = [ 13 | ...compat.extends("next/core-web-vitals", "next/typescript", "@typescript-eslint/no-unused-vars"), 14 | ]; 15 | 16 | export default eslintConfig; 17 | -------------------------------------------------------------------------------- /BackEnd/src/router/market/index.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | import { market } from "../../controller"; 3 | import { proposeValidator } from "../../middleware/proposeValidator"; 4 | 5 | const router = Router(); 6 | 7 | router.post("/create", proposeValidator, market.create_market); 8 | router.post("/add", market.additionalInfo); 9 | router.post("/addLiquidity", market.add_liquidity); 10 | router.post("/betting", market.betting); 11 | router.post("/liquidity", market.addLiquidity); 12 | router.get("/get", market.getMarketData); 13 | 14 | export default router; -------------------------------------------------------------------------------- /BackEnd/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "commonjs", 5 | "lib": ["ES2020"], 6 | "outDir": "./dist", 7 | "rootDir": "./src", 8 | "esModuleInterop": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "strict": true, 11 | "skipLibCheck": true, 12 | "resolveJsonModule": true, 13 | "moduleResolution": "node", 14 | "declaration": true, 15 | "declarationMap": true, 16 | "sourceMap": true 17 | }, 18 | "include": ["src/**/*"], 19 | "exclude": ["node_modules", "dist"] 20 | } -------------------------------------------------------------------------------- /BackEnd/src/model/referral.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const Referral = new mongoose.Schema({ 4 | wallet: { type: String, required: true }, 5 | referralCode: { type: String, required: true }, 6 | status: { type: String, default: "PENDING" }, 7 | fee: { type: Number, default: 0 }, 8 | referredLevel: { type: Number, required: true }, 9 | wallet_refered: { type: String, default: "" }, 10 | createdAt: { type: String, default: Date.now() }, 11 | }); 12 | 13 | const ReferModel = mongoose.model("refferal", Referral); 14 | 15 | export default ReferModel; -------------------------------------------------------------------------------- /BackEnd/src/model/recent.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const Recent = new mongoose.Schema({ 4 | marketId: { type: String, required: true }, 5 | isFund: { type: Boolean, default: false }, 6 | buyYes: { type: Boolean, default: false }, 7 | buyNo: { type: Boolean, default: false }, 8 | sellYes: { type: Boolean, default: false }, 9 | sellNo: { type: Boolean, default: false }, 10 | fundAmount: {type: Number, default: 0}, 11 | createdAt: { type: String, default: Date.now() }, 12 | }); 13 | 14 | const RecentModel = mongoose.model("recent", Recent); 15 | 16 | export default RecentModel; -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "prediction" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "prediction" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = { version = "0.29.0", features = ["init-if-needed", "event-cpi"] } 20 | anchor-spl = { version = "0.29.0", features = ["metadata"] } 21 | switchboard-solana = "0.29.79" 22 | switchboard-on-demand = "0.1.12" 23 | rust_decimal = "1.37.1" 24 | -------------------------------------------------------------------------------- /FrontEnd/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env* 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", 4 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" 5 | }, 6 | "dependencies": { 7 | "@coral-xyz/anchor": "^0.29.0", 8 | "@solana/spl-token": "^0.4.13", 9 | "bn.js": "^5.2.1" 10 | }, 11 | "devDependencies": { 12 | "@types/bn.js": "^5.1.0", 13 | "@types/chai": "^4.3.0", 14 | "@types/mocha": "^9.0.0", 15 | "chai": "^4.3.4", 16 | "mocha": "^9.0.3", 17 | "prettier": "^2.6.2", 18 | "ts-mocha": "^10.0.0", 19 | "typescript": "^4.3.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /BackEnd/src/controller/oracle/index.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express" 2 | 3 | export const registFeed = async (req: Request, res: Response) => { 4 | try { 5 | const { feedName, dataLink, task } = req.body.data; 6 | // const cluster = process.env.CLUSTER === "Mainnet" ? "Mainnet" : "Devnet"; 7 | // console.log(feedName, dataLink, task); 8 | // await customizeFeed({ url: dataLink, task, name: feedName, cluster }); 9 | res.status(200).json({ message: "Feed registration successful!" }); 10 | } catch (error) { 11 | console.log("😒 error:", error); 12 | res.status(500).send("Something went wrong fee registration!"); 13 | } 14 | } -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/states/global.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | #[derive(InitSpace, Debug)] 5 | pub struct Global { 6 | pub admin: Pubkey, 7 | pub fee_authority: Pubkey, 8 | pub creator_fee_amount: u64, 9 | pub decimal: u8, 10 | pub market_count: u64, 11 | pub betting_fee_percentage: f64, 12 | pub fund_fee_percentage: f64, 13 | } 14 | 15 | #[derive(AnchorSerialize, AnchorDeserialize)] 16 | pub struct GlobalParams { 17 | pub fee_authority: Pubkey, 18 | pub creator_fee_amount: u64, 19 | pub market_count: u64, 20 | pub decimal: u8, 21 | pub betting_fee_percentage: f64, 22 | pub fund_fee_percentage: f64, 23 | } 24 | -------------------------------------------------------------------------------- /FrontEnd/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /BackEnd/src/controller/initialize/index.ts: -------------------------------------------------------------------------------- 1 | import { global, setClusterConfig } from "../../prediction_market_sdk" 2 | import { Cluster } from "@solana/web3.js" 3 | import { GlobalSettingType } from "../../type"; 4 | import { execute } from "../bot/utils"; 5 | 6 | export const initialize = async (cluster: Cluster, param: GlobalSettingType ) => { 7 | setClusterConfig(cluster); 8 | await execute(); 9 | const result = await global(param); 10 | if (result) { 11 | if (!result.new) { 12 | console.log("Global is already initialized.", result.globalPDA.toBase58()); 13 | } else { 14 | console.log("Global is successfuly initialized.", result.globalPDA.toBase58()); 15 | } 16 | } else { 17 | console.log("🚩Failed creating gloabal PDA."); 18 | } 19 | } -------------------------------------------------------------------------------- /prediction-market-smartcontract/Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | seeds = false 5 | skip-lint = false 6 | 7 | [programs.devnet] 8 | prediction = "Bki3CWk4AmVF78zvh81rup2EK2iJY4WRCUXesAv8TECF" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "Devnet" 15 | wallet = "./prediction.json" 16 | 17 | [scripts] 18 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" 19 | 20 | [[test.validator.clone]] # switchboard-solana devnet programID 21 | address = "SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f" 22 | 23 | [[test.validator.clone]] # switchboard-solana devnet IDL 24 | address = "Fi8vncGpNKbq62gPo56G4toCehWNy77GgqGkTaAF5Lkk" 25 | 26 | [[test.validator.clone]] # switchboard-solana SOL/USD Feed 27 | address = "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR" -------------------------------------------------------------------------------- /FrontEnd/src/components/layouts/index.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode, useState } from "react"; 2 | import HeaderTop from "./header/HeaderTop"; 3 | import HeaderSideBar from "./header/HeaderSideBar"; 4 | 5 | const Layout = ({ children }: { children: ReactNode }) => { 6 | const [isCollapsed, setIsCollapsed] = useState(false); 7 | return ( 8 |
9 |
10 | 11 |
12 | 13 | {children} 14 |
15 |
16 |
17 | ); 18 | }; 19 | 20 | export default Layout; 21 | -------------------------------------------------------------------------------- /FrontEnd/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | export default { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | "./src/landing/**/*.{js,ts,jsx,tsx,mdx}", 9 | ], 10 | theme: { 11 | extend: { 12 | screens: { 13 | "3xl": "2000px", 14 | "4xl": "2560px", 15 | }, 16 | colors: { 17 | background: "var(--background)", 18 | foreground: "var(--foreground)", 19 | primary: "#07B3FF", 20 | }, 21 | fontFamily: { 22 | anton: ["anton"], 23 | satoshi: ["satoshi"], 24 | rubik:["rubik"], 25 | interSemi:["interSemi"], 26 | }, 27 | }, 28 | }, 29 | plugins: [], 30 | } satisfies Config; 31 | -------------------------------------------------------------------------------- /FrontEnd/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | @import "./fonts.css"; 3 | 4 | 5 | :root { 6 | --background: #ffffff; 7 | --foreground: #171717; 8 | } 9 | 10 | @theme { 11 | --font-display: "satoshi", "rubik", "interSemi" "sans-serif"; 12 | --color-*: initial; 13 | --color-white: #fff; 14 | --color-purple: #3F3CBB; 15 | --color-midnight: #121063; 16 | --color-tahiti: #3AB7BF; 17 | --color-bermuda: #78DCCA; 18 | --color-blue: #07b3ff; 19 | --color-gray: #838587; 20 | --color-red: #FF6464; 21 | } 22 | 23 | body { 24 | background: #181a1b; 25 | } 26 | 27 | input[type="date"]::-webkit-calendar-picker-indicator { 28 | filter: invert(1); 29 | /* inverts the color, making black -> white */ 30 | cursor: pointer; 31 | } 32 | 33 | input[type=number]::-webkit-inner-spin-button, 34 | input[type=number]::-webkit-outer-spin-button { 35 | -webkit-appearance: none; 36 | margin: 0; 37 | } -------------------------------------------------------------------------------- /FrontEnd/src/app/about/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { useState } from "react"; 4 | import { AboutSection } from "@/components/elements/about/AboutSection"; 5 | import AboutSubSidebar from "@/components/elements/about/AboutSubSidebar"; 6 | 7 | export default function AboutPage() { 8 | const [selectedIndex, setSelectedIndex] = useState(0); 9 | return ( 10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /BackEnd/src/oracle_service/simulateFeed.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CrossbarClient, 3 | } from "@switchboard-xyz/common"; 4 | import { 5 | PullFeed, 6 | getDefaultQueue, 7 | asV0Tx, 8 | ON_DEMAND_DEVNET_PID 9 | } from "@switchboard-xyz/on-demand"; 10 | 11 | import { FeedUpdateType } from "../type"; 12 | import { PublicKey } from "@solana/web3.js"; 13 | import { Program } from "@coral-xyz/anchor-30"; 14 | import { auth } from "../config"; 15 | 16 | export const udpateFeed = async (param: FeedUpdateType) => { 17 | const sbProgram = await Program.at(ON_DEMAND_DEVNET_PID, provider); 18 | const feed = new PublicKey(param.feed); 19 | const feedAccount = new PullFeed(sbProgram, feed); 20 | // Get the queue for the network you're deploying on 21 | let queue = await getDefaultQueue("https://api.devnet.solana.com"); 22 | 23 | // Get the crossbar server client 24 | const crossbarClient = CrossbarClient.default(); 25 | } -------------------------------------------------------------------------------- /FrontEnd/src/hooks/useWindowSize.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useState, useEffect } from "react"; 3 | // Define general type for useWindowSize hook, which includes width and height 4 | export interface Size { 5 | width: number | undefined; 6 | height: number | undefined; 7 | // isMobile: boolean; 8 | } 9 | 10 | export function useWindowSize(): Size { 11 | const [windowSize, setWindowSize] = useState({ 12 | width: undefined, 13 | height: undefined, 14 | // isMobile: false, 15 | }); 16 | useEffect(() => { 17 | function handleResize() { 18 | setWindowSize({ 19 | width: window.innerWidth, 20 | height: window.innerHeight, 21 | // isMobile: window.innerWidth <= 768, 22 | }); 23 | } 24 | window.addEventListener("resize", handleResize); 25 | handleResize(); 26 | return () => window.removeEventListener("resize", handleResize); 27 | }, []); 28 | return windowSize; 29 | } -------------------------------------------------------------------------------- /prediction-market-smartcontract/tests/const.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | 3 | export const GLOBAL_SEED = "global_7"; 4 | export const MARKET_SEED = "market_7"; 5 | export const MINT_SEED_A = "mint_a_7"; 6 | export const MINT_SEED_B = "mint_b_7"; 7 | 8 | export const PREDICTION_ID = new PublicKey("Da4udDYBTFUrdCjRkstWMMpxQdPi6pkq7CXicSUNZA2u"); 9 | export const SOL_USDC_FEED = "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"; 10 | export const TOKEN_METADATA_PROGRAM_ID = new PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"); 11 | export const tokenA = new PublicKey("GYwonCewvmEKtMY7ELqGfZGM4Y1egwGaU28dNnY6UnJL"); 12 | export const tokenB = new PublicKey("AsVh2yGE2Xg1Uqmnwcwb6MB36VCTHDat4QuUpF1jPFcw"); 13 | export const feeAuthority = new PublicKey("StevaDhwHcFMvMi31n8R2SvEenH93K3eX7RExcTJzKY"); 14 | export const METADATA_SEED = "metadata"; 15 | 16 | export const tokenAAmount = 10000000; 17 | export const tokenBAmount = 10000000; -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/README.md: -------------------------------------------------------------------------------- 1 | # Installing Webfonts 2 | Follow these simple Steps. 3 | 4 | ## 1. 5 | Put `satoshi/` Folder into a Folder called `fonts/`. 6 | 7 | ## 2. 8 | Put `satoshi.css` into your `css/` Folder. 9 | 10 | ## 3. (Optional) 11 | You may adapt the `url('path')` in `satoshi.css` depends on your Website Filesystem. 12 | 13 | ## 4. 14 | Import `satoshi.css` at the top of you main Stylesheet. 15 | 16 | ``` 17 | @import url('satoshi.css'); 18 | ``` 19 | 20 | ## 5. 21 | 22 | 23 | ``` 24 | font-family: 'Satoshi-Variable'; 25 | font-family: 'Satoshi-VariableItalic'; 26 | font-family: 'Satoshi-Light'; 27 | font-family: 'Satoshi-LightItalic'; 28 | font-family: 'Satoshi-Regular'; 29 | font-family: 'Satoshi-Italic'; 30 | font-family: 'Satoshi-Medium'; 31 | font-family: 'Satoshi-MediumItalic'; 32 | font-family: 'Satoshi-Bold'; 33 | font-family: 'Satoshi-BoldItalic'; 34 | font-family: 'Satoshi-Black'; 35 | font-family: 'Satoshi-BlackItalic'; 36 | ``` 37 | 38 | -------------------------------------------------------------------------------- /FrontEnd/public/globe.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BackEnd/src/prediction_market_sdk/constants.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | 3 | export const GLOBAL_SEED = "global_seed"; 4 | export const MARKET_SEED = "market_seed"; 5 | export const MINT_SEED_A = "mint_a_seed"; 6 | export const MINT_SEED_B = "mint_b_seed"; 7 | 8 | export const PREDICTION_ID = new PublicKey( 9 | "Bki3CWk4AmVF78zvh81rup2EK2iJY4WRCUXesAv8TECF" 10 | ); 11 | export const SOL_USDC_FEED = "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"; 12 | export const TOKEN_METADATA_PROGRAM_ID = new PublicKey( 13 | "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" 14 | ); 15 | export const tokenA = new PublicKey( 16 | "GYwonCewvmEKtMY7ELqGfZGM4Y1egwGaU28dNnY6UnJL" 17 | ); 18 | export const tokenB = new PublicKey( 19 | "AsVh2yGE2Xg1Uqmnwcwb6MB36VCTHDat4QuUpF1jPFcw" 20 | ); 21 | export const feeAuthority = new PublicKey( 22 | "StevaDhwHcFMvMi31n8R2SvEenH93K3eX7RExcTJzKY" 23 | ); 24 | export const METADATA_SEED = "metadata"; 25 | 26 | export const tokenAAmount = 10000000; 27 | export const tokenBAmount = 10000000; 28 | -------------------------------------------------------------------------------- /FrontEnd/src/components/prediction_market_sdk/constants.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | 3 | export const GLOBAL_SEED = "global_6"; 4 | export const MARKET_SEED = "market_6"; 5 | export const MINT_SEED_A = "mint_a_6"; 6 | export const MINT_SEED_B = "mint_b_6"; 7 | 8 | export const PREDICTION_ID = new PublicKey( 9 | "8CSBdHqRErYAERtVLutBkkBCWcKLimqRzvZ7kXKujcGC" 10 | ); 11 | export const SOL_USDC_FEED = "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"; 12 | export const TOKEN_METADATA_PROGRAM_ID = new PublicKey( 13 | "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" 14 | ); 15 | export const tokenA = new PublicKey( 16 | "GYwonCewvmEKtMY7ELqGfZGM4Y1egwGaU28dNnY6UnJL" 17 | ); 18 | export const tokenB = new PublicKey( 19 | "AsVh2yGE2Xg1Uqmnwcwb6MB36VCTHDat4QuUpF1jPFcw" 20 | ); 21 | export const feeAuthority = new PublicKey( 22 | "GdCJ8rM2cbdKXZMBH5H4EmvLinQSp78Xg1stHoh4nUpr" 23 | ); 24 | export const METADATA_SEED = "metadata"; 25 | 26 | export const tokenAAmount = 10000000; 27 | export const tokenBAmount = 10000000; 28 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/errors.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error_code] 4 | #[derive(Eq, PartialEq)] 5 | pub enum ContractError { 6 | #[msg("Not a valid Switchboard account")] 7 | InvalidSwitchboardAccount, 8 | #[msg("Switchboard feed has not been updated in 5 minutes")] 9 | StaleFeed, 10 | #[msg("Switchboard feed exceeded provided confidence interval")] 11 | ConfidenceIntervalExceeded, 12 | #[msg("Invalid fund amount")] 13 | InvalidFundAmount, 14 | #[msg("Current SOL price is not above Escrow unlock price.")] 15 | SolPriceBelowUnlockPrice, 16 | #[msg("Arithmetic error")] 17 | ArithmeticError, 18 | #[msg("Invalid creator")] 19 | InvalidCreator, 20 | #[msg("Invalid fee authority")] 21 | InvalidFeeAuthority, 22 | #[msg("Not preparing status")] 23 | NotPreparing, 24 | #[msg("Invalid market")] 25 | InvalidMarket, 26 | #[msg("Market is not active")] 27 | MarketNotActive, 28 | #[msg("Invalid Admin")] 29 | InvalidAdmin, 30 | } 31 | -------------------------------------------------------------------------------- /BackEnd/src/middleware/proposeValidator.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response, NextFunction } from "express"; 2 | 3 | export const proposeValidator = (req: Request, res: Response, next: NextFunction) => { 4 | const { isChecked } = req.body; 5 | const propose = {...req.body.data}; 6 | 7 | let errocount = 0; 8 | 9 | if (propose) { 10 | for (const key in propose) { 11 | if (propose[key] === "") { 12 | propose[key] = "empty"; 13 | errocount++; 14 | } else { 15 | propose[key] = ""; 16 | } 17 | } 18 | 19 | if (propose.feedName.length > 32) { 20 | propose.feedName = "too long"; 21 | errocount++; 22 | } 23 | } 24 | if (errocount > 0) { 25 | res.status(401).send(propose); 26 | return; 27 | } 28 | 29 | if (!isChecked) { 30 | res.status(401).send({ 31 | checkbox: "Please check the box to agree to the terms and conditions." 32 | }); 33 | return; 34 | } else { 35 | next(); 36 | } 37 | } -------------------------------------------------------------------------------- /BackEnd/src/prediction_market_sdk/event.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@coral-xyz/anchor"; 2 | import { PREDICTION_ID } from "./constants"; 3 | import { IDL } from "./idl/idl"; 4 | import MarketModel from "../model/market"; 5 | 6 | let program = new anchor.Program(IDL as anchor.Idl, PREDICTION_ID); 7 | 8 | const OracleEvent = program.addEventListener("OracleResUpdated", (event, slot, signature) => { 9 | console.log("👻OracleResUpdated 👻", Number(event.oracleRes)); 10 | }); 11 | 12 | const GlobalEvent = program.addEventListener("GlobalInitialized", (event, slot, signature) => { 13 | console.log("👻GlobalInitilized 👻", event); 14 | }); 15 | 16 | const MarketEvent = program.addEventListener("MarketCreated", async (event, slot, signature) => { 17 | console.log("👻MarketCreated 👻", event); 18 | 19 | const result = await MarketModel.findOneAndUpdate( 20 | //@ts-ignore 21 | { market: event.market.toString() }, 22 | { 23 | marketStatus: "PENDING", 24 | }, 25 | { upsert: true, new: true } 26 | ); 27 | console.log("MarketEvent result:", result); 28 | }); -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/events.rs: -------------------------------------------------------------------------------- 1 | use crate::states::market::MarketStatus; 2 | use anchor_lang::prelude::*; 3 | #[event] 4 | pub struct GlobalInitialized { 5 | pub global_id: Pubkey, 6 | pub fee_recipient: Pubkey, 7 | pub creator_fee_amount: u64, 8 | pub market_count: u64, 9 | pub decimal: u8, 10 | pub fund_fee_percentage: f64, 11 | pub betting_fee_percentage: f64, 12 | } 13 | 14 | #[event] 15 | pub struct OracleResUpdated { 16 | pub oracle_res: f64, 17 | } 18 | 19 | #[event] 20 | pub struct MarketCreated { 21 | pub market_id: Pubkey, 22 | pub value: f64, 23 | pub range: u8, 24 | pub creator: Pubkey, 25 | pub feed: Pubkey, 26 | pub token_a: Pubkey, 27 | pub token_b: Pubkey, 28 | pub market_status: MarketStatus, 29 | pub token_a_amount: u64, 30 | pub token_b_amount: u64, 31 | pub token_price_a: u64, 32 | pub token_price_b: u64, 33 | pub total_reserve: u64, 34 | } 35 | 36 | #[event] 37 | pub struct MarketStatusUpdated { 38 | pub market_id: Pubkey, 39 | pub market_status: MarketStatus, 40 | } 41 | 42 | #[event] 43 | pub struct BettingEvent { 44 | pub token_a_price: u64, 45 | pub token_b_price: u64, 46 | } 47 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/buttons/VoteBtn.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import Icon from "../Icons"; 5 | 6 | interface VoteButtonProps { 7 | onClick: () => void; 8 | label: string; 9 | color: string; // Example: "#3fd145" or "#ff6464" 10 | icon: "yes" | "no"; // Example: "check", "cross" 11 | } 12 | 13 | const VoteButton: React.FC = ({ 14 | onClick, 15 | label, 16 | color, 17 | icon, 18 | }) => { 19 | return ( 20 | 37 | ); 38 | }; 39 | 40 | export default VoteButton; 41 | -------------------------------------------------------------------------------- /FrontEnd/src/app/fonts.css: -------------------------------------------------------------------------------- 1 | /* styles fonts.css */ 2 | @font-face { 3 | font-family: "anton"; 4 | font-weight: 400; 5 | font-style: normal; 6 | src: url("/fonts/Anton_SC,Rubik/Anton_SC/AntonSC-Regular.ttf") 7 | format("truetype"), 8 | url("/fonts/Anton_SC,Rubik/Anton_SC/AntonSC-Regular.ttf") format("truetype"); 9 | } 10 | 11 | @font-face { 12 | font-family: "satothi"; 13 | font-weight: 400; 14 | font-style: normal; 15 | src: url("/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.ttf") 16 | format("truetype"), 17 | url("/fonts/Satoshi_Complete/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Regular.ttf") 18 | format("truetype"); 19 | } 20 | 21 | @font-face { 22 | font-family: "rubik"; 23 | font-weight: 400; 24 | font-style: normal; 25 | src: url("/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Regular.ttf") 26 | format("truetype"), 27 | url("/fonts/Anton_SC,Rubik/Rubik/static/Rubik-Regular.ttf") 28 | format("truetype"); 29 | } 30 | 31 | @font-face { 32 | font-family: "interSemi"; 33 | font-weight: 400; 34 | font-style: normal; 35 | src: url("/fonts/inter/static/Inter_24pt-SemiBold.ttf") format("truetype"), 36 | url("/fonts/inter/static/Inter_24pt-SemiBold.ttf") format("truetype"); 37 | } 38 | -------------------------------------------------------------------------------- /FrontEnd/src/components/layouts/partials/SearchBar.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import Icon from "@/components/elements/Icons"; 4 | 5 | interface SearchBarProps { 6 | placeholder?: string; 7 | showShortcut?: boolean; 8 | } 9 | 10 | const SearchBar: React.FC = ({ 11 | placeholder = "Search", 12 | showShortcut = true, 13 | }) => { 14 | return ( 15 |
16 | 17 | 23 | {showShortcut && ( 24 |
25 | 26 | ⌘V 27 | 28 |
29 | )} 30 |
31 | ); 32 | }; 33 | 34 | export default SearchBar; 35 | -------------------------------------------------------------------------------- /FrontEnd/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/utils.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::{prelude::*, solana_program}; 2 | use anchor_spl::token; 3 | 4 | pub fn sol_transfer<'a>( 5 | from_account: AccountInfo<'a>, 6 | to_account: AccountInfo<'a>, 7 | system_program: AccountInfo<'a>, 8 | amount: u64, 9 | ) -> Result<()> { 10 | let transfer_instruction = 11 | solana_program::system_instruction::transfer(from_account.key, to_account.key, amount); 12 | 13 | // Invoke the transfer instruction 14 | anchor_lang::solana_program::program::invoke_signed( 15 | &transfer_instruction, 16 | &[from_account, to_account, system_program], 17 | &[], 18 | )?; 19 | 20 | Ok(()) 21 | } 22 | 23 | pub fn token_transfer<'a>( 24 | from_ata: AccountInfo<'a>, 25 | to_ata: AccountInfo<'a>, 26 | authority: AccountInfo<'a>, 27 | token_program: AccountInfo<'a>, 28 | singer_seed: &[&[&[u8]]; 1], 29 | amount: u64, 30 | ) -> Result<()> { 31 | let cpi_ctx: CpiContext<_> = CpiContext::new_with_signer( 32 | token_program.to_account_info(), 33 | token::Transfer { 34 | from: from_ata, 35 | authority: authority.to_account_info(), 36 | to: to_ata, 37 | }, 38 | singer_seed, 39 | ); 40 | token::transfer(cpi_ctx, amount)?; 41 | 42 | Ok(()) 43 | } 44 | -------------------------------------------------------------------------------- /FrontEnd/src/app/fund/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import FundCard from "@/components/elements/fund/FundCard"; 4 | import Market from "@/components/elements/marketInfo/Market"; 5 | import { useGlobalContext } from "@/providers/GlobalContext"; 6 | import axios from "axios"; 7 | import { usePathname } from "next/navigation"; 8 | import { useEffect } from "react"; 9 | 10 | export default function FundMarket() { 11 | const pathname = usePathname(); 12 | const { setActiveTab } = useGlobalContext(); // Ensure setActiveTab exists in context 13 | 14 | useEffect(() => { 15 | if (pathname === "/fund") { 16 | setActiveTab("PENDING"); // Update tab 17 | } 18 | }, [pathname, setActiveTab]); // Dependency array ensures it runs on pathname change 19 | 20 | return ( 21 |
22 | {/* */} 23 | 33 | 34 |
35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/profile/ProfileNavbar.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | 5 | interface ProfileNavbarProps { 6 | activeTab: "Betting History" | "Funded Market" | "Proposed Market"; 7 | onTabChange: (tab: "Betting History" | "Funded Market" | "Proposed Market") => void; 8 | } 9 | 10 | const ProfileNavbar: React.FC = ({ activeTab, onTabChange }) => { 11 | const tabs: ("Betting History" | "Funded Market" | "Proposed Market")[] = [ 12 | "Betting History", 13 | "Funded Market", 14 | "Proposed Market", 15 | ]; 16 | 17 | return ( 18 |
19 | {tabs.map((tab) => ( 20 |
onTabChange(tab)} 24 | className={`px-4 py-2.5 rounded-2xl flex justify-start items-center gap-2 cursor-pointer 25 | ${activeTab === tab 26 | ? "bg-[#282828] shadow-[inset_0px_2px_0px_0px_rgba(53,53,53,1.00)] text-white" 27 | : "outline-1 outline-offset-[-1px] outline-[#313131] text-[#838587]" 28 | }`} 29 | > 30 |
31 | {tab} 32 |
33 |
34 | ))} 35 |
36 | ); 37 | }; 38 | 39 | export default ProfileNavbar; 40 | -------------------------------------------------------------------------------- /BackEnd/src/index.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import cors from "cors"; 3 | import dotenv from "dotenv"; 4 | import router from "./router"; 5 | import http from "http"; 6 | import { initialize } from "./controller"; 7 | import { connectMongoDB, initialSettings } from "./config"; 8 | 9 | dotenv.config(); 10 | 11 | connectMongoDB(); 12 | 13 | const { creatorFeeAmount, marketCount, decimal, fundFeePercentage, bettingFeePercentage } = initialSettings; 14 | const app = express(); 15 | 16 | // Middleware 17 | app.use(express.json({ limit: '50mb' })); 18 | app.use(express.urlencoded({ limit: '50mb', extended: true })); 19 | app.use(cors()); 20 | app.use("/api", router); 21 | 22 | initialize("devnet", { 23 | creatorFeeAmount, 24 | marketCount, 25 | decimal, 26 | fundFeePercentage, 27 | bettingFeePercentage 28 | }); 29 | 30 | app.get("/", (req, res) => { 31 | res.send("💕 Welcome to Prediction market server! 💕"); 32 | }); 33 | 34 | const port = process.env.PORT || "9000"; 35 | const server = http.createServer(app); 36 | 37 | server.listen(port, () => { 38 | console.log(`------------------------------------------------------------`); 39 | console.log(`| |`); 40 | console.log(`| 🤩 Server is running on port ${port}: http://localhost:${port} |`); 41 | console.log(`| |`); 42 | console.log(`------------------------------------------------------------`); 43 | }); 44 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/lib.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | pub mod constants; 3 | pub mod errors; 4 | pub mod events; 5 | pub mod instructions; 6 | pub mod states; 7 | pub mod utils; 8 | 9 | use instructions::{ 10 | betting::*, create_market::*, deposite_liquidity::*, get_oracle_res::*, init::*, token_mint::*, 11 | withdraw::*, 12 | }; 13 | use states::{ 14 | global::GlobalParams, 15 | market::{BettingParams, MarketParams}, 16 | }; 17 | 18 | declare_id!("Bki3CWk4AmVF78zvh81rup2EK2iJY4WRCUXesAv8TECF"); 19 | 20 | #[program] 21 | pub mod prediction { 22 | use super::*; 23 | 24 | pub fn initialize(ctx: Context, params: GlobalParams) -> Result<()> { 25 | init(ctx, params) 26 | } 27 | 28 | pub fn get_res(ctx: Context) -> Result<()> { 29 | get_oracle_res(ctx) 30 | } 31 | 32 | pub fn init_market(ctx: Context, params: MarketParams) -> Result<()> { 33 | CreateMarket::create_market(ctx, params) 34 | } 35 | 36 | pub fn add_liquidity(ctx: Context, amount: u64) -> Result<()> { 37 | deposit_liquidity(ctx, amount) 38 | } 39 | 40 | pub fn create_bet(ctx: Context, params: BettingParams) -> Result<()> { 41 | Betting::betting(ctx, params) 42 | } 43 | 44 | pub fn mint_token(ctx: Context, market_id: String) -> Result<()> { 45 | TokenMint::token_mint(ctx, market_id) 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /FrontEnd/src/components/layouts/partials/MarketTabs.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import Icon from "@/components/elements/Icons"; 3 | 4 | const tabs = [ 5 | { key: "ActiveMarket", label: "Active Market", icon: "ActiveMarket" }, 6 | { key: "PendingMarket", label: "Pending Market", icon: "PendingMarket" }, 7 | ] as const; 8 | 9 | type TabKey = (typeof tabs)[number]["key"]; 10 | 11 | const MarketTabs = () => { 12 | const [activeTab, setActiveTab] = useState("ActiveMarket"); 13 | 14 | return ( 15 |
16 | {tabs.map(({ key, label, icon }) => ( 17 | 31 | ))} 32 |
33 | ); 34 | }; 35 | 36 | export default MarketTabs; 37 | -------------------------------------------------------------------------------- /FrontEnd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prediction-market-frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@coral-xyz/anchor": "^0.29.0", 13 | "@solana/spl-token": "^0.4.13", 14 | "@solana/wallet-adapter-phantom": "^0.9.25", 15 | "@solana/wallet-adapter-react": "^0.15.36", 16 | "@solana/wallet-adapter-react-ui": "^0.9.36", 17 | "@solana/web3.js": "^1.98.0", 18 | "@switchboard-xyz/common": "^3.0.14", 19 | "@switchboard-xyz/on-demand": "^2.4.1", 20 | "axios": "^1.8.4", 21 | "bn.js": "^5.2.1", 22 | "framer-motion": "^12.10.5", 23 | "next": "15.2.1", 24 | "pm2": "^6.0.8", 25 | "postcss": "^8.5.3", 26 | "react": "^19.0.0", 27 | "react-dom": "^19.0.0", 28 | "react-hot-toast": "^2.5.2", 29 | "react-icons": "^5.5.0", 30 | "react-multi-carousel": "^2.8.5", 31 | "react-spinners": "^0.17.0", 32 | "react-toastify": "^11.0.5" 33 | }, 34 | "devDependencies": { 35 | "@eslint/eslintrc": "^3", 36 | "@tailwindcss/postcss": "^4.0.12", 37 | "@types/bn.js": "^5.1.6", 38 | "@types/node": "^20", 39 | "@types/react": "^19", 40 | "@types/react-dom": "^19", 41 | "@types/react-icons": "^3.0.0", 42 | "@types/react-toastify": "^1.0.0", 43 | "eslint": "^9", 44 | "eslint-config-next": "15.2.1", 45 | "tailwindcss": "^4.0.12", 46 | "typescript": "^5" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/instructions/init.rs: -------------------------------------------------------------------------------- 1 | use crate::constants::GLOBAL_SEED; 2 | use crate::events::GlobalInitialized; 3 | use crate::states::global::*; 4 | use anchor_lang::prelude::*; 5 | 6 | #[derive(Accounts)] 7 | pub struct Initialize<'info> { 8 | #[account(mut)] 9 | pub payer: Signer<'info>, 10 | #[account( 11 | init, 12 | payer = payer, 13 | space = 8 + Global::INIT_SPACE, 14 | seeds = [GLOBAL_SEED.as_bytes()], 15 | bump 16 | )] 17 | pub global: Account<'info, Global>, 18 | pub system_program: Program<'info, System>, 19 | } 20 | 21 | pub fn init(ctx: Context, params: GlobalParams) -> Result<()> { 22 | let global = &mut ctx.accounts.global; 23 | global.admin = ctx.accounts.payer.key(); 24 | global.fee_authority = params.fee_authority; 25 | global.creator_fee_amount = params.creator_fee_amount; 26 | global.market_count = params.market_count; 27 | global.decimal = params.decimal; 28 | global.fund_fee_percentage = params.fund_fee_percentage; 29 | global.betting_fee_percentage = params.betting_fee_percentage; 30 | 31 | emit!(GlobalInitialized { 32 | global_id: global.key(), 33 | fee_recipient: global.fee_authority, 34 | creator_fee_amount: global.creator_fee_amount, 35 | market_count: global.market_count, 36 | decimal: global.decimal, 37 | fund_fee_percentage: global.fund_fee_percentage, 38 | betting_fee_percentage: global.betting_fee_percentage, 39 | }); 40 | 41 | Ok(()) 42 | } 43 | -------------------------------------------------------------------------------- /BackEnd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prediction-market-backend", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1", 7 | "start": "ts-node ./src/index.ts", 8 | "dev": "ts-node-dev ./src/index.ts", 9 | "build": "tsc" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/BlackSky-Jose/Prediction-market-SOLANA.git" 14 | }, 15 | "keywords": [ 16 | "solana", 17 | "prediction-market", 18 | "blockchain", 19 | "anchor" 20 | ], 21 | "author": "", 22 | "license": "ISC", 23 | "bugs": { 24 | "url": "https://github.com/BlackSky-Jose/Prediction-market-SOLANA/issues" 25 | }, 26 | "homepage": "https://github.com/BlackSky-Jose/Prediction-market-SOLANA#readme", 27 | "description": "Backend service for Solana Prediction Market", 28 | "dependencies": { 29 | "@coral-xyz/anchor": "^0.29.0", 30 | "@mercurial-finance/vault-sdk": "^2.2.1", 31 | "@metaplex-foundation/mpl-toolbox": "^0.10.0", 32 | "@solana/spl-token": "^0.4.13", 33 | "@solana/web3.js": "^1.98.0", 34 | "@switchboard-xyz/common": "^3.0.14", 35 | "@switchboard-xyz/on-demand": "^2.4.1", 36 | "bn.js": "^5.2.1", 37 | "convict": "^6.2.4", 38 | "cors": "^2.8.5", 39 | "dotenv": "^16.4.7", 40 | "express": "^5.1.0", 41 | "jito-ts": "^4.2.0", 42 | "mongoose": "^8.13.1", 43 | "ts-node": "^10.9.2", 44 | "ts-node-dev": "^2.0.0" 45 | }, 46 | "devDependencies": { 47 | "@types/bn.js": "^5.1.6", 48 | "@types/cors": "^2.8.17", 49 | "@types/express": "^5.0.1", 50 | "@types/node": "^20.14.0", 51 | "typescript": "^5.8.2" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/about/AboutFaq.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | interface SidebarItemProps { 4 | title: string; 5 | isActive: boolean; 6 | onClick: () => void; 7 | } 8 | 9 | const SidebarItem: React.FC = ({ title, isActive, onClick }) => ( 10 |
16 |
17 | {title} 18 |
19 |
20 | ); 21 | 22 | const SidebarFaq: React.FC = () => { 23 | const [activeIndex, setActiveIndex] = useState(0); 24 | 25 | const items = [ 26 | "ChainTrend: Democratizing Finance Through Innovation", 27 | "An Unprecedented Asset Class: Event Contracts", 28 | "Leveling the Playing Field", 29 | "A Marketplace of Ideas", 30 | "The Power of Yes & No", 31 | "Our Commitment", 32 | ]; 33 | 34 | return ( 35 |
36 |
37 | {items.map((title, index) => ( 38 | setActiveIndex(index)} /> 39 | ))} 40 |
41 |
42 | ); 43 | }; 44 | 45 | export default SidebarFaq; 46 | -------------------------------------------------------------------------------- /FrontEnd/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { Geist, Geist_Mono } from "next/font/google"; 3 | import "./globals.css"; 4 | import Layout from "../components/layouts"; 5 | import { GlobalProvider } from "@/providers/GlobalContext"; 6 | import "react-multi-carousel/lib/styles.css"; 7 | import { WalletProvider, ConnectionProvider } from '@solana/wallet-adapter-react'; 8 | import { WalletModalProvider } from '@solana/wallet-adapter-react-ui'; 9 | import "@solana/wallet-adapter-react-ui/styles.css"; 10 | import { PhantomWalletAdapter } from '@solana/wallet-adapter-phantom'; 11 | import { clusterApiUrl } from '@solana/web3.js'; 12 | import { ToastContainer } from "react-toastify"; 13 | 14 | const geistSans = Geist({ 15 | variable: "--font-geist-sans", 16 | subsets: ["latin"], 17 | }); 18 | 19 | const geistMono = Geist_Mono({ 20 | variable: "--font-geist-mono", 21 | subsets: ["latin"], 22 | }); 23 | 24 | export default function RootLayout({ 25 | children, 26 | }: Readonly<{ 27 | children: React.ReactNode; 28 | }>) { 29 | const wallets = [new PhantomWalletAdapter()]; 30 | 31 | return ( 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | {children} 42 | 43 | 44 | 45 | 46 | 47 | 48 | ); 49 | } 50 | -------------------------------------------------------------------------------- /FrontEnd/src/components/prediction_market_sdk/util.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey, Connection, TransactionInstruction } from "@solana/web3.js"; 2 | import { 3 | TOKEN_PROGRAM_ID, 4 | ASSOCIATED_TOKEN_PROGRAM_ID, 5 | getAssociatedTokenAddressSync, 6 | createAssociatedTokenAccountInstruction 7 | } from "@solana/spl-token"; 8 | 9 | export const getOrCreateATAInstruction = async ( 10 | tokenMint: PublicKey, 11 | owner: PublicKey, 12 | connection: Connection, 13 | payer?: PublicKey, 14 | ): Promise<[PublicKey, TransactionInstruction?]> => { 15 | try { 16 | let toAccount = getAssociatedTokenAddressSync(tokenMint, owner); 17 | 18 | const account = await connection.getAccountInfo(toAccount); 19 | 20 | if (!account) { 21 | const ix = createAssociatedTokenAccountInstruction( 22 | payer || owner, 23 | toAccount, 24 | owner, 25 | tokenMint, 26 | TOKEN_PROGRAM_ID, 27 | ASSOCIATED_TOKEN_PROGRAM_ID, 28 | ); 29 | return [toAccount, ix]; 30 | } 31 | 32 | return [toAccount, undefined]; 33 | } catch (e) { 34 | /* handle error */ 35 | console.error('Error::getOrCreateATAInstruction', e); 36 | throw e; 37 | } 38 | }; 39 | 40 | export const getAssociatedTokenAccount = async ( 41 | ownerPubkey: PublicKey, 42 | mintPk: PublicKey 43 | ): Promise => { 44 | let associatedTokenAccountPubkey = PublicKey.findProgramAddressSync( 45 | [ 46 | ownerPubkey.toBuffer(), 47 | TOKEN_PROGRAM_ID.toBuffer(), 48 | mintPk.toBuffer(), // mint address 49 | ], 50 | ASSOCIATED_TOKEN_PROGRAM_ID 51 | )[0]; 52 | 53 | return associatedTokenAccountPubkey; 54 | }; -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/fund/CommentItem.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { CiHeart } from "react-icons/ci"; 5 | 6 | // Define types for props 7 | interface CommentItemProps { 8 | username: string; 9 | timeAgo: string; 10 | comment: string; 11 | avatarUrl: string; 12 | } 13 | 14 | const CommentItem: React.FC = ({ 15 | username, 16 | timeAgo, 17 | comment, 18 | avatarUrl, 19 | }) => { 20 | return ( 21 |
22 | {/* Avatar */} 23 | {`${username}'s 28 | 29 | {/* Comment Content */} 30 |
31 |
32 |
33 | {username} 34 |
35 |
36 | {timeAgo} 37 |
38 |
39 | 40 |
41 |
42 |
43 | {comment} 44 |
45 |
46 |
47 | ); 48 | }; 49 | 50 | export default CommentItem; 51 | -------------------------------------------------------------------------------- /BackEnd/src/prediction_market_sdk/config.ts: -------------------------------------------------------------------------------- 1 | import convict from "convict"; 2 | 3 | export const config = convict({ 4 | bot_name: { 5 | format: String, 6 | default: "local", 7 | env: "BOT_NAME", 8 | }, 9 | num_worker_threads: { 10 | format: Number, 11 | default: 4, 12 | env: "NUM_WORKER_THREADS", 13 | }, 14 | block_engine_urls: { 15 | format: Array, 16 | default: ["amsterdam.mainnet.block-engine.jito.wtf"], 17 | doc: "block engine urls. bot will mempool subscribe to all and send bundles to first one", 18 | env: "BLOCK_ENGINE_URLS", 19 | }, 20 | rpc_url: { 21 | format: String, 22 | default: "https://api.mainnet-beta.solana.com", 23 | env: "RPC_URL", 24 | }, 25 | rpc_requests_per_second: { 26 | format: Number, 27 | default: 0, 28 | env: "RPC_REQUESTS_PER_SECOND", 29 | }, 30 | rpc_max_batch_size: { 31 | format: Number, 32 | default: 20, 33 | env: "RPC_MAX_BATCH_SIZE", 34 | }, 35 | geyser_url: { 36 | format: String, 37 | default: "mainnet.rpc.jito.wtf", 38 | env: "GEYSER_URL", 39 | }, 40 | geyser_access_token: { 41 | format: String, 42 | default: "00000000-0000-0000-0000-000000000000", 43 | env: "GEYSER_ACCESS_TOKEN", 44 | }, 45 | arb_calculation_num_steps: { 46 | format: Number, 47 | default: 3, 48 | env: "ARB_CALCULATION_NUM_STEPS", 49 | }, 50 | max_arb_calculation_time_ms: { 51 | format: Number, 52 | default: 15, 53 | env: "MAX_ARB_CALCULATION_TIME_MS", 54 | }, 55 | payer_keypair_path: { 56 | format: String, 57 | default: "./payer.json", 58 | env: "PAYER_KEYPAIR_PATH", 59 | }, 60 | min_tip_lamports: { 61 | format: Number, 62 | default: 10000, 63 | env: "MIN_TIP_LAMPORTS", 64 | }, 65 | tip_percent: { 66 | format: Number, 67 | default: 50, 68 | env: "TIP_PERCENT", 69 | }, 70 | }); -------------------------------------------------------------------------------- /prediction-market-smartcontract/tests/utils.ts: -------------------------------------------------------------------------------- 1 | import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, createAssociatedTokenAccountInstruction } from "@solana/spl-token"; 2 | 3 | import { PublicKey, Connection, TransactionInstruction } from "@solana/web3.js"; 4 | 5 | export const getOrCreateATAInstruction = async ( 6 | tokenMint: PublicKey, 7 | owner: PublicKey, 8 | connection: Connection, 9 | payer?: PublicKey, 10 | ): Promise<[PublicKey, TransactionInstruction?]> => { 11 | try { 12 | let toAccount = getAssociatedTokenAddressSync(tokenMint, owner); 13 | 14 | const account = await connection.getAccountInfo(toAccount); 15 | 16 | if (!account) { 17 | const ix = createAssociatedTokenAccountInstruction( 18 | payer || owner, 19 | toAccount, 20 | owner, 21 | tokenMint, 22 | TOKEN_PROGRAM_ID, 23 | ASSOCIATED_TOKEN_PROGRAM_ID, 24 | ); 25 | return [toAccount, ix]; 26 | } 27 | 28 | return [toAccount, undefined]; 29 | } catch (e) { 30 | /* handle error */ 31 | console.error('Error::getOrCreateATAInstruction', e); 32 | throw e; 33 | } 34 | }; 35 | 36 | export const getAssociatedTokenAccount = async ( 37 | ownerPubkey: PublicKey, 38 | mintPk: PublicKey 39 | ): Promise => { 40 | let associatedTokenAccountPubkey = (PublicKey.findProgramAddressSync( 41 | [ 42 | ownerPubkey.toBuffer(), 43 | TOKEN_PROGRAM_ID.toBuffer(), 44 | mintPk.toBuffer(), // mint address 45 | ], 46 | ASSOCIATED_TOKEN_PROGRAM_ID 47 | ))[0]; 48 | 49 | return associatedTokenAccountPubkey; 50 | } -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/about/AboutSubSidebar.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | interface AboutSubSidebarProps { 4 | selectedIndex: number; 5 | setSelectedIndex: (index: number) => void; 6 | } 7 | 8 | const SidebarItem: React.FC<{ title: string; isActive: boolean; onClick: () => void }> = ({ title, isActive, onClick }) => ( 9 |
17 |
18 | {title} 19 |
20 |
21 | ); 22 | 23 | const AboutSubSidebar: React.FC = ({ selectedIndex, setSelectedIndex }) => { 24 | const items = [ 25 | "What is Speculape?", 26 | "How do prediction markets work?", 27 | "Is Speculape safe and secure?", 28 | "How do I participate?", 29 | "What can I predict on Speculape?", 30 | "How does Speculape make money?", 31 | ]; 32 | 33 | return ( 34 |
35 | {items.map((title, index) => ( 36 | setSelectedIndex(index)} 41 | /> 42 | ))} 43 |
44 | ); 45 | }; 46 | 47 | export default AboutSubSidebar; -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/ToastGroup.tsx: -------------------------------------------------------------------------------- 1 | import { toast } from "react-toastify"; 2 | import "react-toastify/dist/ReactToastify.css"; 3 | 4 | export const errorAlert = (text: string) => { 5 | toast.error(text, { 6 | position: "top-right", 7 | autoClose: 2000, 8 | hideProgressBar: false, 9 | closeOnClick: true, 10 | pauseOnHover: true, 11 | draggable: true, 12 | theme: "colored", 13 | }); 14 | }; 15 | 16 | export const errorAlertCenter = (text: string) => { 17 | toast.error(text, { 18 | position: "top-right", 19 | autoClose: false, 20 | hideProgressBar: false, 21 | closeOnClick: true, 22 | pauseOnHover: true, 23 | draggable: true, 24 | theme: "colored", 25 | }); 26 | }; 27 | 28 | export const warningAlert = (text: string) => { 29 | toast.warning(text, { 30 | className: "bg-black", 31 | position: "top-right", 32 | autoClose: 2000, 33 | hideProgressBar: false, 34 | closeOnClick: true, 35 | pauseOnHover: true, 36 | draggable: true, 37 | theme: "colored", 38 | }); 39 | }; 40 | 41 | export const successAlert = (text: string) => { 42 | toast.success(text, { 43 | position: "top-right", 44 | autoClose: 2000, 45 | hideProgressBar: false, 46 | closeOnClick: true, 47 | pauseOnHover: true, 48 | draggable: true, 49 | theme: "colored", 50 | }); 51 | }; 52 | 53 | export const infoAlert = (text: string) => { 54 | toast.info(text, { 55 | position: "top-right", 56 | autoClose: 2000, 57 | hideProgressBar: false, 58 | closeOnClick: true, 59 | pauseOnHover: true, 60 | draggable: true, 61 | theme: "colored", 62 | }); 63 | }; -------------------------------------------------------------------------------- /FrontEnd/src/components/layouts/partials/SidebarNav.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { SidebarNavProps } from "@/types/type"; 3 | import SidebarNavItem from "./SidebarNavItem"; 4 | import { useState } from "react"; 5 | 6 | const sidebarNavList = [ 7 | { label: "Home", href: "/" }, 8 | { label: "FundMarket", href: "/fund" }, 9 | { label: "ProposeMarket", href: "/propose" }, 10 | { label: "Referral", href: "/referral" }, 11 | { label: "Profile", href: "/profile" }, 12 | { label: "About", href: "/about" }, 13 | ] as const; 14 | 15 | const SidebarNav: React.FC = ({ isCollapsed }) => { 16 | // Set the default active item to "Home" 17 | const [activeItem, setActiveItem] = useState("Home"); 18 | 19 | return ( 20 | 47 | ); 48 | }; 49 | 50 | export default SidebarNav; 51 | -------------------------------------------------------------------------------- /FrontEnd/src/components/layouts/partials/SidebarNavItem.tsx: -------------------------------------------------------------------------------- 1 | import Icon from "@/components/elements/Icons"; 2 | import { SidebarNavItemProps } from "@/types/type"; 3 | import Link from "next/link"; 4 | import { FC } from "react"; 5 | 6 | const SidebarNavItem: FC = ({ 7 | label, 8 | href, 9 | isActive, 10 | onClick, 11 | isCollapsed, 12 | }) => { 13 | return ( 14 | 30 | 36 | 37 | {/* Hide label when collapsed */} 38 | {!isCollapsed && ( 39 |
43 | {label} 44 |
45 | )} 46 | 47 |
51 | {label} 52 |
53 | 54 | ); 55 | }; 56 | 57 | export default SidebarNavItem; 58 | -------------------------------------------------------------------------------- /BackEnd/src/type/index.ts: -------------------------------------------------------------------------------- 1 | import { TransactionInstruction, Keypair, PublicKey } from "@solana/web3.js"; 2 | 3 | export type GlobalSettingType = { 4 | creatorFeeAmount: number; 5 | marketCount: number; 6 | decimal: number; 7 | fundFeePercentage: number, 8 | bettingFeePercentage: number 9 | }; 10 | 11 | export type CreateMarketType = { 12 | creator: String; 13 | marketID: String; 14 | tokenAmount: number; 15 | tokenPrice: number; 16 | nameA: String; 17 | nameB: String; 18 | symbolA: String; 19 | symbolB: String; 20 | urlA: String; 21 | urlB: String; 22 | quest: number; 23 | date: String; 24 | value: number; 25 | range: number; 26 | feed: Keypair; 27 | oracle: TransactionInstruction; 28 | }; 29 | 30 | export type DepositeLiquidityType = { 31 | creator: string, 32 | investor: string, 33 | amount: number, 34 | } 35 | 36 | export type BetType = { 37 | creator: string, 38 | player: string, 39 | amount: number, 40 | isYes: boolean, 41 | token: string 42 | } 43 | 44 | export type OracleType = { 45 | market_id: String, 46 | feed: String 47 | } 48 | 49 | export type FeedUpdateType = { 50 | creator: String, 51 | url: String, 52 | task: String, 53 | name: String, 54 | feed: String, 55 | cluster: 'Devnet' | 'Mainnet' 56 | } 57 | 58 | export type WithdrawType = { 59 | signer: PublicKey, 60 | market_id: PublicKey, 61 | amount: Number, 62 | reciever: PublicKey 63 | } 64 | 65 | export interface MarketFilter { 66 | volumeMin?: number; 67 | volumeMax?: number; 68 | expiryStart?: string; // ISO date 69 | expiryEnd?: string; 70 | yesProbMin?: number; 71 | yesProbMax?: number; 72 | noProbMin?: number; 73 | noProbMax?: number; 74 | } 75 | 76 | export type MarketStatus = 77 | "INIT" | 78 | "PENDING" | 79 | "ACTIVE" | 80 | "CLOSED" -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/carousel/MarketCarousel.tsx: -------------------------------------------------------------------------------- 1 | import { marketCarouselItems } from "@/data/data"; 2 | import MarketCarouselItem from "./MarketCarouselItem"; 3 | import Carousel from "react-multi-carousel"; 4 | import "react-multi-carousel/lib/styles.css"; 5 | 6 | const MarketCarousel = () => { 7 | return ( 8 |
9 | 56 | {marketCarouselItems.map((item, index) => ( 57 | 58 | ))} 59 | 60 |
61 | ); 62 | }; 63 | 64 | export default MarketCarousel; 65 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/marketInfo/SearchInputItem.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React, { useState } from "react"; 4 | 5 | interface SearchInputProps { 6 | title?: string; 7 | minPlaceholder?: string; 8 | maxPlaceholder?: string; 9 | } 10 | 11 | const SearchInputItem: React.FC = ({ 12 | title = "Volume", 13 | minPlaceholder = "Min", 14 | maxPlaceholder = "Max", 15 | }) => { 16 | const [minVolume, setMinVolume] = useState(""); 17 | const [maxVolume, setMaxVolume] = useState(""); 18 | 19 | return ( 20 |
21 |
22 | {title} 23 |
24 |
25 |
26 | setMinVolume(e.target.value ? Number(e.target.value) : "")} 31 | className="flex-1 bg-transparent text-[#838587] text-xs font-normal font-satoshi leading-3 outline-none" 32 | /> 33 |
34 |
35 | setMaxVolume(e.target.value ? Number(e.target.value) : "")} 40 | className="flex-1 bg-transparent text-[#838587] text-xs font-normal font-satoshi leading-3 outline-none" 41 | /> 42 |
43 |
44 |
45 | ); 46 | }; 47 | 48 | export default SearchInputItem; -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/instructions/get_oracle_res.rs: -------------------------------------------------------------------------------- 1 | use crate::constants::GLOBAL_SEED; 2 | use crate::errors::ContractError; 3 | use crate::events::OracleResUpdated; 4 | use crate::states::global::Global; 5 | use crate::states::market::Market; 6 | use anchor_lang::prelude::*; 7 | use switchboard_on_demand::on_demand::accounts::pull_feed::PullFeedAccountData; 8 | 9 | #[derive(Accounts)] 10 | pub struct GetOracleRes<'info> { 11 | #[account( 12 | mut, 13 | constraint = user.key() == global.admin @ ContractError::InvalidAdmin 14 | )] 15 | pub user: Signer<'info>, 16 | #[account(mut)] 17 | /// CHECK: global fee authority is checked in constraint 18 | pub market: Box>, 19 | 20 | #[account( 21 | seeds = [GLOBAL_SEED.as_bytes()], 22 | bump 23 | )] 24 | pub global: Box>, 25 | 26 | /// CHECK: via switchboard sdk 27 | pub feed: AccountInfo<'info>, 28 | pub system_program: Program<'info, System>, 29 | } 30 | 31 | pub fn get_oracle_res(ctx: Context) -> Result<()> { 32 | let market = &mut ctx.accounts.market; 33 | 34 | let feed_account = ctx.accounts.feed.data.borrow(); 35 | let feed: std::cell::Ref<'_, PullFeedAccountData> = 36 | PullFeedAccountData::parse(feed_account).unwrap(); 37 | 38 | msg!("🎫price 🎫 {:?}", feed.value()); 39 | msg!("🎫range 🎫 {:?}", market.range); 40 | 41 | let feed_value: f64 = feed.value().unwrap().try_into().unwrap(); 42 | 43 | market.result = if market.range == 0 && market.value > feed_value { 44 | true 45 | } else if market.range == 1 && market.value == feed_value { 46 | true 47 | } else if market.range == 2 && market.value < feed_value { 48 | true 49 | } else { 50 | false 51 | }; 52 | 53 | msg!("🎫result 🎫 {:?}", ctx.accounts.market.result); 54 | 55 | emit!(OracleResUpdated { 56 | oracle_res: feed.value().unwrap().try_into().unwrap(), 57 | }); 58 | Ok(()) 59 | } 60 | -------------------------------------------------------------------------------- /FrontEnd/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React, { useState } from "react"; 4 | import Market from "@/components/elements/marketInfo/Market"; 5 | import RecentList from "@/components/elements/marketInfo/RecentList"; 6 | import MarketCarousel from "@/components/elements/carousel/MarketCarousel"; 7 | import { useGlobalContext } from "@/providers/GlobalContext"; 8 | import { usePathname } from "next/navigation"; 9 | import { useEffect } from "react"; 10 | import { IoEyeOutline, IoEyeOffOutline } from "react-icons/io5"; 11 | 12 | export default function Home() { 13 | const pathname = usePathname(); 14 | const { setActiveTab } = useGlobalContext(); 15 | const [showRecentActivity, setShowRecentActivity] = useState(true); 16 | 17 | useEffect(() => { 18 | if (pathname === "/") { 19 | setActiveTab("ACTIVE"); 20 | } 21 | }, [pathname, setActiveTab]); 22 | 23 | return ( 24 |
25 |
26 | 27 |
28 |
29 |
30 | setShowRecentActivity(!showRecentActivity)} /> 31 |
32 | {showRecentActivity && ( 33 |
34 |
35 |
36 | Recent Activity 37 |
38 |
39 | 40 |
41 | )} 42 |
43 |
44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/marketInfo/ProgressBar.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface ProgressBarProps { 4 | yesPercentage: number; // The percentage for the 'Yes' blocks 5 | } 6 | 7 | const ProgressBar: React.FC = ({ yesPercentage }) => { 8 | const noPercentage = 100 - yesPercentage; 9 | 10 | // Calculate the number of blocks based on the percentage 11 | const yesBlocks = Math.round((yesPercentage / 100) * 50); // 50 blocks in total 12 | const noBlocks = 50 - yesBlocks; // Remaining blocks for "No" 13 | 14 | return ( 15 |
16 | {/* Yes Percentage */} 17 |
18 | {yesPercentage}% 19 |
20 | 21 | {/* Progress Bar Blocks */} 22 |
23 | {/* Yes Blocks */} 24 | {Array.from({ length: yesBlocks }).map((_, index) => ( 25 |
30 | ))} 31 | 32 | {/* No Blocks */} 33 | {Array.from({ length: noBlocks }).map((_, index) => ( 34 |
39 | ))} 40 |
41 | 42 | {/* No Percentage */} 43 |
44 | {noPercentage}% 45 |
46 |
47 | ); 48 | }; 49 | 50 | export default ProgressBar; 51 | -------------------------------------------------------------------------------- /FrontEnd/src/providers/GlobalContext.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { createContext, useContext, useState, ReactNode } from "react"; 4 | import { MarketStatus } from "@/types/type"; 5 | // Define ActiveTab type 6 | type MarketDataType = { 7 | "_id": string, 8 | "marketField": number, 9 | "apiType": number, 10 | "task": string, 11 | "creator": string, 12 | "tokenA": string, 13 | "tokenB": string, 14 | "market": string, 15 | "question": string, 16 | "feedName": string, 17 | "value": number, 18 | "tradingAmountA": number, 19 | "tradingAmountB": number, 20 | "tokenAPrice": number, 21 | "tokenBPrice": number, 22 | "initAmount": number, 23 | "range": number, 24 | "date": string, 25 | "marketStatus": string, 26 | "imageUrl": string, 27 | "createdAt": string, 28 | "__v": number, 29 | "playerACount": number, 30 | "playerBCount": number, 31 | "totalInvestment": number, 32 | "description": string, 33 | "comments": number 34 | } 35 | 36 | // Define Global Context Type 37 | interface GlobalContextType { 38 | activeTab: MarketStatus; 39 | markets: MarketDataType[]; 40 | setActiveTab: (tab: MarketStatus) => void; 41 | formatMarketData: (data: MarketDataType[]) => void; 42 | } 43 | 44 | // Create Context 45 | const GlobalContext = createContext(undefined); 46 | 47 | // Create Global Provider 48 | export const GlobalProvider = ({ children }: { children: ReactNode }) => { 49 | const [activeTab, setActiveTab] = useState("ACTIVE"); 50 | const [markets, setMarkets] = useState([]); 51 | 52 | const formatMarketData = (data: MarketDataType[]) => { 53 | setMarkets(data); 54 | } 55 | 56 | return ( 57 | 58 | {children} 59 | 60 | ); 61 | }; 62 | 63 | // Custom Hook to use Global Context 64 | export const useGlobalContext = () => { 65 | const context = useContext(GlobalContext); 66 | if (!context) { 67 | throw new Error("useGlobalContext must be used within a GlobalProvider"); 68 | } 69 | return context; 70 | }; 71 | -------------------------------------------------------------------------------- /BackEnd/src/model/market.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | const MarketSchema = new mongoose.Schema({ 3 | marketField: { type: Number, required: true }, 4 | apiType: { type: Number, required: true }, 5 | task: { type: String, required: true }, 6 | creator: { type: String, required: true }, 7 | tokenA: { type: String, default: "" }, 8 | tokenB: { type: String, default: "" }, 9 | initAmount: { type: Number, required: true }, 10 | tradingAmountA: { type: Number, default: 0 }, 11 | tradingAmountB: { type: Number, default: 0 }, 12 | tokenAPrice: { type: Number, required: true }, 13 | tokenBPrice: { type: Number, required: true }, 14 | market: { type: String, default: "" }, 15 | question: { type: String, required: true }, 16 | value: { type: Number, required: true }, 17 | range: { type: Number, required: true }, 18 | date: { type: String, required: true }, 19 | marketStatus: { type: String, required: true }, 20 | feedName: { type: String, required: true }, 21 | imageUrl: { type: String, required: true }, 22 | description: { type: String, required: true }, 23 | feedkey: { type: String, default: "" }, 24 | isYes: { type: Boolean, default: false }, 25 | feed: { type: String }, 26 | playerA: { 27 | type:[ 28 | { 29 | player: { type: String, required: true }, 30 | amount: { type: Number, required: true } 31 | } 32 | ], 33 | default: [] 34 | }, 35 | playerB: { 36 | type:[ 37 | { 38 | player: { type: String, required: true }, 39 | amount: { type: Number, required: true } 40 | } 41 | ], 42 | default: [] 43 | }, 44 | investors: { 45 | type: [ 46 | { 47 | investor: { type: String, required: true }, 48 | amount: { type: Number, required: true } 49 | } 50 | ], 51 | default: [] 52 | }, 53 | createdAt: { type: String, default: Date.now() } 54 | }); 55 | 56 | const MarketModel = mongoose.model("market", MarketSchema); 57 | 58 | export default MarketModel; -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/fund/SolCounter.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { FaMinus, FaPlus } from "react-icons/fa"; 3 | type SolCounterProps = { 4 | setAmount: React.Dispatch>; 5 | amount: number; 6 | }; 7 | 8 | const SolCounter = ({ setAmount, amount }: SolCounterProps) => { 9 | 10 | const increaseSol = () => setAmount((prev) => prev + 1); 11 | const decreaseSol = () => { 12 | if (amount > 0) { 13 | setAmount((prev) => Math.max(prev - 1, 0)); 14 | } 15 | }; 16 | 17 | const changeBalance = (e: React.ChangeEvent) => { 18 | const newValue = parseFloat(e.target.value); 19 | if (!isNaN(newValue)) { 20 | setAmount(newValue); 21 | } else { 22 | setAmount(0); // fallback for empty input 23 | } 24 | } 25 | return ( 26 |
27 | {/* Decrease Button */} 28 |
0 ? decreaseSol : undefined} 30 | className={` self-stretch p-3 bg-[#1e1e1e] rounded-xl flex justify-center items-center gap-1.5 cursor-pointer transition-all duration-300 31 | ${amount > 0 ? "hover:bg-[#2e2e2e] active:scale-95" : "opacity-50 cursor-not-allowed"}`} 32 | > 33 | 34 |
35 | 36 | {/* SOL Amount Display */} 37 |
38 | 39 |
40 | 41 | {/* Increase Button */} 42 |
46 | 47 |
48 |
49 | ); 50 | }; 51 | 52 | export default SolCounter; 53 | -------------------------------------------------------------------------------- /BackEnd/src/controller/market/utils.ts: -------------------------------------------------------------------------------- 1 | import { MarketFilter } from "../../type"; 2 | 3 | export const buildMarketFilterQuery = (filters: MarketFilter) => { 4 | const query: any = {}; 5 | 6 | // Volume = 2 * initAmount - (tradingAmountA + tradingAmountB) 7 | if (filters.volumeMin !== undefined || filters.volumeMax !== undefined) { 8 | query.$expr = query.$expr || { $and: [] }; 9 | 10 | const computedVolume = { 11 | $subtract: [ 12 | { $multiply: ['$initAmount', 2] }, 13 | { $add: ['$tradingAmountA', '$tradingAmountB'] } 14 | ] 15 | }; 16 | 17 | if (filters.volumeMin !== undefined) { 18 | query.$expr.$and.push({ 19 | $gte: [computedVolume, filters.volumeMin] 20 | }); 21 | } 22 | if (filters.volumeMax !== undefined) { 23 | query.$expr.$and.push({ 24 | $lte: [computedVolume, filters.volumeMax] 25 | }); 26 | } 27 | } 28 | 29 | // Expiry Time (date field is ISO string) 30 | if (filters.expiryStart || filters.expiryEnd) { 31 | query.date = {}; 32 | if (filters.expiryStart) query.date.$gte = filters.expiryStart; 33 | if (filters.expiryEnd) query.date.$lte = filters.expiryEnd; 34 | } 35 | 36 | // Yes Probability = tokenAPrice / (tokenAPrice + tokenBPrice) 37 | if (filters.yesProbMin !== undefined || filters.yesProbMax !== undefined) { 38 | query.$expr = query.$expr || { $and: [] }; 39 | const yesProb = { 40 | $divide: [ 41 | '$tokenAPrice', 42 | { $add: ['$tokenAPrice', '$tokenBPrice'] } 43 | ] 44 | }; 45 | if (filters.yesProbMin !== undefined) { 46 | query.$expr.$and.push({ $gte: [yesProb, filters.yesProbMin] }); 47 | } 48 | if (filters.yesProbMax !== undefined) { 49 | query.$expr.$and.push({ $lte: [yesProb, filters.yesProbMax] }); 50 | } 51 | } 52 | 53 | // No Probability = tokenBPrice / (tokenAPrice + tokenBPrice) 54 | if (filters.noProbMin !== undefined || filters.noProbMax !== undefined) { 55 | query.$expr = query.$expr || { $and: [] }; 56 | const noProb = { 57 | $divide: [ 58 | '$tokenBPrice', 59 | { $add: ['$tokenAPrice', '$tokenBPrice'] } 60 | ] 61 | }; 62 | if (filters.noProbMin !== undefined) { 63 | query.$expr.$and.push({ $gte: [noProb, filters.noProbMin] }); 64 | } 65 | if (filters.noProbMax !== undefined) { 66 | query.$expr.$and.push({ $lte: [noProb, filters.noProbMax] }); 67 | } 68 | } 69 | 70 | return query; 71 | }; -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/marketInfo/RecentList.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import RecentItem from './RecentItem'; 3 | 4 | const RecentList: React.FC = () => { 5 | const recentItems = [ 6 | { 7 | question: "Who will be Trump’s secretary of defense?", 8 | timeAgo: "2m", 9 | userName: "bludclat", 10 | action: "sold", 11 | price: "0.000032 BTC", 12 | imageSrc: "https://placehold.co/16x16", 13 | status: "yes", 14 | }, 15 | { 16 | question: "Who will be Trump’s secretary of defense?", 17 | timeAgo: "2m", 18 | userName: "bomboclart", 19 | action: "sold", 20 | price: "0.000032 BTC", 21 | imageSrc: "https://placehold.co/16x16", 22 | status: "no", 23 | }, 24 | { 25 | question: "Who will be Trump’s secretary of defense?", 26 | timeAgo: "2m", 27 | userName: "succlart", 28 | action: "sold", 29 | price: "0.000032 BTC", 30 | imageSrc: "https://placehold.co/16x16", 31 | status: "funded", 32 | }, 33 | { 34 | question: "Who will be Trump’s secretary of defense?", 35 | timeAgo: "2m", 36 | userName: "irvanwibowo", 37 | action: "sold", 38 | price: "0.000032 BTC", 39 | imageSrc: "https://placehold.co/16x16", 40 | status: "yes", 41 | }, 42 | { 43 | question: "Who will be Trump’s secretary of defense?", 44 | timeAgo: "2m", 45 | userName: "irvanwibowo", 46 | action: "sold", 47 | price: "0.000032 BTC", 48 | imageSrc: "https://placehold.co/16x16", 49 | status: "no", 50 | }, 51 | { 52 | question: "Who will be Trump’s secretary of defense?", 53 | timeAgo: "2m", 54 | userName: "irvanwibowo", 55 | action: "sold", 56 | price: "0.000032 BTC", 57 | imageSrc: "https://placehold.co/16x16", 58 | status: "funded", 59 | }, 60 | { 61 | question: "Who will be Trump’s secretary of defense?", 62 | timeAgo: "2m", 63 | userName: "irvanwibowo", 64 | action: "sold", 65 | price: "0.000032 BTC", 66 | imageSrc: "https://placehold.co/16x16", 67 | status: "yes", 68 | }, 69 | ] as const; 70 | 71 | return ( 72 |
73 | {recentItems.map((item, index) => ( 74 | 75 | ))} 76 |
77 | ); 78 | }; 79 | 80 | export default RecentList; 81 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/fund/FundNavbar.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import CommentItem from "./CommentItem"; 3 | 4 | const comments = [ 5 | { 6 | username: "Ahmed45", 7 | timeAgo: "2h ago", 8 | comment: "Can I fund in this topic?", 9 | avatarUrl: "https://placehold.co/32x32", 10 | }, 11 | { 12 | username: "CryptoGuru", 13 | timeAgo: "1h ago", 14 | comment: "Yes, you can! Check the details above.", 15 | avatarUrl: "https://placehold.co/32x32", 16 | }, 17 | ]; 18 | 19 | const FundNavbar = () => { 20 | const [activeTab, setActiveTab] = useState("Comments (45)"); // Default tab is "Comments (45)" 21 | 22 | return ( 23 |
24 | {/* Navbar */} 25 |
26 | {["Comments (45)", "Top Funder", "Activity"].map((tab) => ( 27 |
setActiveTab(tab)} 30 | className={`px-4 py-2.5 rounded-2xl flex justify-start items-center gap-2 cursor-pointer transition-all duration-300 31 | ${ 32 | activeTab === tab 33 | ? "bg-[#282828] shadow-[inset_0px_2px_0px_0px_rgba(53,53,53,1.00)] text-white" 34 | : "outline-1 outline-offset-[-1px] outline-[#313131] text-[#838587] hover:bg-[#333] hover:text-white" 35 | }`} 36 | > 37 | {tab} 38 |
39 | ))} 40 |
41 | 42 | {/* Content */} 43 | {activeTab === "Comments (45)" && ( 44 |
45 | {comments.map((comment, index) => ( 46 | 47 | ))} 48 |
49 | )} 50 | 51 | {activeTab === "Top Funder" && ( 52 |
53 | {comments.map((comment, index) => ( 54 | 55 | ))} 56 |
57 | )} 58 | 59 | {activeTab === "Activity" && ( 60 |
61 | {comments.map((comment, index) => ( 62 | 63 | ))} 64 |
65 | )} 66 |
67 | ); 68 | }; 69 | 70 | export default FundNavbar; 71 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/profile/ProfileFundItem.tsx: -------------------------------------------------------------------------------- 1 | import { useWallet } from "@solana/wallet-adapter-react"; 2 | import React, { useEffect } from "react"; 3 | 4 | interface ProfileFundItemProps { 5 | image: string; 6 | title: string; 7 | status: "Pending" | "Active" | "Expired"; 8 | betAmount: number; 9 | percentage: number; 10 | value: string; 11 | } 12 | 13 | const statusColors: Record = { 14 | PENDING: "bg-[#3fd145]/10 text-[#3fd145]", 15 | ACTIVE: "bg-[#0054f5]/10 text-[#07b3ff]", 16 | Expired: "bg-[#ff6464]/10 text-[#ff6464]", 17 | }; 18 | 19 | const ProfileFundItem = (param: any) => { 20 | const [betAmount, setBetAmount] = React.useState(0); 21 | const [percentage, setPercentage] = React.useState(0); 22 | const { publicKey } = useWallet(); 23 | useEffect(() => { 24 | const userFund = param.investors.find((f:any) => f.investor === publicKey?.toBase58()); 25 | const totalAmount = param.investors.reduce((sum:any, i:any) => sum + i.amount, 0); 26 | 27 | setBetAmount(userFund.amount); 28 | setPercentage(userFund.amount/totalAmount*100); 29 | }, []) 30 | return ( 31 |
32 | market-icon 33 |
34 | {param.question} 35 |
36 |
37 |
40 |
41 | {param.marketStatus} 42 |
43 |
44 |
45 |
46 | {/*
47 | {betAmount} SOL / 48 |
*/} 49 |
50 | {percentage.toFixed(1)}% 51 |
52 |
53 |
54 | {betAmount} SOL 55 |
56 |
57 | ); 58 | }; 59 | 60 | export default ProfileFundItem; 61 | -------------------------------------------------------------------------------- /BackEnd/src/controller/referral/index.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | import ReferModel from "../../model/referral"; 3 | import { generateReferralCodeFromWallet } from "./utils"; 4 | import { claimFee } from "../../prediction_market_sdk"; 5 | 6 | export const getReferCode = async (req: Request, res: Response) => { 7 | try { 8 | const { wallet, referralCode } = req.body; 9 | 10 | let referredLevel = 0; 11 | const info = await ReferModel.findOne({ 12 | wallet 13 | }); 14 | 15 | let code = ""; 16 | 17 | if (!info) { 18 | let wallet_refered = ""; 19 | code = generateReferralCodeFromWallet(wallet as string); 20 | 21 | if (referralCode !== "") { 22 | const result = await ReferModel.findOneAndUpdate( 23 | { 24 | referralCode 25 | }, 26 | { 27 | $push: { 28 | ids: wallet 29 | } 30 | } 31 | ); 32 | 33 | if (result) { 34 | referredLevel = result?.referredLevel + 1; 35 | wallet_refered = result.wallet; 36 | } else { 37 | res.status(500).send({ error: "Invalid Referral code!" }); 38 | } 39 | } 40 | 41 | const data = new ReferModel({ 42 | wallet, 43 | referralCode: code, 44 | wallet_refered, 45 | referredLevel 46 | }) 47 | 48 | await data.save(); 49 | } else { 50 | code = info.referralCode; 51 | } 52 | 53 | const referrals = await ReferModel.find({ 54 | wallet_refered: wallet 55 | }); 56 | 57 | res.status(200).send({ code, referrals }); 58 | } catch (error) { 59 | console.log("😒 error:", error); 60 | res.status(500).send("Something went wrong referral code generation!"); 61 | } 62 | } 63 | 64 | export const claimReward = async(req: Request, res: Response) => { 65 | try { 66 | const { wallet, amount } = req.body; 67 | await claimFee(wallet, amount); 68 | const info = await ReferModel.findOneAndUpdate( 69 | { 70 | wallet 71 | }, 72 | { 73 | fee: 0 74 | } 75 | ); 76 | res.status(200).send("success"); 77 | } catch (error) { 78 | console.log(error); 79 | res.status(500).send("failed claim"); 80 | } 81 | } -------------------------------------------------------------------------------- /BackEnd/src/prediction_market_sdk/util.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey, Connection, TransactionInstruction } from "@solana/web3.js"; 2 | import { 3 | TOKEN_PROGRAM_ID, 4 | ASSOCIATED_TOKEN_PROGRAM_ID, 5 | getAssociatedTokenAddressSync, 6 | createAssociatedTokenAccountInstruction 7 | } from "@solana/spl-token"; 8 | 9 | export const getOrCreateATAInstruction = async ( 10 | tokenMint: PublicKey, 11 | owner: PublicKey, 12 | connection: Connection, 13 | payer?: PublicKey, 14 | ): Promise<[PublicKey, TransactionInstruction?]> => { 15 | try { 16 | let toAccount = getAssociatedTokenAddressSync(tokenMint, owner); 17 | 18 | const account = await connection.getAccountInfo(toAccount); 19 | 20 | if (!account) { 21 | const ix = createAssociatedTokenAccountInstruction( 22 | payer || owner, 23 | toAccount, 24 | owner, 25 | tokenMint, 26 | TOKEN_PROGRAM_ID, 27 | ASSOCIATED_TOKEN_PROGRAM_ID, 28 | ); 29 | return [toAccount, ix]; 30 | } 31 | 32 | return [toAccount, undefined]; 33 | } catch (e) { 34 | /* handle error */ 35 | console.error('Error::getOrCreateATAInstruction', e); 36 | throw e; 37 | } 38 | }; 39 | 40 | export const getAssociatedTokenAccount = async ( 41 | ownerPubkey: PublicKey, 42 | mintPk: PublicKey 43 | ): Promise => { 44 | let associatedTokenAccountPubkey = PublicKey.findProgramAddressSync( 45 | [ 46 | ownerPubkey.toBuffer(), 47 | TOKEN_PROGRAM_ID.toBuffer(), 48 | mintPk.toBuffer(), // mint address 49 | ], 50 | ASSOCIATED_TOKEN_PROGRAM_ID 51 | )[0]; 52 | 53 | return associatedTokenAccountPubkey; 54 | }; 55 | 56 | import { Keypair } from "@solana/web3.js"; 57 | import { config } from "./config"; 58 | 59 | import { geyserClient as jitoGeyserClient } from "jito-ts"; 60 | 61 | import { SearcherClient, searcherClient as jitoSearcherClient } from "jito-ts/dist/sdk/block-engine/searcher.js"; 62 | 63 | const BLOCK_ENGINE_URLS = config.get("block_engine_urls"); 64 | 65 | const GEYSER_URL = config.get("geyser_url"); 66 | const GEYSER_ACCESS_TOKEN = config.get("geyser_access_token"); 67 | 68 | const searcherClients: SearcherClient[] = []; 69 | 70 | for (const url of BLOCK_ENGINE_URLS) { 71 | const client = jitoSearcherClient(url); 72 | searcherClients.push(client); 73 | } 74 | 75 | const geyserClient = jitoGeyserClient(GEYSER_URL, GEYSER_ACCESS_TOKEN, { 76 | "grpc.keepalive_timeout_ms": 4000, 77 | }); 78 | 79 | // all bundles sent get automatically forwarded to the other regions. 80 | // assuming the first block engine in the array is the closest one 81 | const searcherClient = searcherClients[0]; 82 | 83 | export { searcherClient, searcherClients, geyserClient }; 84 | -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Rubik/README.txt: -------------------------------------------------------------------------------- 1 | Rubik Variable Font 2 | =================== 3 | 4 | This download contains Rubik as both variable fonts and static fonts. 5 | 6 | Rubik is a variable font with this axis: 7 | wght 8 | 9 | This means all the styles are contained in these files: 10 | Rubik-VariableFont_wght.ttf 11 | Rubik-Italic-VariableFont_wght.ttf 12 | 13 | If your app fully supports variable fonts, you can now pick intermediate styles 14 | that aren’t available as static fonts. Not all apps support variable fonts, and 15 | in those cases you can use the static font files for Rubik: 16 | static/Rubik-Light.ttf 17 | static/Rubik-Regular.ttf 18 | static/Rubik-Medium.ttf 19 | static/Rubik-SemiBold.ttf 20 | static/Rubik-Bold.ttf 21 | static/Rubik-ExtraBold.ttf 22 | static/Rubik-Black.ttf 23 | static/Rubik-LightItalic.ttf 24 | static/Rubik-Italic.ttf 25 | static/Rubik-MediumItalic.ttf 26 | static/Rubik-SemiBoldItalic.ttf 27 | static/Rubik-BoldItalic.ttf 28 | static/Rubik-ExtraBoldItalic.ttf 29 | static/Rubik-BlackItalic.ttf 30 | 31 | Get started 32 | ----------- 33 | 34 | 1. Install the font files you want to use 35 | 36 | 2. Use your app's font picker to view the font family and all the 37 | available styles 38 | 39 | Learn more about variable fonts 40 | ------------------------------- 41 | 42 | https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts 43 | https://variablefonts.typenetwork.com 44 | https://medium.com/variable-fonts 45 | 46 | In desktop apps 47 | 48 | https://theblog.adobe.com/can-variable-fonts-illustrator-cc 49 | https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts 50 | 51 | Online 52 | 53 | https://developers.google.com/fonts/docs/getting_started 54 | https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide 55 | https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts 56 | 57 | Installing fonts 58 | 59 | MacOS: https://support.apple.com/en-us/HT201749 60 | Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux 61 | Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows 62 | 63 | Android Apps 64 | 65 | https://developers.google.com/fonts/docs/android 66 | https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts 67 | 68 | License 69 | ------- 70 | Please read the full license text (OFL.txt) to understand the permissions, 71 | restrictions and requirements for usage, redistribution, and modification. 72 | 73 | You can use them in your products & projects – print or digital, 74 | commercial or otherwise. 75 | 76 | This isn't legal advice, please consider consulting a lawyer and see the full 77 | license for all details. 78 | -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Anton_SC,Rubik/Rubik/README.txt: -------------------------------------------------------------------------------- 1 | Rubik Variable Font 2 | =================== 3 | 4 | This download contains Rubik as both variable fonts and static fonts. 5 | 6 | Rubik is a variable font with this axis: 7 | wght 8 | 9 | This means all the styles are contained in these files: 10 | Rubik/Rubik-VariableFont_wght.ttf 11 | Rubik/Rubik-Italic-VariableFont_wght.ttf 12 | 13 | If your app fully supports variable fonts, you can now pick intermediate styles 14 | that aren’t available as static fonts. Not all apps support variable fonts, and 15 | in those cases you can use the static font files for Rubik: 16 | Rubik/static/Rubik-Light.ttf 17 | Rubik/static/Rubik-Regular.ttf 18 | Rubik/static/Rubik-Medium.ttf 19 | Rubik/static/Rubik-SemiBold.ttf 20 | Rubik/static/Rubik-Bold.ttf 21 | Rubik/static/Rubik-ExtraBold.ttf 22 | Rubik/static/Rubik-Black.ttf 23 | Rubik/static/Rubik-LightItalic.ttf 24 | Rubik/static/Rubik-Italic.ttf 25 | Rubik/static/Rubik-MediumItalic.ttf 26 | Rubik/static/Rubik-SemiBoldItalic.ttf 27 | Rubik/static/Rubik-BoldItalic.ttf 28 | Rubik/static/Rubik-ExtraBoldItalic.ttf 29 | Rubik/static/Rubik-BlackItalic.ttf 30 | 31 | Get started 32 | ----------- 33 | 34 | 1. Install the font files you want to use 35 | 36 | 2. Use your app's font picker to view the font family and all the 37 | available styles 38 | 39 | Learn more about variable fonts 40 | ------------------------------- 41 | 42 | https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts 43 | https://variablefonts.typenetwork.com 44 | https://medium.com/variable-fonts 45 | 46 | In desktop apps 47 | 48 | https://theblog.adobe.com/can-variable-fonts-illustrator-cc 49 | https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts 50 | 51 | Online 52 | 53 | https://developers.google.com/fonts/docs/getting_started 54 | https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide 55 | https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts 56 | 57 | Installing fonts 58 | 59 | MacOS: https://support.apple.com/en-us/HT201749 60 | Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux 61 | Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows 62 | 63 | Android Apps 64 | 65 | https://developers.google.com/fonts/docs/android 66 | https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts 67 | 68 | License 69 | ------- 70 | Please read the full license text (OFL.txt) to understand the permissions, 71 | restrictions and requirements for usage, redistribution, and modification. 72 | 73 | You can use them in your products & projects – print or digital, 74 | commercial or otherwise. 75 | 76 | This isn't legal advice, please consider consulting a lawyer and see the full 77 | license for all details. 78 | -------------------------------------------------------------------------------- /BackEnd/src/controller/bot/utils.ts: -------------------------------------------------------------------------------- 1 | import { TransactionInstruction, PublicKey } from "@solana/web3.js"; 2 | import { withdraw, buildVT, getOracleResult } from "../../prediction_market_sdk"; 3 | import { auth } from "../../config"; 4 | import MarketModel from "../../model/market" 5 | 6 | export const execute = async() => { 7 | try { 8 | // Find init markets 9 | await expireInitData(); 10 | // Find pending market and expire 11 | await expirePendingData(); 12 | // Find finalized market, fetch result and airdropt reward 13 | await airdropReward(); 14 | } catch (error) { 15 | console.log("😒 bot error:", error); 16 | } 17 | } 18 | 19 | const expireInitData = async() => { 20 | const oneDayAgo = new Date(Date.now() - 24 * 60 * 60 * 1000); 21 | 22 | const result = await MarketModel.deleteMany({ 23 | marketStatus: 'INIT', 24 | createdAt: { $lt: oneDayAgo } 25 | }); 26 | } 27 | 28 | const expirePendingData = async () => { 29 | const oneWeekAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000); 30 | 31 | const penddingMarkets = await MarketModel.find({ 32 | marketStatus: 'PENDING', 33 | createdAt: { $lt: oneWeekAgo }, 34 | 35 | }); 36 | 37 | const list: TransactionInstruction[] = []; 38 | for (let index = 0; index < penddingMarkets.length; index++) { 39 | const market = penddingMarkets[index].market; 40 | for (let i = 0; i < penddingMarkets[index].investors.length; i++) { 41 | const element = penddingMarkets[index].investors[i]; 42 | const instructin = await withdraw({ 43 | signer: new PublicKey(auth.payer), 44 | market_id: new PublicKey(market), 45 | amount: element.amount, 46 | reciever: new PublicKey(element.investor) 47 | }); 48 | 49 | list.push(instructin); 50 | } 51 | } 52 | 53 | await buildVT(list); 54 | } 55 | 56 | const airdropReward = async () => { 57 | const today = new Date(); 58 | const yyyy = today.getFullYear(); 59 | const mm = String(today.getMonth() + 1).padStart(2, '0'); 60 | const dd = String(today.getDate()).padStart(2, '0'); 61 | const todayStr = `${yyyy}-${mm}-${dd}`; 62 | 63 | const result = await MarketModel.find({ 64 | date: { $lte: todayStr }, // Less than or equal to today 65 | $or: [ 66 | { "playerA.0": { $exists: true } }, // playerA has at least one 67 | { "playerB.0": { $exists: true } } // or playerB has at least one 68 | ] 69 | }); 70 | 71 | for (let index = 0; index < result.length; index++) { 72 | const market = result[index]; 73 | 74 | const betting_result = await getOracleResult({ 75 | market_id: market.market, 76 | feed: market.feedkey as String 77 | }); 78 | 79 | } 80 | } -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/pagination/Pagination.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { 5 | MdKeyboardArrowRight, 6 | MdOutlineKeyboardArrowLeft, 7 | } from "react-icons/md"; 8 | 9 | interface PaginationProps { 10 | totalPages: number; // Total number of pages 11 | currentPage: number; // The current active page 12 | onPageChange: (page: number) => void; // Function to handle page change 13 | } 14 | 15 | const Pagination: React.FC = ({ 16 | totalPages, 17 | currentPage, 18 | onPageChange, 19 | }) => { 20 | // Generate an array of page numbers to display 21 | const pageNumbers = Array.from( 22 | { length: totalPages }, 23 | (_, index) => index + 1 24 | ); 25 | 26 | // Handle page click 27 | const handlePageClick = (page: number) => { 28 | if (page !== currentPage) { 29 | onPageChange(page); 30 | } 31 | }; 32 | 33 | return ( 34 |
35 |
36 | {/* Left Decoration */} 37 |
38 |
39 | 40 |
41 |
42 | 43 | {/* Pagination Items */} 44 |
45 | {pageNumbers.map((page) => ( 46 |
handlePageClick(page)} 50 | className={`sm:w-14 w-10 sm:p-4 p-2 rounded-2xl outline-1 outline-offset-[-1px] ${ 51 | currentPage === page 52 | ? "bg-white/10 outline-[#838587]" 53 | : "opacity outline-[#282828]" 54 | } flex justify-center items-center gap-2 cursor-pointer`} 55 | > 56 |
{page}
57 |
58 | ))} 59 |
60 | 61 | {/* Right Decoration */} 62 |
63 |
64 | 65 |
66 |
67 |
68 |
69 | ); 70 | }; 71 | 72 | export default Pagination; 73 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/marketInfo/RecentItem.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Icon from '../Icons'; 3 | 4 | interface RecentItemProps { 5 | question: string; 6 | timeAgo: string; 7 | userName: string; 8 | action: string; 9 | price: string; 10 | imageSrc: string; 11 | status: 'yes' | 'no' | 'funded'; 12 | } 13 | 14 | const RecentItem: React.FC = ({ question, timeAgo, userName, action, price, imageSrc, status }) => { 15 | let statusStyles = ''; 16 | let statusText = ''; 17 | 18 | if (status === 'yes') { 19 | statusStyles = 'bg-[#111111] outline-[#3fd145] text-[#3fd145]'; 20 | statusText = 'Yes'; 21 | } else if (status === 'no') { 22 | statusStyles = 'bg-[#111111] outline-[#ff6464] text-[#ff6464]'; 23 | statusText = 'No'; 24 | } else { 25 | statusStyles = 'bg-[#111111] outline-[#07b3ff] text-[#07b3ff]'; 26 | statusText = 'Funded'; 27 | } 28 | 29 | return ( 30 |
31 |
32 |
33 |
{question}
34 |
- {timeAgo} ago
35 |
36 |
37 | user 38 |
39 | {userName} 40 | {action} 41 |
42 |
43 | {status !== 'funded' ? ( 44 |
45 | 46 |
47 | ): ""} 48 |
49 | {statusText} 50 |
51 |
52 |
53 | for {price} 54 |
55 |
56 |
57 | item 58 |
59 | ); 60 | }; 61 | 62 | export default RecentItem; 63 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/profile/HistoryItem.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useWallet } from "@solana/wallet-adapter-react"; 4 | import React, { useEffect, useState } from "react"; 5 | 6 | interface HistoryItemProps { 7 | imageUrl: string; 8 | question: string; 9 | status: "Ongoing" | "Won" | "Lost"; 10 | percentage: string; 11 | answer: "Yes" | "No"; 12 | amount: string; 13 | } 14 | 15 | const HistoryItem = (param: any) => { 16 | const { publicKey } = useWallet(); 17 | const [percentage, setPercentage] = useState(0); 18 | const [answer, setAnswer] = useState("Yes"); 19 | const [amount, setAmount] = useState("Yes"); 20 | // Define status colors dynamically 21 | const statusColors = { 22 | Ongoing: "bg-[#3fd145]/10 text-[#3fd145]", 23 | Won: "bg-[#0054f5]/10 text-[#07b3ff]", 24 | Lost: "bg-[#ff6464]/10 text-[#ff6464]", 25 | }; 26 | 27 | // const answerColor = answer === "Yes" ? "text-[#3fd145]" : "text-[#ff6464]"; 28 | const answerColor = "text-[#ff6464]"; 29 | useEffect(() => { 30 | let playerList = param.playerA.find((p:any) => p.player === publicKey?.toBase58()); 31 | let totalPlayAmount = 0; 32 | if (playerList) { 33 | totalPlayAmount = param.playerA.reduce((sum:any, i:any) => sum + i.amount, 0); 34 | } else { 35 | playerList = param.playerB.find((p:any) => p.player === publicKey?.toBase58()); 36 | totalPlayAmount = param.playerB.reduce((sum:any, i:any) => sum + i.amount, 0); 37 | setAnswer("No") 38 | } 39 | 40 | if (!playerList) { 41 | return 42 | } 43 | const percentage = playerList?.amount / totalPlayAmount * 100; 44 | setAmount(playerList?.amount); 45 | setPercentage(percentage); 46 | }, []); 47 | return ( 48 |
49 | Market Icon 50 |
51 | {param.question} 52 |
53 |
54 |
57 |
58 | {param.marketStatus} 59 |
60 |
61 |
62 |
63 |
64 | {percentage.toFixed(1)} % 65 |
66 |
69 | {answer} 70 |
71 |
72 |
73 | {amount} 74 |
75 |
76 | ); 77 | }; 78 | 79 | export default HistoryItem; 80 | -------------------------------------------------------------------------------- /prediction-market-smartcontract/programs/prediction/src/instructions/deposite_liquidity.rs: -------------------------------------------------------------------------------- 1 | use crate::constants::GLOBAL_SEED; 2 | use crate::errors::ContractError; 3 | use crate::events::MarketStatusUpdated; 4 | use crate::states::{ 5 | global::Global, 6 | market::{Market, MarketStatus}, 7 | }; 8 | use anchor_lang::{prelude::*, solana_program}; 9 | 10 | #[derive(Accounts)] 11 | pub struct DepositLiquidity<'info> { 12 | #[account(mut)] 13 | pub user: Signer<'info>, 14 | 15 | /// CHECK: global fee authority is checked in constraint 16 | #[account( 17 | mut, 18 | constraint = fee_authority.key() == global.fee_authority @ ContractError::InvalidFeeAuthority 19 | )] 20 | pub fee_authority: AccountInfo<'info>, 21 | 22 | #[account( 23 | mut, 24 | constraint = market.market_status == MarketStatus::Prepare @ ContractError::NotPreparing, 25 | )] 26 | pub market: Account<'info, Market>, 27 | 28 | #[account( 29 | seeds = [GLOBAL_SEED.as_bytes()], 30 | bump 31 | )] 32 | pub global: Account<'info, Global>, 33 | 34 | pub system_program: Program<'info, System>, 35 | } 36 | 37 | pub fn deposit_liquidity(ctx: Context, amount: u64) -> Result<()> { 38 | 39 | require!(amount >= 100000, ContractError::InvalidFundAmount); 40 | // Transfer sol to market 41 | let liquidity_transfer_instruction = solana_program::system_instruction::transfer( 42 | ctx.accounts.user.key, 43 | &ctx.accounts.market.key(), 44 | amount, 45 | ); 46 | 47 | anchor_lang::solana_program::program::invoke_signed( 48 | &liquidity_transfer_instruction, 49 | &[ 50 | ctx.accounts.user.to_account_info(), 51 | ctx.accounts.market.to_account_info(), 52 | ctx.accounts.system_program.to_account_info(), 53 | ], 54 | &[], 55 | )?; 56 | 57 | let fee_amount_to_auth = amount 58 | .checked_mul(ctx.accounts.global.fund_fee_percentage as u64) 59 | .ok_or(ContractError::ArithmeticError)? 60 | .checked_div(100) 61 | .ok_or(ContractError::ArithmeticError)?; 62 | 63 | // Transfer sol to fee authority 64 | let transfer_instruction = solana_program::system_instruction::transfer( 65 | ctx.accounts.user.key, 66 | &ctx.accounts.fee_authority.key(), 67 | fee_amount_to_auth, 68 | ); 69 | 70 | anchor_lang::solana_program::program::invoke_signed( 71 | &transfer_instruction, 72 | &[ 73 | ctx.accounts.user.to_account_info(), 74 | ctx.accounts.fee_authority.to_account_info(), 75 | ctx.accounts.system_program.to_account_info(), 76 | ], 77 | &[], 78 | )?; 79 | 80 | // Update market status 81 | let market_balance = ctx.accounts.market.get_lamports(); 82 | if market_balance >= ctx.accounts.global.market_count { 83 | ctx.accounts.market.market_status = MarketStatus::Active; 84 | } 85 | msg!("🎫deposit liquidity market_balance 🎫 {}", market_balance); 86 | msg!( 87 | "🎫deposit liquidity global.market_count 🎫 {}", 88 | ctx.accounts.global.market_count 89 | ); 90 | msg!( 91 | "🎫deposit liquidity market_status 🎫 {:?}", 92 | ctx.accounts.market.market_status 93 | ); 94 | emit!(MarketStatusUpdated { 95 | market_id: ctx.accounts.market.key(), 96 | market_status: ctx.accounts.market.market_status, 97 | }); 98 | Ok(()) 99 | } 100 | -------------------------------------------------------------------------------- /BackEnd/src/config.ts: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import BN from "bn.js"; 3 | import { Keypair, LAMPORTS_PER_SOL } from "@solana/web3.js"; 4 | import keypair from "./prediction.json"; 5 | import { NodeWallet } from "@coral-xyz/anchor"; 6 | 7 | export const connectMongoDB = async () => { 8 | const MONGO_URL = process.env.DB_URL || ''; 9 | let isConnected = false; 10 | 11 | const connect = async () => { 12 | try { 13 | if (MONGO_URL) { 14 | const connection = await mongoose.connect(MONGO_URL); 15 | console.log(`MONGODB CONNECTED : ${connection.connection.host}`); 16 | console.log(`----------------------------------------------------------------------------`); 17 | 18 | isConnected = true; 19 | } else { 20 | console.log("No Mongo URL"); 21 | } 22 | } catch (error) { 23 | console.log(`Error : ${(error as Error).message}`); 24 | isConnected = false; 25 | // Attempt to reconnect 26 | setTimeout(connect, 1000); // Retry connection after 1 seconds 27 | } 28 | }; 29 | 30 | connect(); 31 | 32 | mongoose.connection.on("disconnected", () => { 33 | console.log("MONGODB DISCONNECTED"); 34 | isConnected = false; 35 | // Attempt to reconnect 36 | setTimeout(connect, 1000); // Retry connection after 5 seconds 37 | }); 38 | 39 | mongoose.connection.on("reconnected", () => { 40 | console.log("MONGODB RECONNECTED"); 41 | isConnected = true; 42 | }); 43 | }; 44 | 45 | export const initialSettings = { 46 | creatorFeeAmount: 0.001 * 10 ** 9, 47 | marketCount: 0.1 * 10 ** 9, 48 | decimal: 9, 49 | fundFeePercentage: 1.5, 50 | bettingFeePercentage: 2.5 51 | } 52 | 53 | export const marketField = [ 54 | { 55 | name: "Coin Prediction Market", 56 | content: [ 57 | { 58 | api_name: "Coingecho", 59 | needed_data: [ 60 | { 61 | name: "vs_currency", 62 | placeholder: "usd" 63 | }, 64 | { 65 | name: "id", 66 | placeholder: "solana" 67 | } 68 | ], 69 | task: null, 70 | api_link: (...args: string[]) => `https://api.coingecko.com/api/v3/simple/price?ids=${args[1]}&vs_currencies=${args[0]}`, 71 | market_keyword: (...args: string[]) => `id: ${args[1]}, vs_currency: ${args[0]}`, 72 | }, 73 | { 74 | api_name: "Dexscreener", 75 | needed_data: [ 76 | { 77 | name: "token", 78 | placeholder: "EGfWrQjqEexyPcZNUFGU8LypCikg34q2vqtk7hwBzWdS" 79 | } 80 | ], 81 | task: "$.pairs[0].priceUsd", 82 | api_link: (...args: string[]) => `https://api.dexscreener.com/latest/dex/tokens/${args[0]}`, 83 | market_keyword: (...args: string[]) => `token: ${args[0]}`, 84 | } 85 | ] 86 | }, 87 | ] 88 | 89 | export const backendSettings = { 90 | pageOffset: 10, 91 | expireTime: { 92 | initMarket: 1, // 1 Day 93 | pendingMarket: 7 // 7 Days 94 | } 95 | } 96 | 97 | const walletKeypair = Keypair.fromSecretKey(Uint8Array.from(keypair), { 98 | skipValidation: true, 99 | }); 100 | 101 | export const auth = new NodeWallet(walletKeypair); 102 | 103 | export const marketConfig = { 104 | range: 0, 105 | tokenAmount: new BN(1000000000), 106 | tokenPrice: new BN(0.00001 * LAMPORTS_PER_SOL), 107 | nameA: "AToken", 108 | nameB: "BToken", 109 | symbolA: "A", 110 | symbolB: "B", 111 | urlA: "https://tokena", 112 | urlB: "https://tokenb", 113 | } -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/carousel/MarketCarouselItem.tsx: -------------------------------------------------------------------------------- 1 | import { MarketCarouselItemProps } from "@/types/type"; 2 | import { FaRegClock, FaRegStar } from "react-icons/fa6"; 3 | import { motion } from "framer-motion"; 4 | 5 | const MarketCarouselItem: React.FC = ({ 6 | category, 7 | title, 8 | bgImage, 9 | mainImage, 10 | overlayImage, 11 | volume, 12 | timeLeft, 13 | yesPercentage, 14 | comments, 15 | }) => { 16 | return ( 17 | 22 | {/* Background Image */} 23 |
24 | Background 29 |
30 |
31 | 32 | {/* Main Image (subtle, right side) */} 33 |
34 | Main 39 |
40 | 41 | {/* Overlay Image (optional, more subtle) */} 42 |
43 | Overlay 48 |
49 | 50 | {/* Content */} 51 |
52 |
53 | {/* Category and Title */} 54 |
55 | {category} 56 |
57 | 58 | {comments} 59 |
60 |
61 |
62 | {title} 63 |
64 |
65 | 66 | {/* Stats */} 67 |
68 |
69 | Volume 70 | {volume} 71 |
72 |
73 | Time Left 74 |
75 | 76 | {timeLeft} 77 |
78 |
79 |
80 | Yes % 81 | {yesPercentage}% 82 |
83 |
84 |
85 | 86 | ); 87 | }; 88 | 89 | export default MarketCarouselItem; 90 | -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/profile/ProfileProposeItem.tsx: -------------------------------------------------------------------------------- 1 | import { getCountDown } from "@/utils"; 2 | import React, { useEffect, useState } from "react"; 3 | import { GiAlarmClock } from "react-icons/gi"; 4 | 5 | interface ProfileProposeItemProps { 6 | image: string; 7 | title: string; 8 | status: "Pending" | "Active" | "Expired"; 9 | timeLeft: string; 10 | betAmount: number; 11 | totalAmount: number; 12 | } 13 | 14 | const statusColors: Record = { 15 | PENDING: "bg-[#3fd145]/10 text-[#3fd145]", 16 | ACTIVE: "bg-[#0054f5]/10 text-[#07b3ff]", 17 | Expired: "bg-[#ff6464]/10 text-[#ff6464]", 18 | }; 19 | 20 | const ProfileProposeItem = (param: any) => { 21 | const [counter, setCounter] = useState("7d : 6h : 21m : 46s"); 22 | const [fund, setFund] = useState(0); 23 | 24 | useEffect(() => { 25 | const interval = setInterval(() => { 26 | let remainTime = getCountDown(param.date) 27 | setCounter(remainTime); 28 | }, 1000); 29 | const totalAmount = param.investors.reduce((sum:any, i:any) => sum + i.amount, 0); 30 | setFund(totalAmount); 31 | return () => clearInterval(interval); 32 | }, []) 33 | return ( 34 |
35 | proposal-icon 36 |
37 |
38 |
{param.marketStatus}
39 |
40 |
{param.question}
41 |
42 |
Time Left
43 |
44 |
45 | 46 |
47 |
{counter}
48 |
49 |
50 |
51 |
Collected
52 |
53 | {Array.from({ length: 20 }).map((_, idx) => { 54 | const filledSegments = Math.floor((fund / 0.1) * 20); 55 | const isFilled = idx < filledSegments; 56 | return ( 57 |
61 | ); 62 | })} 63 |
64 |
65 | 66 | {fund} 67 | 68 | 69 | / {0.1} SOL 70 | 71 | 72 | SOL Raised 73 | 74 |
75 |
76 |
77 |
78 | ); 79 | }; 80 | 81 | export default ProfileProposeItem; 82 | -------------------------------------------------------------------------------- /FrontEnd/src/types/type.ts: -------------------------------------------------------------------------------- 1 | import { TransactionInstruction, Keypair, PublicKey } from "@solana/web3.js"; 2 | import { AnchorWallet, WalletContextState } from "@solana/wallet-adapter-react"; 3 | 4 | export interface SidebarNavItemProps { 5 | label: 6 | | "Home" 7 | | "FundMarket" 8 | | "ProposeMarket" 9 | | "Referral" 10 | | "Profile" 11 | | "About"; 12 | href: string; 13 | isActive: boolean; 14 | onClick: () => void; 15 | isCollapsed: boolean; 16 | } 17 | 18 | export interface SidebarNavProps { 19 | isCollapsed: boolean; 20 | } 21 | 22 | export interface MarketCarouselItemProps { 23 | category: string; 24 | title: string; 25 | bgImage: string; 26 | mainImage: string; 27 | overlayImage: string; 28 | volume: string; 29 | timeLeft: string; 30 | yesPercentage: number; 31 | comments: number; 32 | } 33 | 34 | // Define Prediction type for active predictions 35 | export interface Prediction { 36 | category: string; 37 | question: string; 38 | volume: string; 39 | timeLeft: string; 40 | comments: number; 41 | yesPercentage: number; // Only for active predictions 42 | imageUrl: string; 43 | onVote?: () => void; 44 | } 45 | 46 | // Define PendingData type for pending predictions 47 | export interface PendingData { 48 | category: string; 49 | question: string; 50 | volume: string; 51 | timeLeft: string; 52 | comments: number; 53 | imageUrl: string; 54 | } 55 | 56 | export interface ProposeType { 57 | marketField: number; 58 | imageUrl: string; 59 | range: number, 60 | apiType: number; 61 | question: string; 62 | feedName: string; 63 | dataLink: string; 64 | date: string; 65 | task: string; 66 | value: number, 67 | creator: string, 68 | description: string 69 | } 70 | 71 | export type GlobalSettingType = { 72 | creatorFeeAmount: number; 73 | liqudityUserFeeAmount: number; 74 | bettingUserFeeAmount: number; 75 | marketCount: number; 76 | decimal: number; 77 | feePercentage: number; 78 | }; 79 | 80 | export type CreateMarketType = { 81 | marketID: String; 82 | date: String; 83 | value: number; 84 | feed: Keypair; 85 | wallet: WalletContextState, 86 | anchorWallet: AnchorWallet, 87 | }; 88 | 89 | export type DepositeLiquidityType = { 90 | market_id: string, 91 | amount: number, 92 | wallet: WalletContextState, 93 | } 94 | 95 | export type BetType = { 96 | creator: string, 97 | player: AnchorWallet, 98 | marketId: string, 99 | amount: number, 100 | isYes: boolean, 101 | market: string, 102 | token: string, 103 | } 104 | 105 | export type OracleType = { 106 | creator: string, 107 | } 108 | 109 | export type RegistType = { 110 | url: String, 111 | task: String, 112 | name: String, 113 | wallet: AnchorWallet, 114 | cluster: 'Devnet' | 'Mainnet' 115 | } 116 | 117 | export type MarketStatus = 118 | "INIT" | 119 | "PENDING" | 120 | "ACTIVE" | 121 | "CLOSED" 122 | 123 | export type MarketDataType = { 124 | "_id": string, 125 | "marketField": number, 126 | "apiType": number, 127 | "task": string, 128 | "creator": string, 129 | "tokenA": string, 130 | "tokenB": string, 131 | "market": string, 132 | "question": string, 133 | "feedName": string, 134 | "value": number, 135 | "range": number, 136 | "date": string, 137 | "marketStatus": string, 138 | "imageUrl": string, 139 | "createdAt": string, 140 | "__v": number, 141 | "playerACount": number, 142 | "playerBCount": number, 143 | "totalInvestment": number, 144 | "description": string, 145 | "comments": number 146 | } 147 | 148 | export type ReferralType = { 149 | wallet: String, 150 | referralCode: String, 151 | referredLevel: Number, 152 | fee: number, 153 | status: "PENDING" | "ACTIVE", 154 | wallet_refered: String, 155 | createdAt: String, 156 | } -------------------------------------------------------------------------------- /FrontEnd/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | import axios from "axios"; 3 | 4 | const PINATA_API_KEY = "6ab09644822193eed05d"; 5 | const PINATA_SECRET_KEY = "e920681dec7cb1d967ab69aaff433c1a94d4e4b3da53dc0d169f6736c7292708"; 6 | 7 | export const uploadToPinata = async (file: File) => { 8 | try { 9 | const formData = new FormData(); 10 | formData.append("file", file); 11 | console.log("uploading..."); 12 | 13 | const response = await axios.post( 14 | "https://api.pinata.cloud/pinning/pinFileToIPFS", 15 | formData, 16 | { 17 | headers: { 18 | "Content-Type": "multipart/form-data", 19 | pinata_api_key: PINATA_API_KEY, 20 | pinata_secret_api_key: PINATA_SECRET_KEY, 21 | }, 22 | } 23 | ); 24 | console.log("finished uploading", response.data.IpfsHash); 25 | 26 | return `https://gateway.pinata.cloud/ipfs/${response.data.IpfsHash}`; 27 | } catch (error) { 28 | console.error("Error uploading to Pinata:", error); 29 | return null 30 | } 31 | }; 32 | 33 | export function findJsonPathsForKey(jsonStr: string, key: string): string[] { 34 | const paths: string[] = []; 35 | 36 | function search(obj: any, path: string = "$") { 37 | if (typeof obj !== "object" || obj === null) return; 38 | 39 | if (Array.isArray(obj)) { 40 | obj.forEach((item, index) => { 41 | search(item, `${path}[${index}]`); 42 | }); 43 | } else { 44 | for (const k in obj) { 45 | if (k === key) { 46 | paths.push(`${path}.${k}`); 47 | } 48 | search(obj[k], `${path}.${k}`); 49 | } 50 | } 51 | } 52 | 53 | try { 54 | const data = JSON.parse(jsonStr); 55 | search(data); 56 | return paths; 57 | } catch (e) { 58 | console.error("Invalid JSON:", e); 59 | return []; 60 | } 61 | } 62 | 63 | export const getCountDown = (targetDateStr: string) => { 64 | 65 | const targetDate = new Date(targetDateStr); 66 | const now = new Date(); 67 | 68 | let diff = Math.max(0, targetDate.getTime() - now.getTime()); // in milliseconds 69 | 70 | const days = Math.floor(diff / (1000 * 60 * 60 * 24)); 71 | diff -= days * (1000 * 60 * 60 * 24); 72 | 73 | const hours = Math.floor(diff / (1000 * 60 * 60)); 74 | diff -= hours * (1000 * 60 * 60); 75 | 76 | const minutes = Math.floor(diff / (1000 * 60)); 77 | diff -= minutes * (1000 * 60); 78 | 79 | const seconds = Math.floor(diff / 1000); 80 | 81 | return `${days}d : ${hours}h : ${minutes}m : ${seconds}s`; 82 | } 83 | 84 | export const elipsKey = (content: string) => { 85 | return content.length > 10 ? content.slice(0, 4) + "..." + content.slice(content.length - 4, content.length) : content 86 | } 87 | 88 | export const isPublickey = (addr: string) => { 89 | try { 90 | const key = new PublicKey(addr); 91 | return PublicKey.isOnCurve(key.toBytes()); 92 | } catch (error) { 93 | console.log("Invalid Address:", error); 94 | return false 95 | } 96 | } 97 | 98 | export function timeAgo(ms: number): string { 99 | const now = Date.now(); 100 | const diff = now - ms; 101 | 102 | const minute = 60 * 1000; 103 | const hour = 60 * minute; 104 | const day = 24 * hour; 105 | const month = 30 * day; 106 | const year = 12 * month; 107 | 108 | if (diff < hour) { 109 | const minutes = Math.floor(diff / minute); 110 | return `${minutes} min ago`; 111 | } else if (diff < day) { 112 | const hours = Math.floor(diff / hour); 113 | return `${hours} hour${hours !== 1 ? 's' : ''} ago`; 114 | } else if (diff < month) { 115 | const days = Math.floor(diff / day); 116 | return `${days} day${days !== 1 ? 's' : ''} ago`; 117 | } else if (diff < year) { 118 | const months = Math.floor(diff / month); 119 | return `${months} month${months !== 1 ? 's' : ''} ago`; 120 | } else { 121 | const years = Math.floor(diff / year); 122 | return `${years} year${years !== 1 ? 's' : ''} ago`; 123 | } 124 | } 125 | 126 | export function stylizeFloat(num: number) { 127 | parseFloat(Number(num).toFixed(9)).toString() 128 | } -------------------------------------------------------------------------------- /BackEnd/src/controller/profile/index.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from "express"; 2 | import MarketModel from "../../model/market"; 3 | import ReferModel from "../../model/referral"; 4 | 5 | export const getProfileData = async (req: Request, res: Response) => { 6 | try { 7 | const { wallet } = req.query; 8 | 9 | const results = await MarketModel.find({ 10 | $or: [ 11 | { creator: wallet }, 12 | { "playerA.player": wallet }, 13 | { "playerB.player": wallet }, 14 | { "investors.investor": wallet } 15 | ] 16 | }); 17 | 18 | const referrals = await ReferModel.find({ 19 | wallet_refered: wallet 20 | }) 21 | 22 | 23 | //// Getting Active Bet ///// 24 | const activeBet = results.filter((val) => val.marketStatus === "ACTIVE").length; 25 | 26 | //// Getting betting history ///// 27 | const bettingHistory = results.filter((val) => val.playerA.some(p => p.player === wallet) || val.playerB.some(p => p.player === wallet)); 28 | 29 | //// Getting Active Bet ///// 30 | const totalBet = bettingHistory.length; 31 | 32 | //// Getting Earning From Bet ///// 33 | const closedMarkets = bettingHistory.filter((val) => val.marketStatus === "CLOSED"); 34 | 35 | let earnedBet = 0; 36 | 37 | for (const market of closedMarkets) { 38 | const isPlayerAWinner = market.isYes === true; 39 | 40 | const winners = isPlayerAWinner ? market.playerA : market.playerB; 41 | const losers = isPlayerAWinner ? market.playerB : market.playerA; 42 | 43 | const totalWinningAmount = winners.reduce((sum, p) => sum + p.amount, 0); 44 | const totalLosingAmount = losers.reduce((sum, p) => sum + p.amount, 0); 45 | 46 | const userEntry = winners.find(p => p.player === wallet); 47 | if (!userEntry) continue; 48 | 49 | const userShare = userEntry.amount / totalWinningAmount; 50 | const userEarnings = userEntry.amount + (userShare * totalLosingAmount); 51 | 52 | earnedBet += userEarnings; 53 | } 54 | 55 | const investList = results.filter((val) => val.investors.some(i => i.investor === wallet)); ///fundedMarkets 56 | let sumPerMarket: number[] = [] 57 | if (investList.length > 0) { 58 | sumPerMarket = investList.map((val) => val.investors.find((val) => wallet === val.investor)!.amount); 59 | } 60 | 61 | //// Getting earned fee from liquidity ///// 62 | let earnedFeeLiquidity = 0; 63 | for (let index = 0; index < investList.length; index++) { 64 | const element = investList[index]; 65 | const userInvest = element.investors.find(p => p.investor === wallet); 66 | if (!userInvest) continue; 67 | const totalLiquidityAmount = element.investors.reduce((sum, i) => sum + i.amount, 0); 68 | const userShare = userInvest.amount/totalLiquidityAmount; 69 | 70 | const betAAmou = element.playerA.reduce((sum, i) => sum + i.amount, 0); 71 | const betBAmou = element.playerB.reduce((sum, i) => sum + i.amount, 0); 72 | 73 | const userEarnings = userInvest.amount + (userShare * (betAAmou + betBAmou) * 0.01); 74 | earnedFeeLiquidity += userEarnings; 75 | } 76 | 77 | //// Getting totalLiquidityProvided ///// 78 | const totalLiquidityProvided = sumPerMarket.reduce((sum, i) => sum + i, 0); 79 | console.log("totalLiquidityProvided ", totalLiquidityProvided); 80 | 81 | const proposedMarket = results.filter((val) => val.creator === wallet); 82 | const totalProposedMarket = proposedMarket.length; 83 | const totalreferrals = referrals.length; 84 | 85 | res.status(200).send({ totalProfileValue: 0, activeBet, totalBet, totalLiquidityProvided, earnedFeeLiquidity, earnedBet, totalProposedMarket, totalreferrals, bettingHistory, fundedMarkets: investList, proposedMarket }) 86 | } catch (error) { 87 | console.log("😒 error:", error); 88 | res.status(500).send("Something went wrong fetching profile Data!"); 89 | } 90 | } -------------------------------------------------------------------------------- /FrontEnd/src/components/elements/referral/ReferralItem.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { motion } from "framer-motion"; 5 | import { FaUser, FaClock, FaCoins } from "react-icons/fa"; 6 | import { ReferralType } from "@/types/type"; 7 | import { elipsKey, timeAgo } from "@/utils"; 8 | import axios from "axios"; 9 | import { url } from "@/data/data"; 10 | import { errorAlert, infoAlert } from "../ToastGroup"; 11 | 12 | const ReferralItem: React.FC = ({ 13 | wallet, 14 | referralCode, 15 | referredLevel, 16 | fee, 17 | status, 18 | wallet_refered, 19 | createdAt, 20 | }) => { 21 | const [claiming, setClaiming] = React.useState(false); 22 | const handleClaim = async (amount: number) => { 23 | try { 24 | if (claiming) { 25 | return 26 | } 27 | 28 | setClaiming(true); 29 | const res = await axios.post(url + "api/referral/claim", { 30 | wallet, 31 | amount 32 | }); 33 | 34 | if (res.status === 200) { 35 | infoAlert("Claimed successfully!"); 36 | setClaiming(false); 37 | } 38 | } catch (error) { 39 | setClaiming(false); 40 | errorAlert("Failed claiming!"); 41 | } 42 | } 43 | 44 | return ( 45 | 49 | {/* Left Section - User Info */} 50 |
51 |
52 | 53 |
54 |
55 |
56 | {elipsKey(wallet_refered as string)} 57 |
58 |
59 | {referralCode} 60 |
61 |
62 |
63 | 64 | {/* Right Section - Status and Amount */} 65 |
66 | {/* Time Ago */} 67 |
68 | 69 |
70 | {timeAgo(parseInt(createdAt as string))} 71 |
72 |
73 | 74 | {/* Status Badge */} 75 |
80 | {status.charAt(0).toUpperCase() + status.slice(1)} 81 |
82 | 83 | {/* Amount Earned */} 84 |
85 | 86 |
87 | 88 | { parseFloat(Number(fee / 100000000).toFixed(9)).toString()} 89 | 90 | 91 | SOL 92 | 93 |
94 |
95 | 96 | handleClaim(fee)} 100 | className="px-4 py-3 bg-[#282828] rounded-xl cursor-pointer border border-[#313131] flex items-center gap-2 hover:bg-[#313131] transition-colors" 101 | > 102 | {/* */} 103 | 104 | {claiming? "Claiming..." : "Claim"} 105 | 106 | 107 |
108 |
109 | ); 110 | }; 111 | 112 | export default ReferralItem; 113 | -------------------------------------------------------------------------------- /FrontEnd/src/styles/carousel.css: -------------------------------------------------------------------------------- 1 | /* Custom styles for the carousel */ 2 | .carousel-container { 3 | position: relative; 4 | overflow: visible; 5 | padding: 0; 6 | margin: 0; 7 | } 8 | 9 | .react-multi-carousel-list { 10 | overflow: visible; 11 | position: relative; 12 | } 13 | 14 | .react-multi-carousel-track { 15 | list-style: none; 16 | padding: 0; 17 | margin: 0; 18 | display: flex; 19 | flex-direction: row; 20 | position: relative; 21 | transform-style: preserve-3d; 22 | backface-visibility: hidden; 23 | will-change: transform, transition; 24 | } 25 | 26 | /* Custom arrow styles */ 27 | .react-multiple-carousel__arrow { 28 | background: rgba(17, 17, 17, 0.7) !important; 29 | border: 2px solid rgba(255, 255, 255, 0.1) !important; 30 | border-radius: 50% !important; 31 | z-index: 20 !important; 32 | transition: all 0.3s ease-in-out !important; 33 | backdrop-filter: blur(8px) !important; 34 | transform: scale(1); 35 | } 36 | 37 | .react-multiple-carousel__arrow:hover { 38 | background: rgba(7, 179, 255, 0.8) !important; 39 | transform: scale(1.1); 40 | box-shadow: 0 0 20px rgba(7, 179, 255, 0.4); 41 | } 42 | 43 | .react-multiple-carousel__arrow::before { 44 | transition: all 0.3s ease-in-out; 45 | } 46 | 47 | .react-multiple-carousel__arrow:hover::before { 48 | transform: scale(1.2); 49 | } 50 | 51 | .react-multiple-carousel__arrow--left { 52 | left: 10px !important; 53 | animation: slideInLeft 0.5s ease-out; 54 | } 55 | 56 | .react-multiple-carousel__arrow--right { 57 | right: 10px !important; 58 | animation: slideInRight 0.5s ease-out; 59 | } 60 | 61 | /* Carousel Item Animations */ 62 | .carousel-item { 63 | transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 64 | transform: scale(0.98); 65 | opacity: 0.8; 66 | } 67 | 68 | .carousel-item.active { 69 | transform: scale(1); 70 | opacity: 1; 71 | } 72 | 73 | .carousel-item:hover { 74 | transform: scale(1.02); 75 | } 76 | 77 | /* Gradient Border Effect */ 78 | .carousel-item::before { 79 | content: ''; 80 | position: absolute; 81 | inset: -2px; 82 | z-index: -1; 83 | background: linear-gradient( 84 | 45deg, 85 | rgba(7, 179, 255, 0.5), 86 | rgba(7, 179, 255, 0), 87 | rgba(7, 179, 255, 0.5) 88 | ); 89 | border-radius: inherit; 90 | transition: opacity 0.3s ease-in-out; 91 | opacity: 0; 92 | } 93 | 94 | .carousel-item:hover::before { 95 | opacity: 1; 96 | } 97 | 98 | /* Button Hover Effect */ 99 | .carousel-button { 100 | position: relative; 101 | overflow: hidden; 102 | transition: all 0.3s ease-in-out; 103 | } 104 | 105 | .carousel-button::after { 106 | content: ''; 107 | position: absolute; 108 | top: 50%; 109 | left: 50%; 110 | width: 150%; 111 | height: 150%; 112 | background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%); 113 | transform: translate(-50%, -50%) scale(0); 114 | opacity: 0; 115 | transition: transform 0.5s ease-out, opacity 0.3s ease-out; 116 | } 117 | 118 | .carousel-button:hover::after { 119 | transform: translate(-50%, -50%) scale(1); 120 | opacity: 1; 121 | } 122 | 123 | /* Animations */ 124 | @keyframes slideInLeft { 125 | from { 126 | transform: translateX(-20px); 127 | opacity: 0; 128 | } 129 | to { 130 | transform: translateX(0); 131 | opacity: 1; 132 | } 133 | } 134 | 135 | @keyframes slideInRight { 136 | from { 137 | transform: translateX(20px); 138 | opacity: 0; 139 | } 140 | to { 141 | transform: translateX(0); 142 | opacity: 1; 143 | } 144 | } 145 | 146 | @keyframes fadeIn { 147 | from { 148 | opacity: 0; 149 | transform: translateY(10px); 150 | } 151 | to { 152 | opacity: 1; 153 | transform: translateY(0); 154 | } 155 | } 156 | 157 | /* Image Hover Effects */ 158 | .carousel-image { 159 | transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 160 | } 161 | 162 | .carousel-image:hover { 163 | transform: scale(1.05) rotate(2deg); 164 | filter: brightness(1.1); 165 | } 166 | 167 | /* Text Animation */ 168 | .carousel-text { 169 | animation: fadeIn 0.5s ease-out forwards; 170 | opacity: 0; 171 | } 172 | 173 | .carousel-text.title { 174 | animation-delay: 0.2s; 175 | } 176 | 177 | .carousel-text.category { 178 | animation-delay: 0.1s; 179 | } -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/README.txt: -------------------------------------------------------------------------------- 1 | Inter Variable Font 2 | =================== 3 | 4 | This download contains Inter as both variable fonts and static fonts. 5 | 6 | Inter is a variable font with these axes: 7 | opsz 8 | wght 9 | 10 | This means all the styles are contained in these files: 11 | Inter-VariableFont_opsz,wght.ttf 12 | Inter-Italic-VariableFont_opsz,wght.ttf 13 | 14 | If your app fully supports variable fonts, you can now pick intermediate styles 15 | that aren’t available as static fonts. Not all apps support variable fonts, and 16 | in those cases you can use the static font files for Inter: 17 | static/Inter_18pt-Thin.ttf 18 | static/Inter_18pt-ExtraLight.ttf 19 | static/Inter_18pt-Light.ttf 20 | static/Inter_18pt-Regular.ttf 21 | static/Inter_18pt-Medium.ttf 22 | static/Inter_18pt-SemiBold.ttf 23 | static/Inter_18pt-Bold.ttf 24 | static/Inter_18pt-ExtraBold.ttf 25 | static/Inter_18pt-Black.ttf 26 | static/Inter_24pt-Thin.ttf 27 | static/Inter_24pt-ExtraLight.ttf 28 | static/Inter_24pt-Light.ttf 29 | static/Inter_24pt-Regular.ttf 30 | static/Inter_24pt-Medium.ttf 31 | static/Inter_24pt-SemiBold.ttf 32 | static/Inter_24pt-Bold.ttf 33 | static/Inter_24pt-ExtraBold.ttf 34 | static/Inter_24pt-Black.ttf 35 | static/Inter_28pt-Thin.ttf 36 | static/Inter_28pt-ExtraLight.ttf 37 | static/Inter_28pt-Light.ttf 38 | static/Inter_28pt-Regular.ttf 39 | static/Inter_28pt-Medium.ttf 40 | static/Inter_28pt-SemiBold.ttf 41 | static/Inter_28pt-Bold.ttf 42 | static/Inter_28pt-ExtraBold.ttf 43 | static/Inter_28pt-Black.ttf 44 | static/Inter_18pt-ThinItalic.ttf 45 | static/Inter_18pt-ExtraLightItalic.ttf 46 | static/Inter_18pt-LightItalic.ttf 47 | static/Inter_18pt-Italic.ttf 48 | static/Inter_18pt-MediumItalic.ttf 49 | static/Inter_18pt-SemiBoldItalic.ttf 50 | static/Inter_18pt-BoldItalic.ttf 51 | static/Inter_18pt-ExtraBoldItalic.ttf 52 | static/Inter_18pt-BlackItalic.ttf 53 | static/Inter_24pt-ThinItalic.ttf 54 | static/Inter_24pt-ExtraLightItalic.ttf 55 | static/Inter_24pt-LightItalic.ttf 56 | static/Inter_24pt-Italic.ttf 57 | static/Inter_24pt-MediumItalic.ttf 58 | static/Inter_24pt-SemiBoldItalic.ttf 59 | static/Inter_24pt-BoldItalic.ttf 60 | static/Inter_24pt-ExtraBoldItalic.ttf 61 | static/Inter_24pt-BlackItalic.ttf 62 | static/Inter_28pt-ThinItalic.ttf 63 | static/Inter_28pt-ExtraLightItalic.ttf 64 | static/Inter_28pt-LightItalic.ttf 65 | static/Inter_28pt-Italic.ttf 66 | static/Inter_28pt-MediumItalic.ttf 67 | static/Inter_28pt-SemiBoldItalic.ttf 68 | static/Inter_28pt-BoldItalic.ttf 69 | static/Inter_28pt-ExtraBoldItalic.ttf 70 | static/Inter_28pt-BlackItalic.ttf 71 | 72 | Get started 73 | ----------- 74 | 75 | 1. Install the font files you want to use 76 | 77 | 2. Use your app's font picker to view the font family and all the 78 | available styles 79 | 80 | Learn more about variable fonts 81 | ------------------------------- 82 | 83 | https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts 84 | https://variablefonts.typenetwork.com 85 | https://medium.com/variable-fonts 86 | 87 | In desktop apps 88 | 89 | https://theblog.adobe.com/can-variable-fonts-illustrator-cc 90 | https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts 91 | 92 | Online 93 | 94 | https://developers.google.com/fonts/docs/getting_started 95 | https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide 96 | https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts 97 | 98 | Installing fonts 99 | 100 | MacOS: https://support.apple.com/en-us/HT201749 101 | Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux 102 | Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows 103 | 104 | Android Apps 105 | 106 | https://developers.google.com/fonts/docs/android 107 | https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts 108 | 109 | License 110 | ------- 111 | Please read the full license text (OFL.txt) to understand the permissions, 112 | restrictions and requirements for usage, redistribution, and modification. 113 | 114 | You can use them in your products & projects – print or digital, 115 | commercial or otherwise. 116 | 117 | This isn't legal advice, please consider consulting a lawyer and see the full 118 | license for all details. 119 | -------------------------------------------------------------------------------- /FrontEnd/public/fonts/Inter/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | https://openfontlicense.org 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | --------------------------------------------------------------------------------