├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── cd-kovan.yml │ ├── cd-mumbai.yml │ ├── cd-release.yml │ ├── documentation.yml │ ├── node.js.yml │ ├── opened-issues-backlog.yml │ └── polygon-mainnet-graph.yml ├── .gitignore ├── .mythx.yml ├── .mythx2 ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── LICENSE ├── README.md ├── augur.sh ├── .gitignore ├── README.md ├── babel.config.js ├── docs │ ├── contract-api.md │ ├── getting-started.md │ ├── hardhat-tasks.md │ └── turbo.md ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src │ ├── css │ │ └── custom.css │ └── pages │ │ ├── markdown-page.md │ │ └── styles.module.css ├── static │ ├── .nojekyll │ ├── CNAME │ └── img │ │ ├── augur-logo │ │ ├── Augur-Logo-Guidelines.pdf │ │ ├── Glyph │ │ │ ├── Black.png │ │ │ ├── Black.svg │ │ │ ├── CMYK (for Print only) │ │ │ │ ├── Black.eps │ │ │ │ ├── Color.eps │ │ │ │ ├── Reversed.eps │ │ │ │ └── White.eps │ │ │ ├── Color.png │ │ │ ├── Color.svg │ │ │ ├── Reversed.png │ │ │ ├── Reversed.svg │ │ │ ├── White.png │ │ │ └── White.svg │ │ ├── REPv2 Icon │ │ │ ├── REPv2 Icon - Full Color over Black.png │ │ │ └── REPv2 Icon - Full Color over Black.svg │ │ └── augur-logo-full │ │ │ ├── CMYK (for Print only) │ │ │ ├── Horizontal │ │ │ │ ├── Black.eps │ │ │ │ ├── Color.eps │ │ │ │ ├── Reversed.eps │ │ │ │ └── White.eps │ │ │ └── Vertical │ │ │ │ ├── Black.eps │ │ │ │ ├── Color.eps │ │ │ │ ├── Reversed.eps │ │ │ │ └── White.eps │ │ │ ├── Horizontal │ │ │ ├── Black.png │ │ │ ├── Black.svg │ │ │ ├── Color.png │ │ │ ├── Color.svg │ │ │ ├── Reversed.png │ │ │ ├── Reversed.svg │ │ │ ├── White.png │ │ │ └── White.svg │ │ │ └── Vertical │ │ │ ├── Black.png │ │ │ ├── Black.svg │ │ │ ├── Color.png │ │ │ ├── Color.svg │ │ │ ├── Reversed.png │ │ │ ├── Reversed.svg │ │ │ ├── White.png │ │ │ ├── White.svg │ │ │ └── Whiteblank.svg │ │ ├── docusaurus.png │ │ ├── favicon.ico │ │ ├── logo.svg │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ └── undraw_docusaurus_tree.svg └── yarn.lock ├── lerna.json ├── package.json ├── packages ├── chainlink │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── bin │ │ └── chainlink.ts │ ├── cdk.json │ ├── docker-compose.yml │ ├── docker │ │ ├── credential_generator │ │ │ ├── Dockerfile │ │ │ └── run.sh │ │ └── jobs_creator │ │ │ ├── Dockerfile │ │ │ ├── run.sh │ │ │ └── templates │ │ │ ├── crypto-poke.json │ │ │ ├── mlb-create.json │ │ │ ├── mlb-resolve.json │ │ │ ├── mma-create.json │ │ │ ├── mma-resolve.json │ │ │ ├── nba-create.json │ │ │ ├── nba-resolve.json │ │ │ ├── nfl-create.json │ │ │ └── nfl-resolve.json │ ├── jest.config.js │ ├── lib │ │ ├── chainlink-stack.ts │ │ └── generate-augur-adapter-env.ts │ ├── package.json │ ├── test │ │ └── chainlink.test.ts │ └── tsconfig.json ├── comps │ ├── .gitignore │ ├── README.md │ ├── config │ │ ├── env.js │ │ ├── getHttpsConfig.js │ │ ├── modules.js │ │ ├── paths.js │ │ ├── pnpTs.js │ │ ├── webpack.config.js │ │ └── webpackDevServer.config.js │ ├── package.json │ ├── public │ │ ├── favicon │ │ │ ├── android-icon-144x144.png │ │ │ ├── android-icon-192x192.png │ │ │ ├── android-icon-36x36.png │ │ │ ├── android-icon-48x48.png │ │ │ ├── android-icon-72x72.png │ │ │ ├── android-icon-96x96.png │ │ │ ├── apple-icon-114x114.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-144x144.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-180x180.png │ │ │ ├── apple-icon-57x57.png │ │ │ ├── apple-icon-60x60.png │ │ │ ├── apple-icon-72x72.png │ │ │ ├── apple-icon-76x76.png │ │ │ ├── apple-icon-precomposed.png │ │ │ ├── apple-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── favicon.ico │ │ │ ├── manifest.json │ │ │ ├── ms-icon-144x144.png │ │ │ ├── ms-icon-150x150.png │ │ │ ├── ms-icon-310x310.png │ │ │ └── ms-icon-70x70.png │ │ ├── index.html │ │ └── robots.txt │ ├── scripts │ │ ├── build.js │ │ └── start.js │ ├── src │ │ ├── apollo │ │ │ ├── client.ts │ │ │ └── queries.ts │ │ ├── assets │ │ │ ├── fonts │ │ │ │ ├── Inter-Black.woff │ │ │ │ ├── Inter-Black.woff2 │ │ │ │ ├── Inter-BlackItalic.woff │ │ │ │ ├── Inter-BlackItalic.woff2 │ │ │ │ ├── Inter-Bold.woff │ │ │ │ ├── Inter-Bold.woff2 │ │ │ │ ├── Inter-BoldItalic.woff │ │ │ │ ├── Inter-BoldItalic.woff2 │ │ │ │ ├── Inter-ExtraBold.woff │ │ │ │ ├── Inter-ExtraBold.woff2 │ │ │ │ ├── Inter-ExtraBoldItalic.woff │ │ │ │ ├── Inter-ExtraBoldItalic.woff2 │ │ │ │ ├── Inter-Italic.woff │ │ │ │ ├── Inter-Italic.woff2 │ │ │ │ ├── Inter-Medium.woff │ │ │ │ ├── Inter-Medium.woff2 │ │ │ │ ├── Inter-MediumItalic.woff │ │ │ │ ├── Inter-MediumItalic.woff2 │ │ │ │ ├── Inter-Regular.woff │ │ │ │ ├── Inter-Regular.woff2 │ │ │ │ ├── Inter-SemiBold.woff │ │ │ │ ├── Inter-SemiBold.woff2 │ │ │ │ ├── Inter-SemiBoldItalic.woff │ │ │ │ ├── Inter-SemiBoldItalic.woff2 │ │ │ │ ├── Roboto-Bold.woff2 │ │ │ │ ├── Roboto-Light.woff2 │ │ │ │ ├── Roboto-Medium.woff2 │ │ │ │ ├── Roboto-Mono-Regular.woff2 │ │ │ │ ├── Roboto-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ └── icofont.woff │ │ │ ├── images │ │ │ │ ├── Main_Banner_Sportsbook.png │ │ │ │ ├── top-banner-desktop.png │ │ │ │ └── top-banner-mobile.png │ │ │ └── styles │ │ │ │ ├── _colors.less │ │ │ │ ├── _misc_redesign.less │ │ │ │ ├── _responsive.less │ │ │ │ ├── _typography.less │ │ │ │ └── shared.less │ │ ├── components │ │ │ ├── ConnectAccount │ │ │ │ ├── assets │ │ │ │ │ ├── coinbaseWalletIcon.svg │ │ │ │ │ ├── fortmaticIcon.png │ │ │ │ │ ├── metamask.png │ │ │ │ │ ├── portisIcon.png │ │ │ │ │ ├── walletConnectIcon.svg │ │ │ │ │ └── x.svg │ │ │ │ ├── components │ │ │ │ │ ├── AccountDetails │ │ │ │ │ │ ├── CopyHelper.tsx │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Identicon │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── Loader │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── index.tsx │ │ │ │ ├── connect-account-provider.tsx │ │ │ │ ├── connectors │ │ │ │ │ ├── Fortmatic.ts │ │ │ │ │ ├── NetworkConnector.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── constants │ │ │ │ │ └── index.tsx │ │ │ │ ├── hooks │ │ │ │ │ └── index.tsx │ │ │ │ ├── index.styles.less │ │ │ │ ├── index.tsx │ │ │ │ └── utils │ │ │ │ │ └── index.tsx │ │ │ ├── common │ │ │ │ ├── buttons.styles.less │ │ │ │ ├── buttons.tsx │ │ │ │ ├── category-icons-map.ts │ │ │ │ ├── category-icons.tsx │ │ │ │ ├── get-wallet-icon.styles.less │ │ │ │ ├── get-wallet-icon.tsx │ │ │ │ ├── icons.tsx │ │ │ │ ├── inputs.styles.less │ │ │ │ ├── inputs.tsx │ │ │ │ ├── labels.styles.less │ │ │ │ ├── labels.tsx │ │ │ │ ├── logo.styles.less │ │ │ │ ├── logo.tsx │ │ │ │ ├── pagination.styles.less │ │ │ │ ├── pagination.tsx │ │ │ │ ├── selection.styles.less │ │ │ │ ├── selection.tsx │ │ │ │ ├── seo.tsx │ │ │ │ ├── spinner.styles.less │ │ │ │ ├── spinner.tsx │ │ │ │ ├── toggle-switch.styles.less │ │ │ │ ├── toggle-switch.tsx │ │ │ │ └── tooltip.styles.less │ │ │ ├── market-card │ │ │ │ ├── market-card.styles.less │ │ │ │ └── market-card.tsx │ │ │ ├── modal │ │ │ │ ├── common.tsx │ │ │ │ ├── modal-connect-wallet.tsx │ │ │ │ └── modal.styles.less │ │ │ └── toasts │ │ │ │ ├── toasts.styles.less │ │ │ │ └── toasts.tsx │ │ ├── externals.d.ts │ │ ├── index.tsx │ │ ├── stores │ │ │ ├── app-status-hooks.ts │ │ │ ├── app-status.tsx │ │ │ ├── constants.ts │ │ │ ├── data-hooks.ts │ │ │ ├── data.tsx │ │ │ ├── local-storage.tsx │ │ │ ├── process-data.ts │ │ │ ├── use-approval-callback.ts │ │ │ ├── user-hooks.ts │ │ │ ├── user.tsx │ │ │ └── utils.ts │ │ ├── types.ts │ │ └── utils │ │ │ ├── BPoolABI.json │ │ │ ├── ERC20ABI.json │ │ │ ├── ParaShareTokenABI.json │ │ │ ├── PriceFeedABI.json │ │ │ ├── README.md │ │ │ ├── add-commas-to-number.ts │ │ │ ├── calculations.ts │ │ │ ├── constants.ts │ │ │ ├── contract-calls.ts │ │ │ ├── create-big-number.ts │ │ │ ├── date-utils.ts │ │ │ ├── derived-crypto-markets.ts │ │ │ ├── derived-grouped-data.ts │ │ │ ├── derived-market-data.ts │ │ │ ├── derived-mma-dailies.ts │ │ │ ├── derived-nfl-dailies.ts │ │ │ ├── derived-simple-sport-dailies.ts │ │ │ ├── fetcher-crypto.ts │ │ │ ├── fetcher-grouped.ts │ │ │ ├── fetcher-sport.ts │ │ │ ├── fighters.json │ │ │ ├── format-number.ts │ │ │ ├── format-odds.ts │ │ │ ├── get-default-price.ts │ │ │ ├── get-number-precision.ts │ │ │ ├── links │ │ │ ├── links.tsx │ │ │ ├── make-path.ts │ │ │ ├── make-query.ts │ │ │ ├── parse-path.ts │ │ │ ├── parse-query.ts │ │ │ └── parse-string-to-array.ts │ │ │ ├── log-error.ts │ │ │ ├── sports.json │ │ │ ├── team-helpers.ts │ │ │ ├── teams.json │ │ │ └── window-ref.ts │ └── tsconfig.json ├── ethereum-multicall │ ├── .gitignore │ ├── .prettierrc │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── ABI │ │ │ └── multicall-abi.json │ │ ├── enums │ │ │ ├── execution-type.ts │ │ │ ├── index.ts │ │ │ └── networks.ts │ │ ├── index.ts │ │ ├── models │ │ │ ├── abi-input.ts │ │ │ ├── abi-item.ts │ │ │ ├── abi-output.ts │ │ │ ├── aggregate-call-context.ts │ │ │ ├── aggregate-contract-response.ts │ │ │ ├── aggregate-response.ts │ │ │ ├── call-context.ts │ │ │ ├── call-return-context.ts │ │ │ ├── contract-call-context.ts │ │ │ ├── contract-call-results.ts │ │ │ ├── contract-call-return-context.ts │ │ │ ├── index.ts │ │ │ └── multicall-options.ts │ │ ├── multicall.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── tslint.json ├── simplified │ ├── .gitignore │ ├── README.md │ ├── config │ │ ├── env.js │ │ ├── getHttpsConfig.js │ │ ├── modules.js │ │ ├── paths.js │ │ ├── pnpTs.js │ │ ├── webpack.config.js │ │ └── webpackDevServer.config.js │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ ├── favicon │ │ │ ├── android-icon-144x144.png │ │ │ ├── android-icon-192x192.png │ │ │ ├── android-icon-36x36.png │ │ │ ├── android-icon-48x48.png │ │ │ ├── android-icon-72x72.png │ │ │ ├── android-icon-96x96.png │ │ │ ├── apple-icon-114x114.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-144x144.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-180x180.png │ │ │ ├── apple-icon-57x57.png │ │ │ ├── apple-icon-60x60.png │ │ │ ├── apple-icon-72x72.png │ │ │ ├── apple-icon-76x76.png │ │ │ ├── apple-icon-precomposed.png │ │ │ ├── apple-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── favicon.ico │ │ │ ├── manifest.json │ │ │ ├── ms-icon-144x144.png │ │ │ ├── ms-icon-150x150.png │ │ │ ├── ms-icon-310x310.png │ │ │ └── ms-icon-70x70.png │ │ ├── index.html │ │ └── robots.txt │ ├── scripts │ │ ├── build.js │ │ └── start.js │ ├── src │ │ ├── assets │ │ │ ├── fonts │ │ │ │ ├── Inter-Black.woff │ │ │ │ ├── Inter-Black.woff2 │ │ │ │ ├── Inter-BlackItalic.woff │ │ │ │ ├── Inter-BlackItalic.woff2 │ │ │ │ ├── Inter-Bold.woff │ │ │ │ ├── Inter-Bold.woff2 │ │ │ │ ├── Inter-BoldItalic.woff │ │ │ │ ├── Inter-BoldItalic.woff2 │ │ │ │ ├── Inter-ExtraBold.woff │ │ │ │ ├── Inter-ExtraBold.woff2 │ │ │ │ ├── Inter-ExtraBoldItalic.woff │ │ │ │ ├── Inter-ExtraBoldItalic.woff2 │ │ │ │ ├── Inter-Italic.woff │ │ │ │ ├── Inter-Italic.woff2 │ │ │ │ ├── Inter-Medium.woff │ │ │ │ ├── Inter-Medium.woff2 │ │ │ │ ├── Inter-MediumItalic.woff │ │ │ │ ├── Inter-MediumItalic.woff2 │ │ │ │ ├── Inter-Regular.woff │ │ │ │ ├── Inter-Regular.woff2 │ │ │ │ ├── Inter-SemiBold.woff │ │ │ │ ├── Inter-SemiBold.woff2 │ │ │ │ ├── Inter-SemiBoldItalic.woff │ │ │ │ ├── Inter-SemiBoldItalic.woff2 │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ └── icofont.woff │ │ │ ├── images │ │ │ │ ├── top-banner-desktop.png │ │ │ │ └── top-banner-mobile.png │ │ │ └── styles │ │ │ │ ├── _colors.less │ │ │ │ ├── _misc_redesign.less │ │ │ │ ├── _responsive.less │ │ │ │ ├── _typography.less │ │ │ │ └── shared.less │ │ ├── index.tsx │ │ ├── modules │ │ │ ├── App.styles.less │ │ │ ├── App.tsx │ │ │ ├── ConnectAccount │ │ │ │ └── assets │ │ │ │ │ ├── coinbaseWalletIcon.svg │ │ │ │ │ ├── fortmaticIcon.png │ │ │ │ │ ├── metamask.png │ │ │ │ │ ├── portisIcon.png │ │ │ │ │ ├── walletConnectIcon.svg │ │ │ │ │ └── x.svg │ │ │ ├── common │ │ │ │ ├── buttons.styles.less │ │ │ │ ├── charts.styles.less │ │ │ │ ├── charts.tsx │ │ │ │ ├── chevron-flip.styles.less │ │ │ │ ├── chevron-flip.tsx │ │ │ │ ├── labels.styles.less │ │ │ │ ├── labels.tsx │ │ │ │ ├── simple-footer.styles.less │ │ │ │ ├── simple-footer.tsx │ │ │ │ ├── slippage.styles.less │ │ │ │ ├── slippage.tsx │ │ │ │ ├── tables.styles.less │ │ │ │ ├── tables.tsx │ │ │ │ ├── top-banner.styles.less │ │ │ │ ├── top-banner.tsx │ │ │ │ ├── top-nav.styles.less │ │ │ │ └── top-nav.tsx │ │ │ ├── constants.ts │ │ │ ├── liquidity │ │ │ │ ├── liquidity-view.styles.less │ │ │ │ ├── liquidity-view.tsx │ │ │ │ ├── market-liquidity-view.styles.less │ │ │ │ └── market-liquidity-view.tsx │ │ │ ├── market │ │ │ │ ├── market-view.styles.less │ │ │ │ ├── market-view.tsx │ │ │ │ ├── trading-form.styles.less │ │ │ │ └── trading-form.tsx │ │ │ ├── markets │ │ │ │ ├── markets-view.styles.less │ │ │ │ └── markets-view.tsx │ │ │ ├── modal │ │ │ │ ├── common.tsx │ │ │ │ ├── modal-confirm-transaction.tsx │ │ │ │ ├── modal-view.tsx │ │ │ │ └── modal.styles.less │ │ │ ├── portfolio │ │ │ │ ├── activity.styles.less │ │ │ │ ├── activity.tsx │ │ │ │ ├── portfolio-view.styles.less │ │ │ │ └── portfolio-view.tsx │ │ │ ├── routes │ │ │ │ ├── authenticated-route.tsx │ │ │ │ └── routes.tsx │ │ │ ├── seo-config.ts │ │ │ ├── sidebar │ │ │ │ ├── sidebar.styles.less │ │ │ │ └── sidebar.tsx │ │ │ └── stores │ │ │ │ ├── constants.ts │ │ │ │ ├── simplified-hooks.ts │ │ │ │ └── simplified.tsx │ │ └── utils │ │ │ └── get-usdc.ts │ └── tsconfig.json ├── smart │ ├── .gitignore │ ├── LICENSE │ ├── addresses.ts │ ├── constants.ts │ ├── contracts │ │ ├── balancer │ │ │ ├── BColor.sol │ │ │ ├── BConst.sol │ │ │ ├── BFactory.sol │ │ │ ├── BMath.sol │ │ │ ├── BNum.sol │ │ │ ├── BPool.sol │ │ │ ├── BPoolForTesting.sol │ │ │ ├── BToken.sol │ │ │ └── Migrations.sol │ │ ├── chainlink │ │ │ └── TheRundownChainlink.sol │ │ ├── libraries │ │ │ ├── CalculateLinesToBPoolOdds.sol │ │ │ ├── Cash.sol │ │ │ ├── EvenTheOdds.sol │ │ │ ├── FakePriceFeed.sol │ │ │ ├── HasHeadToHeadMarket.sol │ │ │ ├── HasOverUnderMarket.sol │ │ │ ├── HasSpreadMarket.sol │ │ │ ├── IERC20Full.sol │ │ │ ├── IOwnable.sol │ │ │ ├── ITyped.sol │ │ │ ├── Initializable.sol │ │ │ ├── LineHelper.sol │ │ │ ├── ManagedByLink.sol │ │ │ ├── Ownable.sol │ │ │ ├── PlaceholderReputationToken.sol │ │ │ ├── ResolveByFiat.sol │ │ │ ├── ResolveByScore.sol │ │ │ ├── Rewardable.sol │ │ │ ├── SafeMathInt256.sol │ │ │ ├── SafeMathUint256.sol │ │ │ ├── Sport.sol │ │ │ ├── TokenNamesFromTeams.sol │ │ │ └── Versioned.sol │ │ ├── rewards │ │ │ └── MasterChef.sol │ │ └── turbo │ │ │ ├── AMMFactory.sol │ │ │ ├── AbstractMarketFactoryV1.sol │ │ │ ├── AbstractMarketFactoryV2.sol │ │ │ ├── AbstractMarketFactoryV3.sol │ │ │ ├── CryptoCurrencyMarketFactoryV3.sol │ │ │ ├── CryptoMarketFactoryV2.sol │ │ │ ├── CryptoMarketFactoryV3.sol │ │ │ ├── FeePot.sol │ │ │ ├── Fetcher.sol │ │ │ ├── GroupFetcher.sol │ │ │ ├── Grouped.sol │ │ │ ├── GroupedMarketFactoryV3.sol │ │ │ ├── MLBMarketFactoryV3.sol │ │ │ ├── MMALinkMarketFactoryV2.sol │ │ │ ├── MMAMarketFactoryV3.sol │ │ │ ├── NBAMarketFactoryV3.sol │ │ │ ├── NCAAFBMarketFactoryV3.sol │ │ │ ├── NFLMarketFactoryV2.sol │ │ │ ├── NFLMarketFactoryV3.sol │ │ │ ├── OwnedShareToken.sol │ │ │ ├── SportsLinkMarketFactoryV1.sol │ │ │ ├── SportsLinkMarketFactoryV2.sol │ │ │ ├── TrustedMarketFactoryV2.sol │ │ │ ├── TrustedMarketFactoryV3.sol │ │ │ └── TurboShareTokenFactory.sol │ ├── deploy │ │ ├── 000_externals_for_testing │ │ │ ├── 000_deploy_collateral_token.ts │ │ │ ├── 001_deploy_reputation_token.ts │ │ │ ├── 002_deploy_balancer_factory.ts │ │ │ ├── 003_deploy_fake_price_feeds.ts │ │ │ ├── 004_set_fake_price_feeds.ts │ │ │ └── 005_deploy_rewards_tokens.ts │ │ ├── 001_market_factories │ │ │ ├── 000_deploy_fee_pot.ts │ │ │ ├── 010_deploy_NBA_market_factory.ts │ │ │ ├── 011_deploy_MLB_market_factory.ts │ │ │ ├── 012_deploy_MMA_market_factory.ts │ │ │ ├── 013_deploy_NFL_market_factory.ts │ │ │ ├── 014_deploy_crypto_prices_market_factory.ts │ │ │ ├── 015_deploy_grouped_market_factory.ts │ │ │ ├── 100_deploy_sports_fetcher.ts │ │ │ ├── 101_deploy_crypto_fetcher.ts │ │ │ ├── 102_deploy_grouped_fetcher.ts │ │ │ └── 200_configure_crypto_prices_market_factory.ts │ │ ├── 002_trading │ │ │ ├── 000_deploy_master_chef.ts │ │ │ ├── 001_deploy_amm_factory.ts │ │ │ ├── 002_evenTheOdds.ts │ │ │ ├── 100_trust_amm_factory.ts │ │ │ ├── 101_fund_master_chef.ts │ │ │ └── 102_approve_market_factories.ts │ │ └── 900_update_addresses.ts │ ├── deployments │ │ ├── .gitignore │ │ ├── kovan │ │ │ ├── .chainId │ │ │ ├── AMMFactory.json │ │ │ ├── BFactory.json │ │ │ ├── Collateral.json │ │ │ ├── CryptoMarketFactory.json │ │ │ ├── FeePot.json │ │ │ ├── MMALinkMarketFactory.json │ │ │ ├── PriceFeedBTC.json │ │ │ ├── PriceFeedDOT.json │ │ │ ├── PriceFeedETH.json │ │ │ ├── PriceFeedMATIC.json │ │ │ ├── Reputation.json │ │ │ ├── SportsLinkMarketFactory.json │ │ │ ├── TrustedMarketFactory.json │ │ │ └── solcInputs │ │ │ │ ├── 078b100ed31a6ce942c6406bbe592528.json │ │ │ │ ├── 0f2d47885fbc7c20d1e238bd9c77bc15.json │ │ │ │ ├── 1e9414926a680b5ea54cd8c73b0f06ae.json │ │ │ │ ├── 30973c221976e9bebf329c4b306e8801.json │ │ │ │ ├── 506c5e5922b7145b7e8450413e035ea0.json │ │ │ │ ├── 5e6b8ca43e392a77eb63764ba763fb43.json │ │ │ │ ├── 6b70f85ddd7f2c710186839f7a047dbd.json │ │ │ │ ├── 8ce53a48b8c82741d9ff2d120c452cd9.json │ │ │ │ ├── 9249c4e3e57f01503c1a33a02159f0bd.json │ │ │ │ ├── 9c26d0db042f253dfc1ecc6c3f3e0c96.json │ │ │ │ ├── b3d07bfe64bbd838f4924e83ecbc4e2d.json │ │ │ │ ├── e28e43f57f23c232814307fcb683b40e.json │ │ │ │ └── e7c51723eb49262f9925317c04de4f27.json │ │ ├── maticMainnet │ │ │ ├── .chainId │ │ │ ├── AMMFactory.json │ │ │ ├── BFactory.json │ │ │ ├── Collateral.json │ │ │ ├── CryptoFetcher.json │ │ │ ├── CryptoMarketFactory.json │ │ │ ├── CryptoMarketFactoryV3.json │ │ │ ├── FeePot.json │ │ │ ├── FuturesFetcher.json │ │ │ ├── FuturesMarketFactory.json │ │ │ ├── MLBMarketFactoryV3.json │ │ │ ├── MMAFetcher.json │ │ │ ├── MMALinkMarketFactory.json │ │ │ ├── MMAMarketFactory.json │ │ │ ├── MMAMarketFactoryV3.json │ │ │ ├── MasterChef.json │ │ │ ├── NBAFetcher.json │ │ │ ├── NBAMarketFactoryV3.json │ │ │ ├── NFLMarketFactory.json │ │ │ ├── NFLMarketFactoryV3.json │ │ │ ├── PriceFeedBTC.json │ │ │ ├── PriceFeedDOGE.json │ │ │ ├── PriceFeedETH.json │ │ │ ├── PriceFeedLINK.json │ │ │ ├── PriceFeedMATIC.json │ │ │ ├── PriceFeedREP.json │ │ │ ├── Reputation.json │ │ │ ├── SportsLinkMarketFactory.json │ │ │ ├── SportsLinkMarketFactoryV2.json │ │ │ ├── WrappedMatic.json │ │ │ └── solcInputs │ │ │ │ ├── 06d9d26640e698b2fc67127fbc799ec8.json │ │ │ │ ├── 109a45c324f932d68075a796e3bac957.json │ │ │ │ ├── 24e507bd9a2a8257d5adc7c27db43d5a.json │ │ │ │ ├── 415294e8bb1eb46a5fa3e04f8ba971c6.json │ │ │ │ ├── 93373335a589235921a8a7b10ff7af59.json │ │ │ │ ├── 9c8f26027a500f2fa50271a9444fdd28.json │ │ │ │ ├── c9c01f7bdc64a28c4f93311a5ef7cbeb.json │ │ │ │ ├── ce02fffb176805d973d21cf431fda6d3.json │ │ │ │ ├── e5e50773b199e1ecbfe64699d10ad37f.json │ │ │ │ ├── f49cb27a798ab781a7f4a911c950e5fd.json │ │ │ │ └── fe0c7a1d166f7d1332be4ed6d8f9700d.json │ │ └── maticMumbai │ │ │ ├── .chainId │ │ │ ├── AMMFactory.json │ │ │ ├── BFactory.json │ │ │ ├── BTCPriceFeed.json │ │ │ ├── Collateral.json │ │ │ ├── CryptoCurrencyFetcher.json │ │ │ ├── CryptoCurrencyMarketFactoryV3.json │ │ │ ├── CryptoFetcher.json │ │ │ ├── CryptoMarketFactory.json │ │ │ ├── CryptoMarketFactoryV3.json │ │ │ ├── ETHPriceFeed.json │ │ │ ├── EvenTheOdds.json │ │ │ ├── FeePot.json │ │ │ ├── FuturesMarketFactoryV3.json │ │ │ ├── GroupedFetcher.json │ │ │ ├── GroupedMarketFactoryV3.json │ │ │ ├── MLBMarketFactory.json │ │ │ ├── MLBMarketFactoryV3.json │ │ │ ├── MMAFetcher.json │ │ │ ├── MMALinkMarketFactory.json │ │ │ ├── MMAMarketFactory.json │ │ │ ├── MMAMarketFactoryV3.json │ │ │ ├── MasterChef.json │ │ │ ├── NBAFetcher.json │ │ │ ├── NBAMarketFactory.json │ │ │ ├── NBAMarketFactoryV3.json │ │ │ ├── NFLMarketFactory.json │ │ │ ├── NFLMarketFactoryV3.json │ │ │ ├── PriceFeedBTC.json │ │ │ ├── PriceFeedDOGE.json │ │ │ ├── PriceFeedDOT.json │ │ │ ├── PriceFeedETH.json │ │ │ ├── PriceFeedLINK.json │ │ │ ├── PriceFeedMATIC.json │ │ │ ├── PriceFeedREP.json │ │ │ ├── Reputation.json │ │ │ ├── SportsLinkMarketFactory.json │ │ │ ├── SportsLinkProxy.json │ │ │ ├── TrustedMarketFactory.json │ │ │ ├── WrappedMatic.json │ │ │ └── solcInputs │ │ │ ├── 006f575476da3471c94a7c7c93c787c0.json │ │ │ ├── 0478286fec42dca3d6fdace180e9627c.json │ │ │ ├── 06d9d26640e698b2fc67127fbc799ec8.json │ │ │ ├── 084ad09e5c206107f0c0855d4fd4ab3c.json │ │ │ ├── 24e507bd9a2a8257d5adc7c27db43d5a.json │ │ │ ├── 2c1f8a209675c1c1dc1da66d48866fed.json │ │ │ ├── 2c67f3f1e93719f78922c57f5fad5873.json │ │ │ ├── 2ff82844992f5ea9f0fe1fe5b1d2cdae.json │ │ │ ├── 3054c4841cf2b595157e7caa37abe574.json │ │ │ ├── 30973c221976e9bebf329c4b306e8801.json │ │ │ ├── 36e4bfcaf188b86af541a666e6589b6d.json │ │ │ ├── 3e2f131b067f2856ff324ce6191cfb50.json │ │ │ ├── 3ebaa64882e19efa450e9f7cee4526fd.json │ │ │ ├── 48268cd8119e2a555c1da8a0d35f6df4.json │ │ │ ├── 4d3c6fda7ec268d56874631fe9efafc6.json │ │ │ ├── 506c5e5922b7145b7e8450413e035ea0.json │ │ │ ├── 5770cb63fc5f4c8717cdfdccae2964c1.json │ │ │ ├── 580fbfa9f024605e7197185fc432efcd.json │ │ │ ├── 58e2a2f6c142bd6a28e68f5a402abd8a.json │ │ │ ├── 59077a64a4ee5f002a04aee4f8047ab3.json │ │ │ ├── 6476af0d6b88c8ae36c801e5024643bb.json │ │ │ ├── 65facf7df91830fb15625c60c232b870.json │ │ │ ├── 677f320270590ccb1669d6bb63a444a4.json │ │ │ ├── 67dc043c647eb1d8841d1189598d111b.json │ │ │ ├── 6b6e849bf84595bbf91d58ba6030be3c.json │ │ │ ├── 6e2ccbb67391db502e92b4804fd4583a.json │ │ │ ├── 77c34d1d047cb4ddd2967107ed20b5a3.json │ │ │ ├── 77ea49d48915f6263fa1c321d327074a.json │ │ │ ├── 797ac8b88c2794616647146f9451aaed.json │ │ │ ├── 79803c963e3b660023eb629f77c4516b.json │ │ │ ├── 7d13fb875e194787da3321b42b922cbc.json │ │ │ ├── 804148360418ab098f907d8c907046b0.json │ │ │ ├── 8300c5e3118901fdc5a46905f80222b0.json │ │ │ ├── 8480ac559c66b43087ee563f854b5f36.json │ │ │ ├── 85568c81796aec655898a588623021d1.json │ │ │ ├── 86aabb0e982e5884763703950ac0d3e8.json │ │ │ ├── 8a40dc092a8d7171d206c9a472ee82dc.json │ │ │ ├── 8bfc5ee5be07ba17153f6c76b6703c8d.json │ │ │ ├── 8e0b6151b2970744cf442f619066b9bd.json │ │ │ ├── 932d27afdf1322cefd322e0317b48308.json │ │ │ ├── 93373335a589235921a8a7b10ff7af59.json │ │ │ ├── 9c8f26027a500f2fa50271a9444fdd28.json │ │ │ ├── 9f64d0dcfb1c3a07f43bad99a93b91fe.json │ │ │ ├── a0c5ca376341591991adeadc7c8774f2.json │ │ │ ├── a391f81d0b95c18ce6837fef7e6f6a69.json │ │ │ ├── ac24ac42c513b843322e4f424ddf85b0.json │ │ │ ├── ac726f89b48f0c2d7aaf58a9b46eaacc.json │ │ │ ├── aca05386cf7c6364525ad9f99dc56a7b.json │ │ │ ├── afc86f710f181b79465ca02e256363b0.json │ │ │ ├── b2822e255b1d2b1017c4ef2558e44c9f.json │ │ │ ├── b4f89e617c1341d5af3063ee83a3c3ad.json │ │ │ ├── c48192189f5641f0026de55e4887a883.json │ │ │ ├── d9477672988354112fa6326aacbcaa0c.json │ │ │ ├── e663e1683a1f1a8aa4b815e8195b80d4.json │ │ │ ├── ee162bf80ec690736448f1c999e5d736.json │ │ │ ├── ef4569a9e26c885e36540c83ded2885d.json │ │ │ ├── efbd557127e355e66617652553e210c8.json │ │ │ ├── efe24c9fabc1d3f5df30484a07e36b33.json │ │ │ ├── f49cb27a798ab781a7f4a911c950e5fd.json │ │ │ ├── f4b3e867bac9f4f0c7651643ef445676.json │ │ │ ├── f7005602efd9d5e9ff301a2402b6ea2e.json │ │ │ ├── fad37d9e94d3b1cd417579f3f834b859.json │ │ │ ├── fe5bd1fd20be8e7da01ec05c39d892a6.json │ │ │ ├── feec5c70c969b7a8f066f4131d06d182.json │ │ │ └── ffd60ef8be6dfeeb77d4310478f7371c.json │ ├── environments │ │ ├── matic.json │ │ └── mumbai.json │ ├── hardhat.config.ts │ ├── hardhat.typechain.config.ts │ ├── index.ts │ ├── package.json │ ├── src │ │ ├── EthersFastSubmitWallet.ts │ │ ├── addressesConfigUpdater.ts │ │ ├── bmath.ts │ │ ├── calcShareFactor.ts │ │ ├── fetcher │ │ │ ├── common.ts │ │ │ ├── crypto.ts │ │ │ ├── cryptoCurrency.ts │ │ │ ├── group.ts │ │ │ ├── index.ts │ │ │ └── sport.ts │ │ ├── index.ts │ │ └── utils │ │ │ ├── common-functions.ts │ │ │ ├── constants.ts │ │ │ ├── crypto-timing.ts │ │ │ ├── deploy.ts │ │ │ ├── environments.ts │ │ │ ├── price-feed.ts │ │ │ ├── round-management.ts │ │ │ └── tasks.ts │ ├── tasks │ │ ├── accounts.ts │ │ ├── approveERC20.ts │ │ ├── balance.ts │ │ ├── cannedMarkets.ts │ │ ├── createPool.ts │ │ ├── createSportsLinkMarket.ts │ │ ├── deploy.ts │ │ ├── faucetCash.ts │ │ ├── fundLink.ts │ │ ├── getMarket.ts │ │ ├── getOwner.ts │ │ ├── getTeams.ts │ │ ├── index.ts │ │ ├── markets.ts │ │ ├── multicalls.ts │ │ ├── pokeLink.ts │ │ ├── rundown.ts │ │ ├── setOwner.ts │ │ ├── setSportsLinkNode.ts │ │ ├── setSportsLinkResolution.ts │ │ ├── setTrustedResolution.ts │ │ ├── tenderlyVerify.ts │ │ ├── transferERC20.ts │ │ └── whoami.ts │ ├── test │ │ ├── amm-factory-add-liquidity.test.ts │ │ ├── amm-factory-test.ts │ │ ├── bpool-test.ts │ │ ├── crypto-currency-factory-test.ts │ │ ├── even-the-odds.test.ts │ │ ├── fetching.ts │ │ ├── grouped-markets-test.ts │ │ ├── link-factory-test.ts │ │ ├── math.test.ts │ │ ├── mma-factory-test.ts │ │ ├── nfl.test.ts │ │ ├── rewards.test.ts │ │ └── turbo-test.ts │ ├── tsconfig.json │ └── tsconfig.release.json ├── sport │ ├── .gitignore │ ├── README.md │ ├── config │ │ ├── env.js │ │ ├── getHttpsConfig.js │ │ ├── modules.js │ │ ├── paths.js │ │ ├── pnpTs.js │ │ ├── webpack.config.js │ │ └── webpackDevServer.config.js │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ ├── favicon │ │ │ ├── android-icon-144x144.png │ │ │ ├── android-icon-192x192.png │ │ │ ├── android-icon-36x36.png │ │ │ ├── android-icon-48x48.png │ │ │ ├── android-icon-72x72.png │ │ │ ├── android-icon-96x96.png │ │ │ ├── apple-icon-114x114.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-144x144.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-180x180.png │ │ │ ├── apple-icon-57x57.png │ │ │ ├── apple-icon-60x60.png │ │ │ ├── apple-icon-72x72.png │ │ │ ├── apple-icon-76x76.png │ │ │ ├── apple-icon-precomposed.png │ │ │ ├── apple-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── favicon.ico │ │ │ ├── manifest.json │ │ │ ├── ms-icon-144x144.png │ │ │ ├── ms-icon-150x150.png │ │ │ ├── ms-icon-310x310.png │ │ │ └── ms-icon-70x70.png │ │ ├── index.html │ │ └── robots.txt │ ├── scripts │ │ ├── build.js │ │ └── start.js │ ├── src │ │ ├── assets │ │ │ ├── fonts │ │ │ │ ├── Inter-Black.woff │ │ │ │ ├── Inter-Black.woff2 │ │ │ │ ├── Inter-BlackItalic.woff │ │ │ │ ├── Inter-BlackItalic.woff2 │ │ │ │ ├── Inter-Bold.woff │ │ │ │ ├── Inter-Bold.woff2 │ │ │ │ ├── Inter-BoldItalic.woff │ │ │ │ ├── Inter-BoldItalic.woff2 │ │ │ │ ├── Inter-ExtraBold.woff │ │ │ │ ├── Inter-ExtraBold.woff2 │ │ │ │ ├── Inter-ExtraBoldItalic.woff │ │ │ │ ├── Inter-ExtraBoldItalic.woff2 │ │ │ │ ├── Inter-Italic.woff │ │ │ │ ├── Inter-Italic.woff2 │ │ │ │ ├── Inter-Medium.woff │ │ │ │ ├── Inter-Medium.woff2 │ │ │ │ ├── Inter-MediumItalic.woff │ │ │ │ ├── Inter-MediumItalic.woff2 │ │ │ │ ├── Inter-Regular.woff │ │ │ │ ├── Inter-Regular.woff2 │ │ │ │ ├── Inter-SemiBold.woff │ │ │ │ ├── Inter-SemiBold.woff2 │ │ │ │ ├── Inter-SemiBoldItalic.woff │ │ │ │ ├── Inter-SemiBoldItalic.woff2 │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ └── icofont.woff │ │ │ ├── images │ │ │ │ ├── Main_Banner_Sportsbook.png │ │ │ │ ├── NFL_Banner.png │ │ │ │ ├── top-banner-desktop.png │ │ │ │ └── top-banner-mobile.png │ │ │ └── styles │ │ │ │ ├── _colors.less │ │ │ │ ├── _misc_redesign.less │ │ │ │ ├── _responsive.less │ │ │ │ ├── _typography.less │ │ │ │ └── shared.less │ │ ├── index.tsx │ │ └── modules │ │ │ ├── App.styles.less │ │ │ ├── App.tsx │ │ │ ├── betslip │ │ │ ├── betslip.styles.less │ │ │ └── betslip.tsx │ │ │ ├── categories │ │ │ ├── categories.styles.less │ │ │ └── categories.tsx │ │ │ ├── charts │ │ │ ├── charts.styles.less │ │ │ └── charts.tsx │ │ │ ├── common │ │ │ ├── buy-approvals.styles.less │ │ │ ├── buy-approvals.tsx │ │ │ ├── sports-footer.styles.less │ │ │ ├── sports-footer.tsx │ │ │ ├── tables.styles.less │ │ │ ├── tables.tsx │ │ │ ├── top-banner.styles.less │ │ │ ├── top-banner.tsx │ │ │ ├── top-nav.styles.less │ │ │ └── top-nav.tsx │ │ │ ├── constants.ts │ │ │ ├── market │ │ │ ├── market-view.styles.less │ │ │ └── market-view.tsx │ │ │ ├── markets │ │ │ ├── markets-view.styles.less │ │ │ └── markets-view.tsx │ │ │ ├── modal │ │ │ ├── common.tsx │ │ │ ├── modal-rules.tsx │ │ │ ├── modal-view.tsx │ │ │ └── modal.styles.less │ │ │ ├── portfolio │ │ │ ├── activity.styles.less │ │ │ ├── activity.tsx │ │ │ ├── portfolio-view.styles.less │ │ │ └── portfolio-view.tsx │ │ │ ├── routes │ │ │ ├── authenticated-route.tsx │ │ │ └── routes.tsx │ │ │ ├── seo-config.ts │ │ │ ├── sports-card │ │ │ ├── sports-card.styles.less │ │ │ └── sports-card.tsx │ │ │ ├── stores │ │ │ ├── betslip-hooks.ts │ │ │ ├── betslip.tsx │ │ │ ├── constants.ts │ │ │ ├── sport-hooks.ts │ │ │ └── sport.tsx │ │ │ └── utils │ │ │ └── index.ts │ └── tsconfig.json └── subgraph │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── schema.graphql │ ├── src │ ├── helpers │ │ ├── AbstractMarketFactoryHelper.ts │ │ ├── AmmFactoryHelper.ts │ │ ├── CommonHandlers.ts │ │ ├── CommonHelper.ts │ │ └── MarketFactoryHelper.ts │ ├── mappings │ │ ├── AmmFactory.ts │ │ ├── CryptoMarketFactoryV2.ts │ │ ├── CryptoMarketFactoryV3.ts │ │ ├── MasterChef.ts │ │ ├── MlbMarketFactoryV3.ts │ │ ├── MmaMarketFactoryV2.ts │ │ ├── MmaMarketFactoryV3.ts │ │ ├── NbaMarketFactoryV3.ts │ │ ├── NflMarketFactoryV2.ts │ │ ├── NflMarketFactoryV3.ts │ │ └── SportsLinkMarketFactoryV2.ts │ ├── types.ts │ └── utils.ts │ ├── subgraph.template.yaml │ ├── subgraph.yaml │ └── tsconfig.json ├── scripts └── pin-release-on-ipfs.sh ├── specs ├── crypto-spec.md ├── nfl-ncaa.md └── ufc-spec.md ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | # don't ever lint node_modules 2 | node_modules 3 | # don't lint build output 4 | artifacts 5 | cache 6 | dist 7 | typechain 8 | build 9 | # don't lint nyc coverage output 10 | coverage 11 | #ignore actions 12 | .github 13 | #ignore generated type files 14 | *.d.ts 15 | # ignore docs 16 | augur.sh 17 | #ignore subgraph 18 | packages/turbo-kovan-subgraph 19 | packages/subgraph 20 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: "@typescript-eslint/parser", 4 | parserOptions: { 5 | project: ["./tsconfig.json", "./packages/**/tsconfig.json"], 6 | }, 7 | plugins: ["@typescript-eslint", "promise"], 8 | extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], 9 | env: { 10 | node: true, 11 | }, 12 | rules: { 13 | "@typescript-eslint/ban-ts-comment": "warn", 14 | "@typescript-eslint/no-floating-promises": "error", 15 | "promise/catch-or-return": "warn", 16 | "@typescript-eslint/no-misused-promises": "warn", 17 | "@typescript-eslint/no-explicit-any": "off", 18 | }, 19 | ignorePatterns: [".eslintrc.js"], 20 | }; 21 | -------------------------------------------------------------------------------- /.github/workflows/opened-issues-backlog.yml: -------------------------------------------------------------------------------- 1 | name: Move new issues into Triage column 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | automate-project-columns: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: alex-page/github-project-automation-plus@v0.5.1 12 | with: 13 | project: Product 14 | column: Triage 15 | repo-token: ${{ secrets.PUBLIC_REPO_ACCESS }} 16 | -------------------------------------------------------------------------------- /.mythx.yml: -------------------------------------------------------------------------------- 1 | analyze: 2 | mode: deep 3 | async: true 4 | create-group: true 5 | solc: 0.7.6 6 | remappings: 7 | - "@openzeppelin=node_modules/@openzeppelin" 8 | - "@chainlink=node_modules/@chainlink" 9 | targets: 10 | - packages/smart/contracts/turbo/FeePot.sol:FeePot 11 | - packages/smart/contracts/turbo/SportsLinkProxy.sol:SportsLinkProxy 12 | -------------------------------------------------------------------------------- /.mythx2: -------------------------------------------------------------------------------- 1 | TestPriceMarketFactoryanalyze: 2 | mode: deep 3 | async: true 4 | create-group: true 5 | solc: 0.7.6 6 | remappings: 7 | - "@openzeppelin=node_modules/@openzeppelin" 8 | - "@chainlink=node_modules/@chainlink" 9 | targets: 10 | - packages/smart/contracts/turbo/FeePot.sol:FeePot 11 | - packages/smart/contracts/turbo/SportsLinkMarketFactory.sol:SportsLinkMarketFactory 12 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | ./.eslintignore -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Forecast Foundation OU 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /augur.sh/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /augur.sh/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. 4 | 5 | ## Installation 6 | 7 | ```console 8 | yarn install 9 | ``` 10 | 11 | ## Local Development 12 | 13 | ```console 14 | yarn start 15 | ``` 16 | 17 | This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ## Build 20 | 21 | ```console 22 | yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ## Deployment 28 | 29 | ```console 30 | GIT_USER= USE_SSH=true yarn deploy 31 | ``` 32 | 33 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 34 | -------------------------------------------------------------------------------- /augur.sh/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /augur.sh/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-website", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids" 15 | }, 16 | "dependencies": { 17 | "@docusaurus/core": "2.0.0-alpha.72", 18 | "@docusaurus/preset-classic": "2.0.0-alpha.72", 19 | "@mdx-js/react": "^1.6.21", 20 | "clsx": "^1.1.1", 21 | "react": "^17.0.1", 22 | "react-dom": "^17.0.1" 23 | }, 24 | "browserslist": { 25 | "production": [ 26 | ">0.5%", 27 | "not dead", 28 | "not op_mini all" 29 | ], 30 | "development": [ 31 | "last 1 chrome version", 32 | "last 1 firefox version", 33 | "last 1 safari version" 34 | ] 35 | } 36 | } -------------------------------------------------------------------------------- /augur.sh/sidebars.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | docs: [ 3 | { 4 | type: 'category', 5 | label: 'Augur Turbo Guides', 6 | items: [ 7 | 'getting-started', 8 | 'hardhat-tasks', 9 | ], 10 | }, 11 | { 12 | type: 'category', 13 | label: 'API Documentation', 14 | items: [ 15 | 'turbo', 16 | 'contract-api' 17 | ], 18 | }, 19 | ], 20 | }; 21 | -------------------------------------------------------------------------------- /augur.sh/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | /** 3 | * Any CSS included here will be global. The classic template 4 | * bundles Infima by default. Infima is a CSS framework designed to 5 | * work well for content-centric websites. 6 | */ 7 | 8 | /* You can override the default Infima variables here. */ 9 | :root { 10 | --ifm-color-primary: #25c2a0; 11 | --ifm-color-primary-dark: rgb(33, 175, 144); 12 | --ifm-color-primary-darker: rgb(31, 165, 136); 13 | --ifm-color-primary-darkest: rgb(26, 136, 112); 14 | --ifm-color-primary-light: rgb(70, 203, 174); 15 | --ifm-color-primary-lighter: rgb(102, 212, 189); 16 | --ifm-color-primary-lightest: rgb(146, 224, 208); 17 | --ifm-code-font-size: 95%; 18 | } 19 | 20 | .docusaurus-highlight-code-line { 21 | background-color: rgb(72, 77, 91); 22 | display: block; 23 | margin: 0 calc(-1 * var(--ifm-pre-padding)); 24 | padding: 0 var(--ifm-pre-padding); 25 | } 26 | -------------------------------------------------------------------------------- /augur.sh/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /augur.sh/src/pages/styles.module.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | 3 | /** 4 | * CSS files with the .module.css suffix will be treated as CSS modules 5 | * and scoped locally. 6 | */ 7 | 8 | .heroBanner { 9 | padding: 4rem 0; 10 | text-align: center; 11 | position: relative; 12 | overflow: hidden; 13 | } 14 | 15 | @media screen and (max-width: 966px) { 16 | .heroBanner { 17 | padding: 2rem; 18 | } 19 | } 20 | 21 | .buttons { 22 | display: flex; 23 | align-items: center; 24 | justify-content: center; 25 | } 26 | 27 | .features { 28 | display: flex; 29 | align-items: center; 30 | padding: 2rem 0; 31 | width: 100%; 32 | } 33 | 34 | .featureImage { 35 | height: 200px; 36 | width: 200px; 37 | } 38 | -------------------------------------------------------------------------------- /augur.sh/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/.nojekyll -------------------------------------------------------------------------------- /augur.sh/static/CNAME: -------------------------------------------------------------------------------- 1 | turbo-docs.augur.net 2 | -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Augur-Logo-Guidelines.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Augur-Logo-Guidelines.pdf -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/Black.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/Black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/Black.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/Black.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/Color.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/Color.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/Reversed.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/Reversed.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/White.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/CMYK (for Print only)/White.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/Color.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/Color.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/Reversed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/Reversed.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/Reversed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/Glyph/White.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/Glyph/White.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/REPv2 Icon/REPv2 Icon - Full Color over Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/REPv2 Icon/REPv2 Icon - Full Color over Black.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/REPv2 Icon/REPv2 Icon - Full Color over Black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/Black.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/Black.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/Color.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/Color.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/Reversed.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/Reversed.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/White.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Horizontal/White.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/Black.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/Black.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/Color.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/Color.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/Reversed.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/Reversed.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/White.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/CMYK (for Print only)/Vertical/White.eps -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/Black.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/Color.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/Reversed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/Reversed.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Horizontal/White.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Vertical/Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Vertical/Black.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Vertical/Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Vertical/Color.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Vertical/Reversed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Vertical/Reversed.png -------------------------------------------------------------------------------- /augur.sh/static/img/augur-logo/augur-logo-full/Vertical/White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/augur-logo/augur-logo-full/Vertical/White.png -------------------------------------------------------------------------------- /augur.sh/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/docusaurus.png -------------------------------------------------------------------------------- /augur.sh/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/augur.sh/static/img/favicon.ico -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "version": "1.5.2" 6 | } 7 | -------------------------------------------------------------------------------- /packages/chainlink/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | dist/ 6 | 7 | # CDK asset staging directory 8 | .cdk.staging 9 | cdk.out 10 | 11 | augur-adapter.env 12 | augur-jobs-creator.env 13 | chainlink-node.env 14 | -------------------------------------------------------------------------------- /packages/chainlink/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /packages/chainlink/bin/chainlink.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import "source-map-support/register"; 3 | import * as cdk from "@aws-cdk/core"; 4 | import { ChainlinkStack } from "../lib/chainlink-stack"; 5 | 6 | const app = new cdk.App(); 7 | new ChainlinkStack(app, "ChainlinkStack", { 8 | /* If you don't specify 'env', this stack will be environment-agnostic. 9 | * Account/Region-dependent features and context lookups will not work, 10 | * but a single synthesized template can be deployed anywhere. */ 11 | /* Uncomment the next line to specialize this stack for the AWS Account 12 | * and Region that are implied by the current CLI configuration. */ 13 | // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, 14 | /* Uncomment the next line if you know exactly what Account and Region you 15 | * want to deploy the stack to. */ 16 | // env: { account: '123456789012', region: 'us-east-1' }, 17 | /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */ 18 | env: { 19 | region: "us-west-2", 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /packages/chainlink/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx ts-node --prefer-ts-exts bin/chainlink.ts", 3 | "context": { 4 | "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true, 5 | "@aws-cdk/core:enableStackNameDuplicates": "true", 6 | "aws-cdk:enableDiffNoFail": "true", 7 | "@aws-cdk/core:stackRelativeExports": "true", 8 | "@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true, 9 | "@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true, 10 | "@aws-cdk/aws-kms:defaultKeyPolicies": true, 11 | "@aws-cdk/aws-s3:grantWriteWithoutAcl": true, 12 | "@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true, 13 | "@aws-cdk/aws-rds:lowercaseDbIdentifier": true, 14 | "@aws-cdk/aws-efs:defaultEncryptionAtRest": true, 15 | "@aws-cdk/aws-lambda:recognizeVersionProps": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/chainlink/docker/credential_generator/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM bash:latest 2 | 3 | ENV API_EMAIL="team@forecastfoundation.org" 4 | ENV API_PASSWORD="PASSword123!!!" 5 | ENV KEYSTORE_PASSWORD=$API_PASSWORD 6 | 7 | ADD run.sh / 8 | 9 | WORKDIR / 10 | ENTRYPOINT ./run.sh 11 | -------------------------------------------------------------------------------- /packages/chainlink/docker/credential_generator/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Create .api file"; 4 | echo "$API_EMAIL" > /chainlink/.api; 5 | echo "$API_PASSWORD" >> /chainlink/.api; 6 | 7 | echo "Create .password file"; 8 | echo "$KEYSTORE_PASSWORD" > /chainlink/.password; 9 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM smartcontract/chainlink:0.10.9 2 | 3 | RUN apt-get install -y gettext-base moreutils 4 | 5 | ADD templates /files/templates 6 | ADD run.sh /files 7 | WORKDIR /files 8 | 9 | ENV BRIDGE_URL="http://augur-adapter:8080" 10 | ENV BRIDGE_NAME="augur-adapter" 11 | 12 | # These are the deployed contract addresses and must be set for the world to work right. 13 | ENV CRYPTO_MARKET_FACTORY="REPLACE_ME" 14 | ENV MLB_MARKET_FACTORY="REPLACE_ME" 15 | ENV MMA_MARKET_FACTORY="REPLACE_ME" 16 | ENV NBA_MARKET_FACTORY="REPLACE_ME" 17 | ENV NFL_MARKET_FACTORY="REPLACE_ME" 18 | 19 | ENTRYPOINT ./run.sh 20 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Wait for node to get online. 4 | until chainlink bridges list; 5 | do 6 | echo "Trying again"; 7 | done 8 | 9 | # Check to see if bridge has already been added. 10 | chainlink bridges show $BRIDGE_NAME 2> /dev/null; 11 | if [ $? -eq 0 ] 12 | then 13 | echo "Bridge already created. Exiting....." 14 | exit 0; 15 | fi 16 | 17 | echo "Try to create the bridge"; 18 | chainlink bridges create "{\"name\": \"$BRIDGE_NAME\", \"url\": \"$BRIDGE_URL\",\"confirmations\": 0,\"minimumContractPayment\": \"0\"}"; 19 | 20 | for f in ./templates/*.json; do 21 | echo "Adding job $f"; 22 | envsubst < $f | sponge $f; 23 | chainlink job_specs create $f; 24 | 25 | cat $f; 26 | done 27 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/crypto-poke.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | Crypto Prices - ${CRYPTO_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 1 20 * * 5" 11 | } 12 | } 13 | ], 14 | "tasks": [ 15 | { 16 | "type": "augur-adapter", 17 | "params": { 18 | "method": "poke", 19 | "contractAddress": "${CRYPTO_MARKET_FACTORY}" 20 | } 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/mlb-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | MLB Market Creation - ${MLB_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 55 3,8 * * *" 11 | } 12 | } 13 | ], 14 | "tasks": [ 15 | { 16 | "type": "augur-adapter", 17 | "params": { 18 | "sport": "mlb", 19 | "method": "create", 20 | "startBuffer": 0, 21 | "affiliateIds": [ 22 | 9, 23 | 3 24 | ], 25 | "daysInAdvance": 1, 26 | "contractAddress": "${MLB_MARKET_FACTORY}" 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/mlb-resolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | MLB Market Resolution - ${MLB_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 03 3,8 * * *" 11 | } 12 | } 13 | ], 14 | "tasks": [ 15 | { 16 | "type": "augur-adapter", 17 | "params": { 18 | "sport": "mlb", 19 | "method": "resolve", 20 | "contractAddress": "${MLB_MARKET_FACTORY}" 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/mma-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | MMA Market Creation - ${MMA_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 06 14 * * 3" 11 | } 12 | } 13 | ], 14 | "tasks": [ 15 | { 16 | "type": "augur-adapter", 17 | "params": { 18 | "sport": "mma", 19 | "method": "create", 20 | "startBuffer": 86400, 21 | "daysInAdvance": 4, 22 | "contractAddress": "${MMA_MARKET_FACTORY}" 23 | } 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/mma-resolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | MMA Market Resolution - ${MMA_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 03 7 * * *" 11 | } 12 | } 13 | ], 14 | "tasks": [ 15 | { 16 | "type": "augur-adapter", 17 | "params": { 18 | "sport": "mma", 19 | "method": "resolve", 20 | "contractAddress": "${MMA_MARKET_FACTORY}" 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/nba-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | NBA Market Creation - ${NBA_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | } 7 | ], 8 | "tasks": [ 9 | { 10 | "type": "augur-adapter", 11 | "params": { 12 | "sport": "nba", 13 | "method": "create", 14 | "startBuffer": 86400, 15 | "affiliateIds": [ 16 | 9, 17 | 3 18 | ], 19 | "daysInAdvance": 7, 20 | "contractAddress": "${NBA_MARKET_FACTORY}" 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/nba-resolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | NBA Market Resolution - ${NBA_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | } 7 | ], 8 | "tasks": [ 9 | { 10 | "type": "augur-adapter", 11 | "params": { 12 | "sport": "nba", 13 | "method": "resolve", 14 | "startBuffer": 86400, 15 | "affiliateIds": [ 16 | 9, 17 | 3 18 | ], 19 | "daysInAdvance": 7, 20 | "contractAddress": "${NBA_MARKET_FACTORY}" 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/nfl-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | NFL Market Creation - ${NFL_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 13 14 * * 3" 11 | } 12 | }, 13 | { 14 | "type": "cron", 15 | "params": { 16 | "schedule": "CRON_TZ=UTC 08 14 * * 3" 17 | } 18 | } 19 | 20 | ], 21 | "tasks": [ 22 | { 23 | "type": "augur-adapter", 24 | "params": { 25 | "sport": "nfl", 26 | "method": "create", 27 | "startBuffer": 86400, 28 | "daysInAdvance": 7, 29 | "contractAddress": "${NFL_MARKET_FACTORY}" 30 | } 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /packages/chainlink/docker/jobs_creator/templates/nfl-resolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur | NFL Market Resolution - ${NFL_MARKET_FACTORY}", 3 | "initiators": [ 4 | { 5 | "type": "web" 6 | }, 7 | { 8 | "type": "cron", 9 | "params": { 10 | "schedule": "CRON_TZ=UTC 13 1 * * 1" 11 | } 12 | }, 13 | { 14 | "type": "cron", 15 | "params": { 16 | "schedule": "CRON_TZ=UTC 13 21 * * 0" 17 | } 18 | }, 19 | { 20 | "type": "cron", 21 | "params": { 22 | "schedule": "CRON_TZ=UTC 13 5 * * 0,1,2,5" 23 | } 24 | }, 25 | { 26 | "type": "cron", 27 | "params": { 28 | "schedule": "CRON_TZ=UTC 8 1 * * 1" 29 | } 30 | }, 31 | { 32 | "type": "cron", 33 | "params": { 34 | "schedule": "CRON_TZ=UTC 8 21 * * 0" 35 | } 36 | }, 37 | { 38 | "type": "cron", 39 | "params": { 40 | "schedule": "CRON_TZ=UTC 8 5 * * 0,1,2,5" 41 | } 42 | } 43 | ], 44 | "tasks": [ 45 | { 46 | "type": "augur-adapter", 47 | "params": { 48 | "sport": "nfl", 49 | "method": "resolve", 50 | "contractAddress": "${NFL_MARKET_FACTORY}" 51 | } 52 | } 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /packages/chainlink/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /packages/chainlink/lib/generate-augur-adapter-env.ts: -------------------------------------------------------------------------------- 1 | import { addresses as contractAddresses, MarketFactoryType } from "@augurproject/smart"; 2 | 3 | const mumbaiNetworkID = 80001; 4 | 5 | const findMarketFactory = (marketFactoryType: MarketFactoryType): string => { 6 | const marketFactoryAddresses = contractAddresses[mumbaiNetworkID]?.marketFactories || []; 7 | const marketFactory = marketFactoryAddresses.find((i) => i.type === marketFactoryType); 8 | if (typeof marketFactory === "undefined") { 9 | // This will fail when an attempt to add the job is made. 10 | return "NO_CONTRACT"; 11 | } 12 | 13 | return marketFactory.address; 14 | }; 15 | 16 | const generateTemplate = () => { 17 | console.log(`CRYPTO_MARKET_FACTORY=${findMarketFactory("CryptoCurrency")} 18 | MLB_MARKET_FACTORY=${findMarketFactory("MLB")} 19 | MMA_MARKET_FACTORY=${findMarketFactory("MMA")} 20 | NBA_MARKET_FACTORY=${findMarketFactory("NBA")} 21 | NFL_MARKET_FACTORY=${findMarketFactory("NFL")} 22 | GROUPED_MARKET_FACTORY=${findMarketFactory("Grouped")} 23 | `); 24 | }; 25 | 26 | generateTemplate(); 27 | -------------------------------------------------------------------------------- /packages/chainlink/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chainlink", 3 | "version": "1.5.2", 4 | "private": true, 5 | "bin": { 6 | "chainlink": "bin/chainlink.js" 7 | }, 8 | "scripts": { 9 | "build": "tsc -b", 10 | "build:docker": "docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t augurproject/chainlink-credential-generator:latest ./docker/credential_generator && docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t augurproject/chainlink-job-generator:latest ./docker/jobs_creator", 11 | "watch": "tsc -w", 12 | "test": "jest", 13 | "cdk": "cdk", 14 | "generate:env": "ts-node ./lib/generate-augur-adapter-env.ts > augur-jobs-creator.env", 15 | "deploy:aws": "yarn cdk synth && yarn cdk deploy" 16 | }, 17 | "devDependencies": { 18 | "@aws-cdk/assert": "1.114.0", 19 | "@types/jest": "^26.0.10", 20 | "@types/node": "10.17.27", 21 | "aws-cdk": "1.114.0", 22 | "jest": "^26.4.2", 23 | "ts-jest": "^26.2.0", 24 | "ts-node": "^9.0.0", 25 | "typescript": "~3.9.7" 26 | }, 27 | "dependencies": { 28 | "@augurproject/smart": "^1.5.2", 29 | "@aws-cdk/aws-ec2": "^1.114.0", 30 | "@aws-cdk/aws-ecs": "^1.114.0", 31 | "@aws-cdk/aws-ecs-patterns": "^1.114.0", 32 | "@aws-cdk/core": "1.114.0", 33 | "source-map-support": "^0.5.16" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/chainlink/test/chainlink.test.ts: -------------------------------------------------------------------------------- 1 | import { expect as expectCDK, MatchStyle, matchTemplate } from "@aws-cdk/assert"; 2 | import * as cdk from "@aws-cdk/core"; 3 | import * as Chainlink from "../lib/chainlink-stack"; 4 | 5 | test("Empty Stack", () => { 6 | const app = new cdk.App(); 7 | // WHEN 8 | const stack = new Chainlink.ChainlinkStack(app, "MyTestStack"); 9 | // THEN 10 | expectCDK(stack).to( 11 | matchTemplate( 12 | { 13 | Resources: {}, 14 | }, 15 | MatchStyle.EXACT 16 | ) 17 | ); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/chainlink/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "strict": true, 6 | "noImplicitAny": true, 7 | "strictNullChecks": true, 8 | "noImplicitThis": true, 9 | "alwaysStrict": true, 10 | "noUnusedLocals": false, 11 | "noUnusedParameters": false, 12 | "noImplicitReturns": true, 13 | "noFallthroughCasesInSwitch": false, 14 | "experimentalDecorators": true, 15 | "strictPropertyInitialization": false, 16 | "outDir": "dist" 17 | }, 18 | "exclude": [ 19 | "node_modules", 20 | "cdk.out" 21 | ], 22 | "include": [ 23 | "./bin/*", 24 | "./lib/*", 25 | "./test/*" 26 | ], 27 | "files": [ 28 | "jest.config.js" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /packages/comps/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .eslintcache 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # styles types 27 | **.d.ts 28 | **.less.d.ts 29 | src/assets/**/*.less.d.ts 30 | src/utils/**/*.less.d.ts 31 | src/modules/**/*.styles.less.d.ts 32 | src/modules/**/*.less.d.ts 33 | # make sure to whitelist specifically externals.d.ts 34 | !externals.d.ts -------------------------------------------------------------------------------- /packages/comps/config/pnpTs.js: -------------------------------------------------------------------------------- 1 | const { resolveModuleName } = require('ts-pnp'); 2 | 3 | exports.resolveModuleName = ( 4 | typescript, 5 | moduleName, 6 | containingFile, 7 | compilerOptions, 8 | resolutionHost 9 | ) => { 10 | return resolveModuleName( 11 | moduleName, 12 | containingFile, 13 | compilerOptions, 14 | resolutionHost, 15 | typescript.resolveModuleName 16 | ); 17 | }; 18 | 19 | exports.resolveTypeReferenceDirective = ( 20 | typescript, 21 | moduleName, 22 | containingFile, 23 | compilerOptions, 24 | resolutionHost 25 | ) => { 26 | return resolveModuleName( 27 | moduleName, 28 | containingFile, 29 | compilerOptions, 30 | resolutionHost, 31 | typescript.resolveTypeReferenceDirective 32 | ); 33 | }; 34 | -------------------------------------------------------------------------------- /packages/comps/public/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/apple-icon.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #0E0E21 3 | -------------------------------------------------------------------------------- /packages/comps/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/favicon.ico -------------------------------------------------------------------------------- /packages/comps/public/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur Simplified", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ], 41 | "theme_color": "#0E0E21", 42 | "background_color": "#0E0E21", 43 | "display": "standalone" 44 | } 45 | -------------------------------------------------------------------------------- /packages/comps/public/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /packages/comps/public/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/public/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /packages/comps/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Black.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Black.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-BlackItalic.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-BlackItalic.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Bold.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Bold.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-BoldItalic.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-BoldItalic.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-ExtraBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-ExtraBold.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-ExtraBold.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-ExtraBoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-ExtraBoldItalic.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-ExtraBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-ExtraBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Italic.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Italic.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Medium.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Medium.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-MediumItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-MediumItalic.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-MediumItalic.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Regular.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-Regular.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-SemiBold.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-SemiBold.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-SemiBoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-SemiBoldItalic.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Inter-SemiBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Inter-SemiBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Roboto-Light.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Roboto-Mono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Roboto-Mono-Regular.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /packages/comps/src/assets/fonts/icofont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/fonts/icofont.woff -------------------------------------------------------------------------------- /packages/comps/src/assets/images/Main_Banner_Sportsbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/images/Main_Banner_Sportsbook.png -------------------------------------------------------------------------------- /packages/comps/src/assets/images/top-banner-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/images/top-banner-desktop.png -------------------------------------------------------------------------------- /packages/comps/src/assets/images/top-banner-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/assets/images/top-banner-mobile.png -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/assets/fortmaticIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/components/ConnectAccount/assets/fortmaticIcon.png -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/assets/metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/components/ConnectAccount/assets/metamask.png -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/assets/portisIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/comps/src/components/ConnectAccount/assets/portisIcon.png -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/assets/x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/components/AccountDetails/CopyHelper.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { CheckCircle } from "react-feather"; 3 | import { useCopyClipboard } from "../../hooks"; 4 | import { TinyThemeButton } from "../../../common/buttons"; 5 | import { CopyIcon } from "../../../common/icons"; 6 | 7 | export interface CopyHelperProps { 8 | toCopy: string; 9 | copyText: string; 10 | } 11 | 12 | const CopyHelper = ({ toCopy, copyText = "Copy" }: CopyHelperProps) => { 13 | const [isCopied, setCopied] = useCopyClipboard(); 14 | 15 | return ( 16 | setCopied(toCopy)} 18 | icon={isCopied ? : CopyIcon} 19 | text={isCopied ? "Copied" : copyText} 20 | /> 21 | ); 22 | }; 23 | 24 | export default CopyHelper; 25 | -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/components/Identicon/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef } from "react"; 2 | import Jazzicon from "jazzicon"; 3 | 4 | export default function Identicon({ account }) { 5 | const ref = useRef(); 6 | 7 | useEffect(() => { 8 | if (account && ref.current) { 9 | ref.current.innerHTML = ""; 10 | ref.current.appendChild(Jazzicon(16, parseInt(account.slice(2, 10), 16))); 11 | } 12 | }, [account]); 13 | 14 | // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/30451 15 | return
; 16 | } 17 | -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/components/Loader/index.less: -------------------------------------------------------------------------------- 1 | .animate { 2 | & :local { 3 | animation: move 2s linear infinite; 4 | } 5 | } 6 | 7 | @keyframes move { 8 | from { 9 | transform: rotate(0deg); 10 | } to { 11 | transform: rotate(360deg); 12 | } 13 | } -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/components/Loader/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Styles from "./index.less"; 3 | 4 | export const Loader = ({ 5 | darkMode, 6 | size = "16px", 7 | stroke, 8 | }: { 9 | darkMode: boolean; 10 | size?: string; 11 | stroke?: string; 12 | [k: string]: any; 13 | }) => { 14 | return ( 15 | 27 | 34 | 35 | ); 36 | }; 37 | -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/connect-account-provider.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { createWeb3ReactRoot, Web3ReactProvider } from "@web3-react/core"; 3 | import { Web3Provider } from "@ethersproject/providers"; 4 | 5 | const Web3ProviderNetwork = createWeb3ReactRoot("NETWORK_COMPS"); 6 | 7 | function getLibrary(provider) { 8 | const library = new Web3Provider(provider, "any"); 9 | library.pollingInterval = 15000; 10 | return library; 11 | } 12 | 13 | export const ConnectAccountProvider = ({ children }: any) => ( 14 | }} /> 15 | ); 16 | 17 | export default ConnectAccountProvider; 18 | -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/hooks/index.tsx: -------------------------------------------------------------------------------- 1 | import { Web3ReactContextInterface } from "@web3-react/core/dist/types"; 2 | import { ChainId } from "@uniswap/sdk"; 3 | import { Web3Provider } from "@ethersproject/providers"; 4 | import { useWeb3React as useWeb3ReactCore } from "@web3-react/core"; 5 | import copy from "copy-to-clipboard"; 6 | import { useState, useCallback, useEffect } from "react"; 7 | 8 | export function useActiveWeb3React(): Web3ReactContextInterface & { chainId?: ChainId } { 9 | const context = useWeb3ReactCore(); 10 | const contextNetwork = useWeb3ReactCore("NETWORK_COMPS"); 11 | return context.active ? context : contextNetwork; 12 | } 13 | 14 | export function useCopyClipboard(timeout = 500): [boolean, (toCopy: string) => void] { 15 | const [isCopied, setIsCopied] = useState(false); 16 | 17 | const staticCopy = useCallback((text) => { 18 | const didCopy = copy(text); 19 | setIsCopied(didCopy); 20 | }, []); 21 | 22 | useEffect(() => { 23 | if (isCopied) { 24 | const hide = setTimeout(() => { 25 | setIsCopied(false); 26 | }, timeout); 27 | 28 | return () => { 29 | clearTimeout(hide); 30 | }; 31 | } 32 | return undefined; 33 | }, [isCopied, setIsCopied, timeout]); 34 | 35 | return [isCopied, staticCopy]; 36 | } 37 | -------------------------------------------------------------------------------- /packages/comps/src/components/ConnectAccount/index.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) '~assets/styles/shared'; 2 | 3 | .ModalOverlay { 4 | background: black; 5 | position: fixed; 6 | top: 0; 7 | right: 0; 8 | bottom: 0; 9 | left: 0; 10 | } 11 | -------------------------------------------------------------------------------- /packages/comps/src/components/common/get-wallet-icon.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) '~assets/styles/shared'; 2 | 3 | .WalletIcon { 4 | display: flex; 5 | align-items: center; 6 | 7 | > div { 8 | display: flex; 9 | justify-content: center; 10 | align-items: center; 11 | } 12 | 13 | > img { 14 | max-height: @size-16; 15 | } 16 | 17 | > button { 18 | margin-left: @size-4; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/comps/src/components/common/logo.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classNames from "classnames"; 3 | 4 | import { AugurTextLogo, v2AugurLogo, AugurBetaLogo, AugurBetaTextLogo } from "./icons"; 5 | import { useAppStatusStore } from "../../stores/app-status"; 6 | import { MarketsLink } from "../../utils/links/links"; 7 | 8 | import Styles from "./logo.styles.less"; 9 | 10 | export interface LogoProps { 11 | isMobile?: boolean; 12 | darkTheme?: boolean; 13 | } 14 | 15 | export const Logo = ({ isMobile, darkTheme }: LogoProps) => ( 16 |
17 | {isMobile ? v2AugurLogo : AugurTextLogo} 18 |
19 | ); 20 | 21 | export const LinkLogo = ({ alwaysFull = false }) => { 22 | const { isMobile } = useAppStatusStore(); 23 | 24 | return ( 25 | 26 |
27 | {isMobile && !alwaysFull ? AugurBetaLogo : AugurBetaTextLogo} 28 |
29 |
30 | ); 31 | }; 32 | 33 | export default Logo; 34 | -------------------------------------------------------------------------------- /packages/comps/src/components/common/spinner.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Styles from './spinner.styles.less'; 3 | 4 | export const Spinner = () =>
; 5 | -------------------------------------------------------------------------------- /packages/comps/src/components/common/toggle-switch.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Styles from './toggle-switch.styles.less'; 3 | import classNames from 'classnames'; 4 | 5 | export interface ToggleSwitchProps { 6 | toggle?: boolean; 7 | setToggle: Function; 8 | button1Text?: string; 9 | button2Text?: string; 10 | buySell?: boolean; 11 | id?: string; 12 | clean?: boolean; 13 | } 14 | 15 | export const ToggleSwitch = ({ 16 | toggle, 17 | setToggle, 18 | button1Text = 'On', 19 | button2Text = 'Off', 20 | buySell, 21 | id, 22 | clean = false, 23 | }: ToggleSwitchProps) => ( 24 | 37 | ); 38 | 39 | export const BuySellToggleSwitch = ({ toggle, setToggle }) => ( 40 | 47 | ); 48 | -------------------------------------------------------------------------------- /packages/comps/src/components/modal/common.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import Styles from "./modal.styles.less"; 4 | import * as Icons from "../common/icons"; 5 | 6 | const { CloseIcon } = Icons; 7 | 8 | export const Header = ({ title, subtitle = { value: null, label: null }, closeModal }) => { 9 | return ( 10 |
11 | {title} 12 | {subtitle?.value && ( 13 |
14 | {subtitle.label} 15 | {subtitle.value} 16 |
17 | )} 18 | 19 |
20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /packages/comps/src/externals.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.less" { 2 | const resource: { [key: string]: string }; 3 | export = resource; 4 | } 5 | 6 | declare module "*.png" { 7 | const value: any; 8 | export default value; 9 | } 10 | 11 | declare module "*.svg" { 12 | const value: any; 13 | export default value; 14 | } 15 | -------------------------------------------------------------------------------- /packages/comps/src/stores/user.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { DEFAULT_USER_STATE, STUBBED_USER_ACTIONS } from "./constants"; 3 | import { useUser } from "./user-hooks"; 4 | 5 | export const UserContext = React.createContext({ 6 | ...DEFAULT_USER_STATE, 7 | actions: STUBBED_USER_ACTIONS, 8 | }); 9 | 10 | export const UserStore = { 11 | actionsSet: false, 12 | get: () => ({ ...DEFAULT_USER_STATE }), 13 | actions: STUBBED_USER_ACTIONS, 14 | }; 15 | 16 | export const UserProvider = ({ children }: any) => { 17 | const state = useUser(); 18 | 19 | if (!UserStore.actionsSet) { 20 | UserStore.actions = state.actions; 21 | UserStore.actionsSet = true; 22 | } 23 | const readableState = { ...state }; 24 | delete readableState.actions; 25 | UserStore.get = () => readableState; 26 | 27 | return {children}; 28 | }; 29 | 30 | export const useUserStore = () => React.useContext(UserContext); 31 | 32 | const output = { 33 | UserProvider, 34 | useUserStore, 35 | UserStore, 36 | }; 37 | 38 | export default output; 39 | -------------------------------------------------------------------------------- /packages/comps/src/utils/add-commas-to-number.ts: -------------------------------------------------------------------------------- 1 | export default function addCommasToNumber(num: number | string, removeComma: boolean = false): string { 2 | let sides: Array = []; 3 | 4 | sides = num.toString().split("."); 5 | sides[0] = removeComma ? sides[0] : sides[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); 6 | 7 | return sides.join("."); 8 | } 9 | -------------------------------------------------------------------------------- /packages/comps/src/utils/create-big-number.ts: -------------------------------------------------------------------------------- 1 | import logError from "./log-error"; 2 | import { BigNumber } from "bignumber.js"; 3 | 4 | export const createBigNumber = (value, ...args): BigNumber => { 5 | let newBigNumber; 6 | try { 7 | let useValue = value; 8 | if (typeof value === "object" && Object.keys(value).indexOf("_hex") > -1) { 9 | useValue = value._hex; 10 | } 11 | newBigNumber = new BigNumber(`${useValue}`, ...args); 12 | } catch (e) { 13 | logError("Error instantiating WrappedBigNumber", e); 14 | } 15 | 16 | return newBigNumber; 17 | }; 18 | 19 | // Note this is exported from here. 20 | export { default as BigNumber } from "bignumber.js"; 21 | -------------------------------------------------------------------------------- /packages/comps/src/utils/get-default-price.ts: -------------------------------------------------------------------------------- 1 | import BigNumber, { BigNumber as BN } from "bignumber.js"; 2 | 3 | export const getDefaultPrice = (outcome: string | number, weights: string[]): BigNumber => { 4 | if (!weights || weights.length === 0) return new BN(0); 5 | const total = weights.reduce((p, w) => p.plus(new BN(w)), new BN(0)); 6 | const weight = new BN(weights[Number(outcome)]); 7 | return weight.div(total); 8 | }; 9 | -------------------------------------------------------------------------------- /packages/comps/src/utils/get-number-precision.ts: -------------------------------------------------------------------------------- 1 | import { formatNumber } from "./format-number"; 2 | import { FormattedNumber } from "../types"; 3 | // get the precision of the number, the length to the right of the decimal 4 | export default function getPrecision(value: number | string, defaultValue: number): number { 5 | if (!value) return defaultValue; 6 | const numValue: FormattedNumber = formatNumber(value); 7 | const values = numValue.fullPrecision.toString().split("."); 8 | if (values.length === 1) return 0; // no decimal 9 | return values[1].length; 10 | } 11 | -------------------------------------------------------------------------------- /packages/comps/src/utils/links/make-path.ts: -------------------------------------------------------------------------------- 1 | // TODO -- clean up doc here 2 | // (String|Array) string to individual path OR array of deep paths for linking OR array of individual paths to match when routing 3 | // (Bool) whether return value of paths array should be formatted as string path or matching regex 4 | export default function makePath(paths, match = false) { 5 | // Invalid, return root 6 | if ((paths.constructor !== String && paths.constructor !== Array) || (match && paths.constructor !== Array)) 7 | return "/"; 8 | // Matching Regex for Route Component 9 | if (match) return `^/(${paths.constructor === Array ? paths.join("|") : paths})/`; 10 | 11 | // String Path for Link from Array or 12 | // String Path for Link from String 13 | return paths.constructor === Array ? `/${paths.join("/")}/` : `/${paths}`; 14 | } 15 | -------------------------------------------------------------------------------- /packages/comps/src/utils/links/make-query.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns a formatted query string 3 | * @param {object} query - Object with query param key:value pairs 4 | * @returns {string} 5 | */ 6 | export default function makeQuery(query: any): string { 7 | return Object.keys(query).reduce( 8 | (p, paramKey, i) => 9 | `${i === 0 ? "?" : ""}${p}${i === 0 ? "" : "&"}${paramKey}=${encodeURIComponent(query[paramKey])}`, 10 | "" 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/comps/src/utils/links/parse-path.ts: -------------------------------------------------------------------------------- 1 | const parsePath = (stringPath) => { 2 | let sanitizedPaths = []; 3 | 4 | if (stringPath == null) return sanitizedPaths; 5 | 6 | sanitizedPaths = stringPath.split("/").reduce((p, path) => (path.length === 0 ? p : [...p, path]), []); 7 | 8 | return sanitizedPaths; 9 | }; 10 | 11 | export default parsePath; 12 | -------------------------------------------------------------------------------- /packages/comps/src/utils/links/parse-query.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Parses the raw query string into a formatted array 3 | * @param {string} searchString - The raw query param string 4 | * @returns {object} 5 | */ 6 | export default function parseQuery(searchString) { 7 | let pairSplit; 8 | return (searchString || "") 9 | .replace(/^\?/, "") 10 | .split("&") 11 | .reduce((p, pair) => { 12 | pairSplit = pair.split("="); 13 | if (pairSplit.length >= 1) { 14 | if (pairSplit[0].length) { 15 | if (pairSplit.length >= 2 && pairSplit[1]) { 16 | p[decodeURIComponent(pairSplit[0])] = decodeURIComponent(pairSplit[1]); 17 | } else { 18 | p[decodeURIComponent(pairSplit[0])] = undefined; 19 | } 20 | } 21 | } 22 | return p; 23 | }, {}); 24 | } 25 | 26 | export function parseLocation(href) { 27 | let query = href; 28 | if (query.indexOf("?") !== -1) { 29 | query = query.replace("#!", "&").split("?")[1]; 30 | } 31 | return parseQuery(query); 32 | } 33 | -------------------------------------------------------------------------------- /packages/comps/src/utils/links/parse-string-to-array.ts: -------------------------------------------------------------------------------- 1 | export default function parseStringToArray(words, delimiter) { 2 | const cleanWords = cleanString(words); 3 | return cleanWords ? cleanWords.split(delimiter || " ") : []; 4 | } 5 | 6 | function cleanString(words) { 7 | return (words || "").replace(/\s+/g, " ").trim(); 8 | } 9 | -------------------------------------------------------------------------------- /packages/comps/src/utils/log-error.ts: -------------------------------------------------------------------------------- 1 | // This is the same signature as a typical node.js style callback. 2 | export default function LogError(err: Error | string | object | null, result?: any): void { 3 | if (err != null) { 4 | console.error(err); 5 | if (result != null) console.log(result); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/comps/src/utils/sports.json: -------------------------------------------------------------------------------- 1 | { 2 | "2": { 3 | "sport_id": "2", 4 | "name": "NFL", 5 | "categories": ["Sports", "American Football", "NFL"] 6 | }, 7 | "3": { 8 | "sport_id": "3", 9 | "name": "MLB", 10 | "categories": ["Sports", "Baseball", "MLB"] 11 | }, 12 | "4": { 13 | "sport_id": "4", 14 | "name": "NBA", 15 | "categories": ["Sports", "Basketball", "NBA"] 16 | }, 17 | "6": { 18 | "sport_id": "6", 19 | "name": "NHL", 20 | "categories": ["Sports", "Hockey", "NHL"] 21 | }, 22 | "7": { 23 | "sport_id": "7", 24 | "name": "UFC/MMA", 25 | "categories": ["Sports", "MMA", "UFC"] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/comps/src/utils/window-ref.ts: -------------------------------------------------------------------------------- 1 | import { WindowApp } from "../types"; 2 | 3 | export const windowRef: WindowApp = window as WindowApp & typeof globalThis; 4 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist 3 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "singleQuote": true, 4 | "bracketSpacing": true, 5 | "printWidth": 80 6 | } 7 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Josh Stevens 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/enums/execution-type.ts: -------------------------------------------------------------------------------- 1 | export enum ExecutionType { 2 | web3 = 'web3', 3 | ethers = 'ethers', 4 | customHttp = 'custom', 5 | } 6 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/enums/index.ts: -------------------------------------------------------------------------------- 1 | export { ExecutionType } from './execution-type'; 2 | export { Networks } from './networks'; 3 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/enums/networks.ts: -------------------------------------------------------------------------------- 1 | export enum Networks { 2 | mainnet = 1, 3 | ropsten = 3, 4 | rinkeby = 4, 5 | kovan = 42, 6 | matic = 137, 7 | mumbai = 80001, 8 | } 9 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CallReturnContext, 3 | ContractCallContext, 4 | ContractCallResults, 5 | ContractCallReturnContext, 6 | } from './models'; 7 | export * from './models/multicall-options'; 8 | export { Multicall } from './multicall'; 9 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/abi-input.ts: -------------------------------------------------------------------------------- 1 | export interface AbiInput { 2 | name: string; 3 | type: string; 4 | internalType?: string; 5 | indexed?: boolean; 6 | components?: AbiInput[]; 7 | } 8 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/abi-item.ts: -------------------------------------------------------------------------------- 1 | import { AbiInput } from './abi-input'; 2 | import { AbiOutput } from './abi-output'; 3 | 4 | export interface AbiItem { 5 | anonymous?: boolean; 6 | constant?: boolean; 7 | inputs?: AbiInput[]; 8 | name: string; 9 | outputs?: AbiOutput[]; 10 | payable?: boolean; 11 | stateMutability?: StateMutabilityType; 12 | type: AbiType; 13 | gas?: number; 14 | } 15 | 16 | export type StateMutabilityType = 'pure' | 'view' | 'nonpayable' | 'payable'; 17 | export type AbiType = 'function' | 'constructor' | 'event' | 'fallback'; 18 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/abi-output.ts: -------------------------------------------------------------------------------- 1 | export interface AbiOutput { 2 | name: string; 3 | type: string; 4 | internalType?: string; 5 | components?: AbiOutput[]; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/aggregate-call-context.ts: -------------------------------------------------------------------------------- 1 | export interface AggregateCallContext { 2 | contractContextIndex: number; 3 | contractMethodIndex: number; 4 | target: string; 5 | encodedData: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/aggregate-contract-response.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber } from 'ethers/lib/ethers'; 2 | 3 | export interface AggregateContractResponse { 4 | blockNumber: BigNumber; 5 | returnData: string[]; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/aggregate-response.ts: -------------------------------------------------------------------------------- 1 | export interface AggregateResponse { 2 | blockNumber: number; 3 | results: Array<{ 4 | contractContextIndex: number; 5 | methodResults: Array<{ 6 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 7 | returnData: any; 8 | contractMethodIndex: number; 9 | }>; 10 | }>; 11 | } 12 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/call-context.ts: -------------------------------------------------------------------------------- 1 | export interface CallContext { 2 | /** 3 | * Reference to this call context 4 | */ 5 | reference: string; 6 | 7 | /** 8 | * your contract method name 9 | */ 10 | methodName: string; 11 | 12 | /** 13 | * Method parameters you want it to pass in 14 | */ 15 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 16 | methodParameters: any[]; 17 | 18 | /** 19 | * Context is a generic databucket 20 | */ 21 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 22 | context?: any; 23 | } 24 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/call-return-context.ts: -------------------------------------------------------------------------------- 1 | import { CallContext } from './call-context'; 2 | 3 | export interface CallReturnContext extends CallContext { 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | returnValues: any[]; 6 | /** 7 | * This stats if it could decode the result or not 8 | */ 9 | decoded: boolean; 10 | } 11 | 12 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 13 | export interface Result extends ReadonlyArray { 14 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 15 | readonly [key: string]: any; 16 | } 17 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/contract-call-context.ts: -------------------------------------------------------------------------------- 1 | import { CallContext } from './call-context'; 2 | 3 | // https://github.com/ethers-io/ethers.js/issues/211 4 | 5 | export interface ContractCallContext { 6 | /** 7 | * Reference to this contract call context 8 | */ 9 | reference: string; 10 | 11 | /** 12 | * The contract address 13 | */ 14 | contractAddress: string; 15 | 16 | /** 17 | * The abi for the contract 18 | */ 19 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 20 | abi: any[]; 21 | 22 | /** 23 | * All the calls you want to do for this contract 24 | */ 25 | calls: CallContext[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/contract-call-results.ts: -------------------------------------------------------------------------------- 1 | import { ContractCallReturnContext } from './contract-call-return-context'; 2 | 3 | export interface ContractCallResults { 4 | results: { [key: string]: ContractCallReturnContext }; 5 | blockNumber: number; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/contract-call-return-context.ts: -------------------------------------------------------------------------------- 1 | import { CallReturnContext } from './call-return-context'; 2 | import { ContractCallContext } from './contract-call-context'; 3 | 4 | export interface ContractCallReturnContext { 5 | originalContractCallContext: ContractCallContext; 6 | callsReturnContext: CallReturnContext[]; 7 | } 8 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/index.ts: -------------------------------------------------------------------------------- 1 | export { AbiInput } from './abi-input'; 2 | export { AbiItem } from './abi-item'; 3 | export { AbiOutput } from './abi-output'; 4 | export { AggregateCallContext } from './aggregate-call-context'; 5 | export { AggregateContractResponse } from './aggregate-contract-response'; 6 | export { AggregateResponse } from './aggregate-response'; 7 | export { CallContext } from './call-context'; 8 | export { CallReturnContext } from './call-return-context'; 9 | export { ContractCallContext } from './contract-call-context'; 10 | export { ContractCallResults } from './contract-call-results'; 11 | export { ContractCallReturnContext } from './contract-call-return-context'; 12 | export * from './multicall-options'; 13 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/models/multicall-options.ts: -------------------------------------------------------------------------------- 1 | import { Provider } from '@ethersproject/providers'; 2 | 3 | interface MulticallOptionsBase { 4 | multicallCustomContractAddress?: string; 5 | } 6 | 7 | export interface MulticallOptionsWeb3 extends MulticallOptionsBase { 8 | // so we can support any version of web3 typings 9 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 10 | web3Instance: any; 11 | } 12 | 13 | export interface MulticallOptionsEthers extends MulticallOptionsBase { 14 | ethersProvider: Provider; 15 | } 16 | 17 | export interface MulticallOptionsCustomJsonRpcProvider 18 | extends MulticallOptionsBase { 19 | nodeUrl: string; 20 | } 21 | -------------------------------------------------------------------------------- /packages/ethereum-multicall/src/utils.ts: -------------------------------------------------------------------------------- 1 | export class Utils { 2 | /** 3 | * Deep clone a object 4 | * @param object The object 5 | */ 6 | public static deepClone(object: T): T { 7 | // const cloned = JSON.parse(JSON.stringify(object)) as T; 8 | // cloning causes data loss 9 | return object; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/simplified/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .eslintcache 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # styles types 27 | src/assets/**/*.less.d.ts 28 | src/utils/**/*.less.d.ts 29 | src/modules/**/*.styles.less.d.ts 30 | src/modules/**/*.less.d.ts -------------------------------------------------------------------------------- /packages/simplified/config/pnpTs.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const { resolveModuleName } = require('ts-pnp'); 4 | 5 | exports.resolveModuleName = ( 6 | typescript, 7 | moduleName, 8 | containingFile, 9 | compilerOptions, 10 | resolutionHost 11 | ) => { 12 | return resolveModuleName( 13 | moduleName, 14 | containingFile, 15 | compilerOptions, 16 | resolutionHost, 17 | typescript.resolveModuleName 18 | ); 19 | }; 20 | 21 | exports.resolveTypeReferenceDirective = ( 22 | typescript, 23 | moduleName, 24 | containingFile, 25 | compilerOptions, 26 | resolutionHost 27 | ) => { 28 | return resolveModuleName( 29 | moduleName, 30 | containingFile, 31 | compilerOptions, 32 | resolutionHost, 33 | typescript.resolveTypeReferenceDirective 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /packages/simplified/postcss.config.js: -------------------------------------------------------------------------------- 1 | const plugins = 2 | process.env.NODE_ENV === "production" 3 | ? [require("autoprefixer"), require("cssnano")] 4 | : [require("autoprefixer")]; 5 | 6 | module.exports = { 7 | plugins 8 | }; 9 | -------------------------------------------------------------------------------- /packages/simplified/public/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/apple-icon.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #0E0E21 3 | -------------------------------------------------------------------------------- /packages/simplified/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/favicon.ico -------------------------------------------------------------------------------- /packages/simplified/public/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur Simplified", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ], 41 | "theme_color": "#0E0E21", 42 | "background_color": "#0E0E21", 43 | "display": "standalone" 44 | } 45 | -------------------------------------------------------------------------------- /packages/simplified/public/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /packages/simplified/public/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/public/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /packages/simplified/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Black.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Black.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-BlackItalic.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-BlackItalic.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Bold.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Bold.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-BoldItalic.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-BoldItalic.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-ExtraBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-ExtraBold.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-ExtraBold.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-ExtraBoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-ExtraBoldItalic.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-ExtraBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-ExtraBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Italic.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Italic.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Medium.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Medium.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-MediumItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-MediumItalic.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-MediumItalic.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Regular.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-Regular.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-SemiBold.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-SemiBold.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-SemiBoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-SemiBoldItalic.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/Inter-SemiBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/Inter-SemiBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /packages/simplified/src/assets/fonts/icofont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/fonts/icofont.woff -------------------------------------------------------------------------------- /packages/simplified/src/assets/images/top-banner-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/images/top-banner-desktop.png -------------------------------------------------------------------------------- /packages/simplified/src/assets/images/top-banner-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/assets/images/top-banner-mobile.png -------------------------------------------------------------------------------- /packages/simplified/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { render } from "react-dom"; 3 | import App from "./modules/App"; 4 | import * as comps from "@augurproject/comps"; 5 | const { windowRef } = comps; 6 | console.log(comps); 7 | windowRef.appStatus = {}; 8 | windowRef.data = {}; 9 | windowRef.user = {}; 10 | windowRef.simplified = {}; 11 | 12 | render(, document.getElementById("root")); 13 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/App.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) '~assets/styles/shared.less'; 2 | 3 | .App { 4 | display: flex; 5 | flex-flow: column nowrap; 6 | grid-gap: 0 @size-16; 7 | flex: 1; 8 | position: relative; 9 | 10 | > div { 11 | max-width: @desktop-max; 12 | box-sizing: border-box; 13 | margin-top: var(--theme-top-bar-height); 14 | width: 100%; 15 | min-height: 100vh; 16 | margin: var(--theme-top-bar-height) auto 0; 17 | } 18 | } 19 | 20 | .ModalShowing { 21 | overflow: hidden; 22 | } 23 | 24 | .SidebarOut { 25 | @media @breakpoint-mobile-tablet { 26 | max-height: 100vh; 27 | overflow-y: hidden; 28 | } 29 | } 30 | 31 | .TwoToneContent { 32 | background: linear-gradient(to right, var(--secondary-bg), var(--secondary-bg) 50%, var(--quaternary-bg) 51%, var(--quaternary-bg)); 33 | 34 | @media @breakpoint-mobile-tablet { 35 | background: unset; 36 | } 37 | 38 | > footer > div:last-of-type { 39 | background: var(--quaternary-bg); 40 | } 41 | } 42 | 43 | 44 | body { 45 | @media @breakpoint-mobile-tablet { 46 | --is-mobile: true; 47 | } 48 | } -------------------------------------------------------------------------------- /packages/simplified/src/modules/ConnectAccount/assets/fortmaticIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/modules/ConnectAccount/assets/fortmaticIcon.png -------------------------------------------------------------------------------- /packages/simplified/src/modules/ConnectAccount/assets/metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/modules/ConnectAccount/assets/metamask.png -------------------------------------------------------------------------------- /packages/simplified/src/modules/ConnectAccount/assets/portisIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/simplified/src/modules/ConnectAccount/assets/portisIcon.png -------------------------------------------------------------------------------- /packages/simplified/src/modules/ConnectAccount/assets/x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/common/chevron-flip.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) '~assets/styles/shared'; 2 | 3 | .ChevronFlip { 4 | cursor: pointer; 5 | transition: transform 0.2s ease; 6 | width: @size-14; 7 | display: flex; 8 | 9 | &.pointDown { 10 | transform: rotate(-180deg); 11 | } 12 | 13 | > svg { 14 | display: flex; 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/common/chevron-flip.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classNames from 'classnames'; 3 | import Styles from './chevron-flip.styles.less'; 4 | import { Icons } from '@augurproject/comps'; 5 | 6 | const { ChevronFlipIcon } = Icons; 7 | 8 | interface ChevronFlipProps { 9 | pointDown?: boolean; 10 | } 11 | 12 | const ChevronFlip = ({ pointDown }: ChevronFlipProps) => ( 13 | 18 | {ChevronFlipIcon} 19 | 20 | ); 21 | 22 | export default ChevronFlip; 23 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/common/simple-footer.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Styles from "./simple-footer.styles.less"; 3 | import { Logo, LabelComps } from "@augurproject/comps"; 4 | import { ExternalLink } from "@augurproject/comps/build/utils/links/links"; 5 | const { VersionLabel } = LabelComps; 6 | 7 | export const SimpleFooter = () => ( 8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 | ); 19 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/common/top-banner.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) '~assets/styles/shared'; 2 | 3 | .TopBanner { 4 | .TertiaryBorderRadius; 5 | 6 | min-height: @size-148; 7 | height: @size-148; 8 | width: 100%; 9 | display: flex; 10 | align-items: center; 11 | justify-content: center; 12 | text-align: center; 13 | background-position: center center; 14 | background-repeat: no-repeat; 15 | background-size: cover; 16 | background-image: url("../../assets/images/top-banner-desktop.png"); // 1264px // 1023px // 959px 17 | 18 | > h1 { 19 | .text-36-semi-bold; 20 | 21 | margin: 0; 22 | color: var(--primary-bg); 23 | } 24 | 25 | @media @breakpoint-mobile-tablet { 26 | min-height: @size-85; 27 | border-radius: @size-6; 28 | height: @size-85; 29 | background-position-x: 40%; 30 | 31 | > h1 { 32 | .text-24-semi-bold; 33 | } 34 | } 35 | 36 | @media @breakpoint-mobile { 37 | background-position-x: 60%; 38 | background-image: url("../../assets/images/top-banner-mobile.png"); 39 | 40 | > h1 { 41 | .text-16-semi-bold; 42 | } 43 | } 44 | } 45 | 46 | :root[theme="DARK"] { 47 | .TopBanner > h1 { 48 | color: var(--primary-text); 49 | } 50 | } -------------------------------------------------------------------------------- /packages/simplified/src/modules/common/top-banner.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Styles from './top-banner.styles.less'; 3 | 4 | export const TopBanner = () => ( 5 |
6 |

7 | No Limits. Lower fees. 8 |
9 | Bet on anything you want. 10 |

11 |
12 | ); 13 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/modal/common.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import Styles from './modal.styles.less'; 4 | import { Icons, useAppStatusStore } from '@augurproject/comps'; 5 | 6 | export const Header = ({ title, subtitle = null, actionButton = null }) => { 7 | const { 8 | actions: { closeModal }, 9 | } = useAppStatusStore(); 10 | 11 | return ( 12 |
13 | {title} 14 | {subtitle && ( 15 |
16 | {subtitle.label} 17 | {subtitle.value} 18 |
19 | )} 20 | {actionButton} 21 | 22 |
23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/routes/authenticated-route.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router-dom'; 3 | 4 | interface AuthenticatedRouteProps { 5 | component: any; 6 | path: string; 7 | } 8 | 9 | const AuthenticatedRoute = ({ 10 | component: Component, 11 | ...rest 12 | }: AuthenticatedRouteProps) => { 13 | return ( 14 | 17 | 18 | } 19 | /> 20 | ); 21 | }; 22 | 23 | export default AuthenticatedRoute; 24 | -------------------------------------------------------------------------------- /packages/simplified/src/modules/routes/routes.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, Switch, Redirect, withRouter } from 'react-router-dom'; 3 | 4 | import { Utils } from '@augurproject/comps'; 5 | import MarketsView from '../markets/markets-view'; 6 | import MarketView from '../market/market-view'; 7 | import { 8 | MARKETS, 9 | MARKET, 10 | PORTFOLIO, 11 | LIQUIDITY, 12 | MARKET_LIQUIDITY, 13 | } from '../constants'; 14 | import PortfolioView from '../portfolio/portfolio-view'; 15 | import LiquidityView from '../liquidity/liquidity-view'; 16 | import MarketLiquidityView from '../liquidity/market-liquidity-view'; 17 | const { PathUtils: { makePath } } = Utils; 18 | 19 | const Routes = p => { 20 | return ( 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ); 30 | }; 31 | 32 | export default withRouter(Routes); 33 | -------------------------------------------------------------------------------- /packages/simplified/src/utils/get-usdc.ts: -------------------------------------------------------------------------------- 1 | import { USDC } from "modules/constants"; 2 | import { Cashes, Cash } from "@augurproject/comps/build/types"; 3 | 4 | export default function getUSDC(cashes: Cashes): Cash { 5 | return Object.entries(cashes).find((cash) => cash[1].name === USDC)[1]; 6 | } 7 | -------------------------------------------------------------------------------- /packages/simplified/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "build", 4 | "rootDir": "src", 5 | "lib": [ 6 | "es2015", 7 | "dom", 8 | "webworker", 9 | "es2018" 10 | ], 11 | "target": "es2018", 12 | "module": "CommonJS", 13 | "jsx": "react", 14 | "declarationMap": true, 15 | "downlevelIteration": true, 16 | "sourceMap": true, 17 | "experimentalDecorators": true, 18 | "watch": false, 19 | "strictNullChecks": false, 20 | "alwaysStrict": false, 21 | "strict": false, 22 | "noImplicitReturns": true, 23 | "noImplicitThis": true, 24 | "skipLibCheck": true, 25 | "declaration": true, 26 | "noImplicitAny": false, 27 | "allowSyntheticDefaultImports": true, 28 | "baseUrl": "src", 29 | "moduleResolution": "node", 30 | "paths": { 31 | "assets/*": [ 32 | "./assets/*" 33 | ], 34 | "modules/*": [ 35 | "./modules/*" 36 | ], 37 | "services/*": [ 38 | "./services/*" 39 | ], 40 | "utils/*": [ 41 | "./utils/*" 42 | ] 43 | }, 44 | "esModuleInterop": true, 45 | "resolveJsonModule": false 46 | }, 47 | "include": [ 48 | "./src" 49 | ], 50 | "exclude": [ 51 | "./src/**/*.test.ts" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /packages/smart/.gitignore: -------------------------------------------------------------------------------- 1 | #Hardhat files 2 | cache 3 | artifacts 4 | types 5 | dist 6 | 7 | # typechain 8 | typechain 9 | 10 | # abis 11 | abi 12 | 13 | environments/undefined.json 14 | -------------------------------------------------------------------------------- /packages/smart/contracts/balancer/BColor.sol: -------------------------------------------------------------------------------- 1 | // This program is free software: you can redistribute it and/or modify 2 | // it under the terms of the GNU General Public License as published by 3 | // the Free Software Foundation, either version 3 of the License, or 4 | // (at your option) any later version. 5 | 6 | // This program is distributed in the hope that it will be useful, 7 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | // GNU General Public License for more details. 10 | 11 | // You should have received a copy of the GNU General Public License 12 | // along with this program. If not, see . 13 | 14 | // SPDX-License-Identifier: MIT 15 | pragma solidity 0.7.6; 16 | 17 | interface BColor { 18 | function getColor() external view returns (bytes32); 19 | } 20 | 21 | contract BBronze is BColor { 22 | function getColor() external pure override returns (bytes32) { 23 | return bytes32("BRONZE"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/smart/contracts/balancer/BPoolForTesting.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | import "./BFactory.sol"; 5 | import "../libraries/IERC20Full.sol"; 6 | import "../libraries/Cash.sol"; 7 | 8 | contract BPoolForTesting { 9 | BFactory private bFactory; 10 | BPool private bPool; 11 | uint256 private constant MAX_UINT = 2**256 - 1; 12 | 13 | constructor(BFactory _bFactory) { 14 | bFactory = _bFactory; 15 | } 16 | 17 | function createBPoolForTesting( 18 | Cash[] calldata _tokens, 19 | uint256[] calldata _initialLiquidity, 20 | uint256[] calldata _weights 21 | ) external returns (BPool) { 22 | require( 23 | _tokens.length == _weights.length && _tokens.length == _initialLiquidity.length, 24 | "Tokens, weights and initial liquidity should all have the same length." 25 | ); 26 | 27 | bPool = bFactory.newBPool(); 28 | 29 | for (uint256 i = 0; i < _tokens.length; i++) { 30 | _tokens[i].approve(address(bPool), MAX_UINT); 31 | bPool.bind(address(_tokens[i]), _initialLiquidity[i], _weights[i]); 32 | } 33 | 34 | bPool.finalize(); 35 | 36 | return bPool; 37 | } 38 | 39 | function getBPool() external view returns (BPool) { 40 | return bPool; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/smart/contracts/balancer/Migrations.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | contract Migrations { 5 | address public owner; 6 | uint256 public lastCompletedMigration; 7 | 8 | constructor() { 9 | owner = msg.sender; 10 | } 11 | 12 | modifier restricted() { 13 | if (msg.sender == owner) _; 14 | } 15 | 16 | function setCompleted(uint256 completed) external restricted { 17 | lastCompletedMigration = completed; 18 | } 19 | 20 | function upgrade(address new_address) external restricted { 21 | Migrations upgraded = Migrations(new_address); 22 | upgraded.setCompleted(lastCompletedMigration); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/smart/contracts/chainlink/TheRundownChainlink.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | import "@chainlink/contracts/src/v0.7/ChainlinkClient.sol"; 4 | 5 | contract TheRundownChainlink is ChainlinkClient { 6 | using Chainlink for Chainlink.Request; 7 | 8 | uint256 public score; 9 | address private oracle; 10 | bytes32 private jobId; 11 | uint256 private fee; 12 | 13 | constructor() { 14 | setPublicChainlinkToken(); 15 | oracle = 0x56dd6586DB0D08c6Ce7B2f2805af28616E082455; 16 | jobId = "dbb65efc02d34cddb920eca1bec22ade"; 17 | fee = 10**17; 18 | } 19 | 20 | function requestScore(string memory _matchId) public { 21 | Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector); 22 | request.add("matchId", _matchId); 23 | sendChainlinkRequestTo(oracle, request, fee); 24 | } 25 | 26 | function fulfill(bytes32 _requestId, uint256 _score) public recordChainlinkFulfillment(_requestId) { 27 | score = _score; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/Cash.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | /** 7 | * @title Cash 8 | * @dev Test contract for collateral 9 | */ 10 | contract Cash is ERC20 { 11 | uint8 private _decimals; 12 | 13 | constructor( 14 | string memory name_, 15 | string memory symbol_, 16 | uint8 decimals_ 17 | ) ERC20(name_, symbol_) { 18 | _decimals = decimals_; 19 | } 20 | 21 | function decimals() public view virtual override(ERC20) returns (uint8) { 22 | return _decimals; 23 | } 24 | 25 | function faucet(uint256 _amount) public returns (bool) { 26 | _mint(msg.sender, _amount); 27 | return true; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/IERC20Full.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 5 | 6 | interface IERC20Full is IERC20 { 7 | function name() external view returns (string memory); 8 | 9 | function symbol() external view returns (string memory); 10 | 11 | function decimals() external view returns (uint8); 12 | } 13 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/IOwnable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | interface IOwnable { 5 | function getOwner() external view returns (address); 6 | 7 | function transferOwnership(address _newOwner) external returns (bool); 8 | } 9 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/ITyped.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | interface ITyped { 5 | function getTypeName() external view returns (bytes32); 6 | } 7 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/Initializable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | contract Initializable { 5 | bool private initialized = false; 6 | 7 | modifier beforeInitialized { 8 | require(!initialized); 9 | _; 10 | } 11 | 12 | function endInitialization() internal beforeInitialized { 13 | initialized = true; 14 | } 15 | 16 | function getInitialized() public view returns (bool) { 17 | return initialized; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/LineHelper.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | abstract contract LineHelper { 5 | function build1Line() internal pure returns (int256[] memory _lines) { 6 | _lines = new int256[](1); 7 | } 8 | 9 | function build3Lines(int256 _homeSpread, int256 _totalScore) internal pure returns (int256[] memory _lines) { 10 | _lines = new int256[](3); 11 | // 0 is the Head-to-Head market, which has no lines 12 | _lines[1] = addHalfPoint(_homeSpread); 13 | _lines[2] = addHalfPoint(_totalScore); 14 | } 15 | 16 | function addHalfPoint(int256 _line) internal pure returns (int256) { 17 | // The line is a quantity of tenths. So 55 is 5.5 and -6 is -60. 18 | // If the line is a whole number then make it a half point more extreme, to eliminate ties. 19 | // So 50 becomes 55, -60 becomes -65, and 0 becomes 5. 20 | if (_line >= 0 && _line % 10 == 0) { 21 | return _line + 5; 22 | } else if (_line < 0 && (-_line) % 10 == 0) { 23 | return _line - 5; 24 | } else { 25 | return _line; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/ManagedByLink.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | import "./Ownable.sol"; 5 | 6 | abstract contract ManagedByLink is Ownable { 7 | event LinkNodeChanged(address newLinkNode); 8 | 9 | address public linkNode; 10 | 11 | constructor(address _linkNode) { 12 | linkNode = _linkNode; 13 | } 14 | 15 | function setLinkNode(address _newLinkNode) external onlyOwner { 16 | linkNode = _newLinkNode; 17 | emit LinkNodeChanged(_newLinkNode); 18 | } 19 | 20 | modifier onlyLinkNode() { 21 | require(msg.sender == linkNode); 22 | _; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/PlaceholderReputationToken.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | /** 7 | * @title Cash 8 | * @dev Test contract for collateral 9 | */ 10 | contract PlaceholderReputationToken is ERC20 { 11 | uint8 private _decimals; 12 | 13 | constructor( 14 | string memory name_, 15 | string memory symbol_, 16 | uint8 decimals_ 17 | ) ERC20(name_, symbol_) { 18 | _decimals = decimals_; 19 | } 20 | 21 | function decimals() public view virtual override(ERC20) returns (uint8) { 22 | return _decimals; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/ResolveByFiat.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | pragma abicoder v2; 4 | 5 | import "./Sport.sol"; 6 | import "./ManagedByLink.sol"; 7 | 8 | abstract contract ResolvesByFiat is Sport, ManagedByLink { 9 | function resolveEvent( 10 | uint256 _eventId, 11 | SportsEventStatus _eventStatus, 12 | uint256 _homeTeamId, // for verifying team stability 13 | uint256 _awayTeamId, // for verifying team stability 14 | uint256 _whoWon 15 | ) public onlyLinkNode { 16 | SportsEvent storage _event = sportsEvents[_eventId]; 17 | 18 | require(_event.status == SportsEventStatus.Scheduled); 19 | require(SportsEventStatus(_eventStatus) != SportsEventStatus.Scheduled); 20 | 21 | if (eventIsNoContest(_event, _eventStatus, _homeTeamId, _awayTeamId, _whoWon)) { 22 | resolveInvalidEvent(_eventId); 23 | } else { 24 | resolveValidEvent(_event, _whoWon); 25 | } 26 | 27 | sportsEvents[_eventId].status = _eventStatus; 28 | } 29 | 30 | function resolveValidEvent(SportsEvent memory _event, uint256 _whoWon) internal virtual; 31 | } 32 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/Rewardable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | abstract contract Rewardable { 5 | // Rewards will be paid out over the lifetime of an event. 6 | // An value of zero will start rewards immediately and proceed based on the values set in master chef. 7 | 8 | // _Id here is the market id passed to the amm factory when creating a pool. 9 | function getRewardEndTime(uint256 _marketId) public view virtual returns (uint256); 10 | } 11 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/TokenNamesFromTeams.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | pragma abicoder v2; 4 | 5 | import "./Sport.sol"; 6 | 7 | abstract contract TokenNamesFromTeams is Sport { 8 | uint256 constant Away = 1; 9 | uint256 constant Home = 2; 10 | 11 | function makeSportsMarket( 12 | string memory _noContestName, 13 | string memory _homeTeamName, 14 | string memory _awayTeamName, 15 | uint256[] memory _odds 16 | ) internal returns (uint256) { 17 | string[] memory _outcomeNames = makeOutcomeNames(_noContestName, _homeTeamName, _awayTeamName); 18 | return startMarket(msg.sender, _outcomeNames, _odds, true); 19 | } 20 | 21 | function makeOutcomeNames( 22 | string memory _noContestName, 23 | string memory _homeTeamName, 24 | string memory _awayTeamName 25 | ) private pure returns (string[] memory _names) { 26 | _names = new string[](3); 27 | _names[NoContest] = _noContestName; 28 | _names[Away] = _awayTeamName; 29 | _names[Home] = _homeTeamName; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/smart/contracts/libraries/Versioned.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | abstract contract Versioned { 5 | string internal version; 6 | 7 | constructor(string memory _version) { 8 | version = _version; 9 | } 10 | 11 | function getVersion() public view returns (string memory) { 12 | return version; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/smart/contracts/turbo/OwnedShareToken.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | import "../libraries/Ownable.sol"; 6 | 7 | contract OwnedERC20 is ERC20, Ownable { 8 | constructor( 9 | string memory name_, 10 | string memory symbol_, 11 | address _owner 12 | ) ERC20(name_, symbol_) { 13 | owner = _owner; 14 | } 15 | 16 | function trustedTransfer( 17 | address _from, 18 | address _to, 19 | uint256 _amount 20 | ) external onlyOwner { 21 | _transfer(_from, _to, _amount); 22 | } 23 | 24 | function trustedMint(address _target, uint256 _amount) external onlyOwner { 25 | _mint(_target, _amount); 26 | } 27 | 28 | function trustedBurn(address _target, uint256 _amount) external onlyOwner { 29 | _burn(_target, _amount); 30 | } 31 | 32 | function trustedBurnAll(address _target) external onlyOwner returns (uint256) { 33 | uint256 _balance = balanceOf(_target); 34 | _burn(_target, _balance); 35 | return _balance; 36 | } 37 | 38 | function onTransferOwnership(address, address) internal override {} 39 | } 40 | -------------------------------------------------------------------------------- /packages/smart/contracts/turbo/TurboShareTokenFactory.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity 0.7.6; 3 | pragma abicoder v2; 4 | 5 | import "./OwnedShareToken.sol"; 6 | 7 | abstract contract TurboShareTokenFactory { 8 | function createShareTokens(string[] memory _names, address _owner) internal returns (OwnedERC20[] memory) { 9 | uint256 _numOutcomes = _names.length; 10 | OwnedERC20[] memory _tokens = new OwnedERC20[](_numOutcomes); 11 | 12 | for (uint256 _i = 0; _i < _numOutcomes; _i++) { 13 | _tokens[_i] = new OwnedERC20(_names[_i], _names[_i], _owner); 14 | } 15 | return _tokens; 16 | } 17 | } 18 | 19 | abstract contract TurboShareTokenFactoryV1 { 20 | function createShareTokens( 21 | string[] memory _names, 22 | string[] memory _symbols, 23 | address _owner 24 | ) internal returns (OwnedERC20[] memory) { 25 | uint256 _numOutcomes = _names.length; 26 | OwnedERC20[] memory _tokens = new OwnedERC20[](_numOutcomes); 27 | 28 | for (uint256 _i = 0; _i < _numOutcomes; _i++) { 29 | _tokens[_i] = new OwnedERC20(_names[_i], _symbols[_i], _owner); 30 | } 31 | return _tokens; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/smart/deploy/000_externals_for_testing/000_deploy_collateral_token.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | if (!(await deployments.getOrNull("Collateral"))) { 9 | await deployments.deploy("Collateral", { 10 | contract: "Cash", 11 | from: deployer, 12 | args: ["USDC", "USDC", 6], 13 | log: true, 14 | }); 15 | } 16 | }; 17 | 18 | func.tags = ["Tokens", "CollateralToken", "Test"]; 19 | 20 | export default func; 21 | -------------------------------------------------------------------------------- /packages/smart/deploy/000_externals_for_testing/001_deploy_reputation_token.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | if (!(await deployments.getOrNull("Reputation"))) { 9 | await deployments.deploy("Reputation", { 10 | // contract: "Cash", 11 | contract: "PlaceholderReputationToken", 12 | from: deployer, 13 | args: ["PlaceholderReputationToken", "PlaceholderReputationToken", 18], 14 | // args: ["REPv2", "REPv2", 18], 15 | log: true, 16 | }); 17 | } 18 | }; 19 | 20 | func.tags = ["Tokens", "ReputationToken", "Test"]; 21 | 22 | export default func; 23 | -------------------------------------------------------------------------------- /packages/smart/deploy/000_externals_for_testing/002_deploy_balancer_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | if (!(await deployments.getOrNull("BFactory"))) { 9 | await deployments.deploy("BFactory", { 10 | from: deployer, 11 | args: [], 12 | log: true, 13 | }); 14 | } 15 | }; 16 | 17 | func.tags = ["BFactory", "Test"]; 18 | 19 | export default func; 20 | -------------------------------------------------------------------------------- /packages/smart/deploy/000_externals_for_testing/003_deploy_fake_price_feeds.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { PRICE_FEEDS } from "../../src"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | const { deployments, getNamedAccounts } = hre; 7 | const { deployer } = await getNamedAccounts(); 8 | 9 | const version = 3; // arbitrary 10 | for (const coin of PRICE_FEEDS) { 11 | if (!(await deployments.getOrNull(coin.deploymentName))) { 12 | await deployments.deploy(coin.deploymentName, { 13 | contract: "FakePriceFeed", 14 | from: deployer, 15 | args: [coin.decimals, coin.description, version], 16 | log: true, 17 | }); 18 | } 19 | } 20 | }; 21 | 22 | func.tags = ["PriceFeeds", "Test"]; 23 | 24 | export default func; 25 | -------------------------------------------------------------------------------- /packages/smart/deploy/000_externals_for_testing/004_set_fake_price_feeds.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { FakePriceFeed__factory } from "../../typechain"; 4 | import { PRICE_FEEDS } from "../../src"; 5 | 6 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 7 | const { deployments, getNamedAccounts } = hre; 8 | const { deployer } = await getNamedAccounts(); 9 | 10 | const signer = await hre.ethers.getSigner(deployer); 11 | 12 | for (const { deploymentName, symbol, price } of PRICE_FEEDS) { 13 | const { address } = await deployments.get(deploymentName); 14 | const priceFeed = FakePriceFeed__factory.connect(address, signer); 15 | 16 | const data = await priceFeed.latestRoundData(); 17 | 18 | if (!data._answer.eq(0)) { 19 | if (hre.network.config.live) console.log(`Skipping setting price feed for ${symbol} because it's already set`); 20 | continue; 21 | } 22 | 23 | if (hre.network.config.live) console.log(`Setting price feed for ${symbol} to ${price}`); 24 | await priceFeed.addRound(1, price, 2, 4, 1); // arbitrary values 25 | } 26 | }; 27 | 28 | func.tags = ["SetPriceFeeds", "Test"]; 29 | func.dependencies = ["PriceFeeds"]; 30 | 31 | export default func; 32 | -------------------------------------------------------------------------------- /packages/smart/deploy/000_externals_for_testing/005_deploy_rewards_tokens.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | if (!(await deployments.getOrNull("WrappedMatic"))) { 9 | await deployments.deploy("WrappedMatic", { 10 | contract: "Cash", 11 | from: deployer, 12 | args: ["WMATIC", "WMATIC", 18], 13 | log: true, 14 | }); 15 | } 16 | }; 17 | 18 | func.tags = ["RewardsTokens", "Test"]; 19 | 20 | export default func; 21 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/000_deploy_fee_pot.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | const collateral = (await deployments.get("Collateral")).address; 9 | const reputationToken = (await deployments.get("Reputation")).address; 10 | 11 | await deployments.deploy("FeePot", { 12 | from: deployer, 13 | args: [collateral, reputationToken], 14 | log: true, 15 | }); 16 | }; 17 | 18 | func.tags = ["FeePot"]; 19 | func.dependencies = ["Tokens"]; 20 | 21 | export default func; 22 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/010_deploy_NBA_market_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { deployMarketFactory } from "../../src/utils/deploy"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | await deployMarketFactory(hre, "NBAMarketFactoryV3"); 7 | }; 8 | 9 | func.tags = ["Sports", "NBAMarketFactory", "MLBMarketFactory", "MMAMarketFactory", "NFLMarketFactory"]; 10 | func.dependencies = ["Tokens", "FeePot", "BFactory"]; 11 | 12 | export default func; 13 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/011_deploy_MLB_market_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { deployMarketFactory } from "../../src/utils/deploy"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | await deployMarketFactory(hre, "MLBMarketFactoryV3"); 7 | }; 8 | 9 | func.tags = ["Sports", "MLBMarketFactory"]; 10 | func.dependencies = ["Tokens", "FeePot", "BFactory"]; 11 | 12 | export default func; 13 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/012_deploy_MMA_market_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { deployMarketFactory } from "../../src/utils/deploy"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | await deployMarketFactory(hre, "MMAMarketFactoryV3"); 7 | }; 8 | 9 | func.tags = ["Sports", "MMAMarketFactory"]; 10 | func.dependencies = ["Tokens", "FeePot", "BFactory"]; 11 | 12 | export default func; 13 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/013_deploy_NFL_market_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { deployMarketFactory } from "../../src/utils/deploy"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | await deployMarketFactory(hre, "NFLMarketFactoryV3"); 7 | }; 8 | 9 | func.tags = ["Sports", "NFLMarketFactory"]; 10 | func.dependencies = ["Tokens", "FeePot", "BFactory"]; 11 | 12 | export default func; 13 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/014_deploy_crypto_prices_market_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { getCollateral, getFees } from "../../src/utils/deploy"; 4 | import { CryptoCurrencyMarketFactoryV3__factory } from "../../typechain"; 5 | 6 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 7 | const { deployments, getNamedAccounts } = hre; 8 | const { deployer, linkNode, protocol } = await getNamedAccounts(); 9 | 10 | const { collateralAddress, shareFactor } = await getCollateral(deployments); 11 | const { address: feePotAddress } = await deployments.get("FeePot"); 12 | const fees = getFees(); 13 | 14 | const args: Parameters = [ 15 | deployer, // initial owner must be deployer for coins to be addable 16 | collateralAddress, 17 | shareFactor, 18 | feePotAddress, 19 | fees, 20 | protocol, 21 | linkNode, 22 | ]; 23 | 24 | await deployments.deploy("CryptoCurrencyMarketFactoryV3", { 25 | contract: "CryptoCurrencyMarketFactoryV3", 26 | from: deployer, 27 | args, 28 | log: true, 29 | }); 30 | }; 31 | 32 | func.tags = ["CryptoMarketFactory", "Crypto"]; 33 | func.dependencies = ["Tokens", "FeePot", "BFactory"]; 34 | 35 | export default func; 36 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/015_deploy_grouped_market_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { GroupedMarketFactoryV3__factory } from "../../typechain"; 4 | import { getCollateral, getFees } from "../../src/utils/deploy"; 5 | 6 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 7 | const { deployments, getNamedAccounts } = hre; 8 | const { deployer, linkNode, protocol, owner } = await getNamedAccounts(); 9 | 10 | const { collateralAddress, shareFactor } = await getCollateral(deployments); 11 | const { address: feePotAddress } = await deployments.get("FeePot"); 12 | const fees = getFees(); 13 | 14 | const args: Parameters = [ 15 | owner, 16 | collateralAddress, 17 | shareFactor, 18 | feePotAddress, 19 | fees, 20 | protocol, 21 | linkNode, 22 | ]; 23 | 24 | await deployments.deploy("GroupedMarketFactoryV3", { 25 | contract: "GroupedMarketFactoryV3", 26 | from: deployer, 27 | args, 28 | log: true, 29 | }); 30 | }; 31 | 32 | func.tags = ["GroupedMarketFactory", "Grouped"]; 33 | func.dependencies = ["Tokens", "FeePot", "BFactory"]; 34 | 35 | export default func; 36 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/100_deploy_sports_fetcher.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | // all sports can use the same fetcher 9 | await deployments.deploy("NBAFetcher", { 10 | from: deployer, 11 | args: [], 12 | log: true, 13 | }); 14 | }; 15 | 16 | func.tags = ["Sports", "Fetcher"]; 17 | func.dependencies = []; 18 | 19 | export default func; 20 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/101_deploy_crypto_fetcher.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | await deployments.deploy("CryptoCurrencyFetcher", { 9 | from: deployer, 10 | args: [], 11 | log: true, 12 | }); 13 | }; 14 | 15 | func.tags = ["Crypto", "Fetcher"]; 16 | func.dependencies = []; 17 | 18 | export default func; 19 | -------------------------------------------------------------------------------- /packages/smart/deploy/001_market_factories/102_deploy_grouped_fetcher.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | await deployments.deploy("GroupedFetcher", { 9 | from: deployer, 10 | args: [], 11 | log: true, 12 | }); 13 | }; 14 | 15 | func.tags = ["Grouped", "Fetcher"]; 16 | func.dependencies = []; 17 | 18 | export default func; 19 | -------------------------------------------------------------------------------- /packages/smart/deploy/002_trading/000_deploy_master_chef.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { MasterChef__factory } from "../../typechain"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | const { deployments, getNamedAccounts } = hre; 7 | const { deployer } = await getNamedAccounts(); 8 | 9 | const { address: wrappedMaticAddress } = await deployments.get("WrappedMatic"); 10 | 11 | const args: Parameters = [wrappedMaticAddress]; 12 | 13 | await deployments.deploy("MasterChef", { 14 | from: deployer, 15 | args, 16 | log: true, 17 | }); 18 | }; 19 | 20 | func.tags = ["MasterChef"]; 21 | func.dependencies = ["RewardsTokens"]; 22 | 23 | export default func; 24 | -------------------------------------------------------------------------------- /packages/smart/deploy/002_trading/001_deploy_amm_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { BigNumber } from "ethers"; 4 | 5 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 6 | const { deployments, getNamedAccounts } = hre; 7 | const { deployer } = await getNamedAccounts(); 8 | 9 | const { address: balancerFactoryAddress } = await deployments.get("BFactory"); 10 | 11 | const BONE = BigNumber.from(10).pow(18); 12 | const swapFee = BONE.div(BigNumber.from(10).pow(6)); // The bpool min fee 13 | 14 | await deployments.deploy("AMMFactory", { 15 | from: deployer, 16 | args: [balancerFactoryAddress, swapFee], 17 | log: true, 18 | }); 19 | }; 20 | 21 | func.tags = ["AMMFactory"]; 22 | func.dependencies = ["BFactory"]; 23 | 24 | export default func; 25 | -------------------------------------------------------------------------------- /packages/smart/deploy/002_trading/002_evenTheOdds.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | 4 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 5 | const { deployments, getNamedAccounts } = hre; 6 | const { deployer } = await getNamedAccounts(); 7 | 8 | await deployments.deploy("EvenTheOdds", { 9 | from: deployer, 10 | log: true, 11 | }); 12 | }; 13 | 14 | func.tags = ["EvenTheOdds"]; 15 | func.dependencies = []; 16 | 17 | export default func; 18 | -------------------------------------------------------------------------------- /packages/smart/deploy/002_trading/100_trust_amm_factory.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { makeSigner } from "../../tasks"; 4 | import { MasterChef__factory } from "../../typechain"; 5 | 6 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 7 | const { deployments } = hre; 8 | const signer = await makeSigner(hre); 9 | 10 | const { address: masterChefAddress } = await deployments.get("MasterChef"); 11 | const { address: ammFactoryAddress } = await deployments.get("AMMFactory"); 12 | 13 | const masterChef = MasterChef__factory.connect(masterChefAddress, signer); 14 | await masterChef.trustAMMFactory(ammFactoryAddress); 15 | }; 16 | 17 | func.tags = ["trustAMMFactory"]; 18 | func.dependencies = ["AMMFactory", "MasterChef"]; 19 | 20 | export default func; 21 | -------------------------------------------------------------------------------- /packages/smart/deploy/002_trading/101_fund_master_chef.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 2 | import { DeployFunction } from "hardhat-deploy/types"; 3 | import { makeSigner } from "../../tasks"; 4 | import { Cash__factory } from "../../typechain"; 5 | import { BigNumber } from "ethers"; 6 | 7 | // Send 2k fake rewards bucks. 8 | const AMOUNT_TO_SEND_TO_MASTER_CHEF = BigNumber.from(10).pow(18).mul(2000); 9 | 10 | const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { 11 | const { deployments } = hre; 12 | 13 | const signer = await makeSigner(hre); 14 | const masterChefDeploy = await deployments.get("MasterChef"); 15 | const wrappedMaticDeploy = await deployments.get("WrappedMatic"); 16 | 17 | const wrappedMatic = Cash__factory.connect(wrappedMaticDeploy.address, signer); 18 | 19 | try { 20 | await wrappedMatic.faucet(AMOUNT_TO_SEND_TO_MASTER_CHEF); 21 | await wrappedMatic.transfer(masterChefDeploy.address, AMOUNT_TO_SEND_TO_MASTER_CHEF); 22 | 23 | console.log("Successfully fauceted and transferred rewards to master chef."); 24 | } catch (e) { 25 | console.log("Unable to faucet and transfer rewards to master chef. This will only be successful on test networks."); 26 | } 27 | }; 28 | 29 | func.tags = ["FundMasterChef", "Test"]; 30 | func.dependencies = ["MasterChef", "Tokens"]; 31 | 32 | export default func; 33 | -------------------------------------------------------------------------------- /packages/smart/deployments/.gitignore: -------------------------------------------------------------------------------- 1 | localhost 2 | -------------------------------------------------------------------------------- /packages/smart/deployments/kovan/.chainId: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /packages/smart/deployments/maticMainnet/.chainId: -------------------------------------------------------------------------------- 1 | 137 -------------------------------------------------------------------------------- /packages/smart/deployments/maticMumbai/.chainId: -------------------------------------------------------------------------------- 1 | 80001 -------------------------------------------------------------------------------- /packages/smart/hardhat.typechain.config.ts: -------------------------------------------------------------------------------- 1 | // This file is needed because many of our hardhat tasks rely on typechain, creating a circular dependency. 2 | 3 | import "hardhat-typechain"; 4 | 5 | import { HardhatUserConfig } from "hardhat/config"; 6 | 7 | const config: HardhatUserConfig = { 8 | solidity: { 9 | compilers: [ 10 | { 11 | version: "0.7.6", 12 | settings: { 13 | optimizer: { 14 | enabled: true, 15 | runs: 200, 16 | }, 17 | }, 18 | }, 19 | { 20 | version: "0.6.12", 21 | settings: { 22 | optimizer: { 23 | enabled: true, 24 | runs: 200, 25 | }, 26 | }, 27 | }, 28 | { 29 | version: "0.6.0", 30 | settings: { 31 | optimizer: { 32 | enabled: true, 33 | runs: 200, 34 | }, 35 | }, 36 | }, 37 | { 38 | version: "0.5.15", 39 | settings: { 40 | optimizer: { 41 | enabled: true, 42 | runs: 200, 43 | }, 44 | }, 45 | }, 46 | ], 47 | }, 48 | }; 49 | 50 | export default config; 51 | -------------------------------------------------------------------------------- /packages/smart/src/calcShareFactor.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber, BigNumberish } from "ethers"; 2 | 3 | // Decimals is the decimals of the collateral. Usually 18; is 6 for USDC. 4 | export function calcShareFactor(decimals: BigNumberish): BigNumber { 5 | decimals = BigNumber.from(decimals); 6 | const power = decimals.gte(18) ? 0 : BigNumber.from(18).sub(decimals); 7 | return BigNumber.from(10).pow(power); 8 | } 9 | -------------------------------------------------------------------------------- /packages/smart/src/fetcher/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./sport"; 2 | export * from "./crypto"; 3 | export * from "./group"; 4 | export * from "./cryptoCurrency"; 5 | -------------------------------------------------------------------------------- /packages/smart/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./calcShareFactor"; 2 | export * from "./EthersFastSubmitWallet"; 3 | export * from "./utils/constants"; 4 | export * from "./utils/common-functions"; 5 | export * from "./utils/price-feed"; 6 | export * from "./utils/crypto-timing"; 7 | export * from "./utils/round-management"; 8 | export * from "./fetcher"; 9 | -------------------------------------------------------------------------------- /packages/smart/src/utils/common-functions.ts: -------------------------------------------------------------------------------- 1 | export function mapOverObject( 2 | o: { [k: string]: V1 }, 3 | fn: (k: string, v: V1) => [string, V2] | void 4 | ): { [k: string]: V2 } { 5 | const o2: { [k: string]: V2 } = {}; 6 | for (const key in o) { 7 | const value = o[key]; 8 | const kv = fn(key, value); 9 | if (kv === undefined) continue; 10 | const [k, v] = kv; 11 | if (k !== undefined) { 12 | o2[k] = v; 13 | } 14 | } 15 | return o2; 16 | } 17 | 18 | export async function sleep(milliseconds: number): Promise { 19 | return new Promise((resolve) => setTimeout(resolve, milliseconds)); 20 | } 21 | 22 | export type UnPromisify = T extends Promise ? U : T; 23 | 24 | export function flatten(...arrays: T[][]): T[] { 25 | return arrays.reduce((flat, array) => flat.concat(array), []); 26 | } 27 | 28 | // This is intentionally extremely generic, but tslint hates that. 29 | // eslint-disable-next-line 30 | export type TypeOfClassMethod = T[M] extends Function ? T[M] : never; 31 | 32 | export function repeat(thing: T, n: number): T[] { 33 | return Array.from({ length: n }).map(() => thing); 34 | } 35 | 36 | export function range(inclusiveMin: number, exclusiveMax: number): number[] { 37 | return [...new Array(exclusiveMax - inclusiveMin).keys()].map((i) => i + inclusiveMin); 38 | } 39 | -------------------------------------------------------------------------------- /packages/smart/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "ethers"; 2 | 3 | export const NULL_ADDRESS = "0x0000000000000000000000000000000000000000"; 4 | export const DEAD_ADDRESS = "0x000000000000000000000000000000000000DEAD"; 5 | 6 | export enum SportsLinkMarketType { 7 | HeadToHead, 8 | Spread, 9 | OverUnder, 10 | } 11 | export enum SportsLinkEventStatus { 12 | Unknown, 13 | Scheduled, 14 | Final, 15 | Postponed, 16 | Canceled, 17 | } 18 | 19 | export enum MMAWhoWon { 20 | Unknown, 21 | Home, 22 | Away, 23 | Draw, 24 | } 25 | 26 | export enum CryptoMarketType { 27 | PriceUpTo, 28 | } 29 | 30 | export const MAX_UINT256 = ethers.BigNumber.from(2).pow(256).sub(1); 31 | -------------------------------------------------------------------------------- /packages/smart/src/utils/crypto-timing.ts: -------------------------------------------------------------------------------- 1 | import { DateTime } from "luxon"; 2 | 3 | export function getUpcomingFriday4pmET(): number { 4 | const nowEastern = DateTime.now().setZone("America/New_York"); 5 | const thisWeek = nowEastern.set({ weekday: 5, hour: 16, minute: 0, second: 0, millisecond: 0 }); 6 | const past = thisWeek.diff(nowEastern).milliseconds < 0; 7 | const when = past ? thisWeek.plus({ week: 1 }) : thisWeek; 8 | return when.toSeconds(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/smart/src/utils/round-management.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber, BigNumberish } from "ethers"; 2 | 3 | export class RoundManagement { 4 | readonly phase: BigNumber; 5 | readonly justRound: BigNumber; 6 | 7 | constructor(phase: BigNumberish, justRound: BigNumberish) { 8 | this.phase = BigNumber.from(phase); 9 | this.justRound = BigNumber.from(justRound); 10 | } 11 | 12 | public get id(): BigNumber { 13 | return this.phase.shl(64).or(this.justRound); 14 | } 15 | 16 | public nextRound(): RoundManagement { 17 | return new RoundManagement(this.phase, this.justRound.add(1)); 18 | } 19 | 20 | public prevRound(): RoundManagement { 21 | return new RoundManagement(this.phase, this.justRound.sub(1)); 22 | } 23 | 24 | static decode(roundId: BigNumberish): RoundManagement { 25 | roundId = BigNumber.from(roundId); 26 | const phase = roundId.shr(64); 27 | const justRoundId = roundId.sub(phase.shl(64)); 28 | return new RoundManagement(phase, justRoundId); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/smart/tasks/accounts.ts: -------------------------------------------------------------------------------- 1 | import { task } from "hardhat/config"; 2 | 3 | // This is a sample Hardhat task. To learn how to create your own go to 4 | // https://hardhat.org/guides/create-task.html 5 | task("accounts", "Prints the list of accounts", async (args, hre) => { 6 | const accounts = await hre.ethers.getSigners(); 7 | 8 | for (const account of accounts) { 9 | console.log(account.address); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /packages/smart/tasks/balance.ts: -------------------------------------------------------------------------------- 1 | import { task } from "hardhat/config"; 2 | 3 | task("balance", "Prints an account's balance") 4 | .addParam("account", "The account's address") 5 | .setAction(async (args, hre) => { 6 | const { ethers } = hre; 7 | const provider = ethers.getDefaultProvider(); 8 | const isAddress = ethers.utils.isAddress(args.account); 9 | if (!isAddress) throw new Error(`${args.account} is not a valid address`); 10 | const account = ethers.utils.getAddress(args.account); 11 | const balance = await provider.getBalance(account); 12 | console.log(ethers.utils.formatEther(balance)); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/smart/tasks/fundLink.ts: -------------------------------------------------------------------------------- 1 | import { task, types } from "hardhat/config"; 2 | 3 | import "hardhat/types/config"; 4 | import { makeSigner } from "./deploy"; 5 | import { LinkTokenInterface__factory } from "../typechain"; 6 | 7 | task("fundLink", "Send 1 link to a contract on kovan") 8 | .addParam("contract", undefined, undefined, types.string) 9 | .setAction(async ({ contract: contractAddress }, hre) => { 10 | if (typeof contractAddress !== "string") return; 11 | const { ethers } = hre; 12 | const signer = await makeSigner(hre); 13 | 14 | const linkTokenAddress = "0xa36085F69e2889c224210F603D836748e7dC0088"; 15 | const amount = ethers.BigNumber.from(10).pow(18); 16 | const linkToken = LinkTokenInterface__factory.connect(linkTokenAddress, signer); 17 | 18 | await linkToken.transfer(contractAddress, amount).then(async (tx) => { 19 | await tx.wait(); 20 | console.log("Contract ", contractAddress, " funded with LINK. Transaction Hash: ", tx.hash); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /packages/smart/tasks/getOwner.ts: -------------------------------------------------------------------------------- 1 | import { task, types } from "hardhat/config"; 2 | 3 | import "hardhat/types/config"; 4 | import { AbstractMarketFactoryV2, buildContractInterfaces, ContractInterfaces } from ".."; 5 | import { makeSigner } from "./deploy"; 6 | 7 | task("getOwner", "Set owner for market factory") 8 | .addParam("index", "index of market factory to use, in addresses.ts", undefined, types.int) 9 | .setAction(async ({ index }, hre) => { 10 | const { ethers } = hre; 11 | 12 | const signer = await makeSigner(hre); 13 | const network = await ethers.provider.getNetwork(); 14 | const contracts: ContractInterfaces = buildContractInterfaces(signer, network.chainId); 15 | const { MarketFactories } = contracts; 16 | const marketFactory = (MarketFactories[index].marketFactory as unknown) as AbstractMarketFactoryV2; 17 | 18 | const owner = await marketFactory.getOwner(); 19 | console.log(`Owner is ${owner}`); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/smart/tasks/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./accounts"; 2 | export * from "./balance"; 3 | export * from "./deploy"; 4 | export * from "./cannedMarkets"; 5 | export * from "./createPool"; 6 | export * from "./markets"; 7 | export * from "./rundown"; 8 | export * from "./setTrustedResolution"; 9 | export * from "./fundLink"; 10 | export * from "./getTeams"; 11 | export * from "./tenderlyVerify"; 12 | export * from "./pokeLink"; 13 | export * from "./setSportsLinkNode"; 14 | export * from "./createSportsLinkMarket"; 15 | export * from "./whoami"; 16 | export * from "./getOwner"; 17 | export * from "./setOwner"; 18 | export * from "./getMarket"; 19 | export * from "./faucetCash"; 20 | export * from "./transferERC20"; 21 | export * from "./approveERC20"; 22 | export * from "./multicalls"; 23 | -------------------------------------------------------------------------------- /packages/smart/tasks/markets.ts: -------------------------------------------------------------------------------- 1 | import { task } from "hardhat/config"; 2 | import { buildContractInterfaces, ContractInterfaces } from ".."; 3 | import { makeSigner } from "./deploy"; 4 | 5 | task("markets", "retreive markets").setAction(async (args, hre) => { 6 | console.log("get markets data"); 7 | const { ethers } = hre; 8 | const signer = await makeSigner(hre); 9 | const network = await ethers.provider.getNetwork(); 10 | 11 | const contracts: ContractInterfaces = buildContractInterfaces(signer, network.chainId); 12 | const { MarketFactories } = contracts as ContractInterfaces; 13 | 14 | const deferredPromises = Object.entries(MarketFactories).map(([name, { marketFactory }]) => async () => { 15 | const length = await marketFactory.marketCount(); 16 | console.log(`MarketFactory "${name}" has ${length} markets. They are:`); 17 | for (let marketId = 0; marketId < Number(length); marketId++) { 18 | const market = await marketFactory.getMarket(marketId); 19 | const details = await marketFactory.getMarketDetails(marketId); 20 | console.log(`MARKET ${marketId}`); 21 | console.log(market); 22 | console.log(details); 23 | console.log("-".repeat(80)); 24 | } 25 | }); 26 | 27 | for (let i = 0; i < deferredPromises.length; i++) await deferredPromises[i](); 28 | }); 29 | -------------------------------------------------------------------------------- /packages/smart/tasks/pokeLink.ts: -------------------------------------------------------------------------------- 1 | import { task, types } from "hardhat/config"; 2 | import { buildContractInterfaces, ContractInterfaces } from ".."; 3 | import { SportsLinkMarketFactoryV2 } from "../typechain"; 4 | import { makeSigner } from "./deploy"; 5 | import { HardhatRuntimeEnvironment } from "hardhat/types"; 6 | 7 | task("pokeLinkCreateMLB", "create MLB markets") 8 | .addParam("index", "index of market factory to use, in addresses.ts", 0, types.int) 9 | .setAction(async ({ index }, hre: HardhatRuntimeEnvironment) => { 10 | const { ethers } = hre; 11 | const signer = await makeSigner(hre); 12 | const network = await ethers.provider.getNetwork(); 13 | const contracts: ContractInterfaces = buildContractInterfaces(signer, network.chainId); 14 | 15 | const { MarketFactories } = contracts; 16 | 17 | const marketFactory = MarketFactories[index].marketFactory as SportsLinkMarketFactoryV2; 18 | 19 | console.log("Poking sports market factory to create new markets for MLB"); 20 | const response = await marketFactory.pokeMarketCreatorMLB(); 21 | console.log(await response.wait()); 22 | }); 23 | -------------------------------------------------------------------------------- /packages/smart/tasks/rundown.ts: -------------------------------------------------------------------------------- 1 | import { task } from "hardhat/config"; 2 | import axios from "axios"; 3 | 4 | task("rundown", "Retrieve rundown event information") 5 | .addParam("event", "The API key for fetching from TheRunDown") 6 | .addParam("key", "The API key for fetching from TheRunDown") 7 | .setAction(async (args) => { 8 | const result = await axios({ 9 | method: "GET", 10 | url: `https://therundown-therundown-v1.p.rapidapi.com/events/${args.event}`, 11 | params: { include: "scores" }, 12 | headers: { 13 | "x-rapidapi-key": args.key, 14 | "x-rapidapi-host": "therundown-therundown-v1.p.rapidapi.com", 15 | }, 16 | }); 17 | 18 | console.log(JSON.stringify(result.data, null, " ")); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/smart/tasks/setOwner.ts: -------------------------------------------------------------------------------- 1 | import { task, types } from "hardhat/config"; 2 | 3 | import "hardhat/types/config"; 4 | import { AbstractMarketFactoryV2, buildContractInterfaces, ContractInterfaces } from ".."; 5 | import { makeSigner } from "./deploy"; 6 | 7 | task("setOwner", "Set owner for market factory") 8 | .addParam("address", "new link node address", undefined, types.string) 9 | .addParam("index", "index of market factory to use, in addresses.ts", undefined, types.int) 10 | .setAction(async ({ address, index }, hre) => { 11 | const { ethers } = hre; 12 | 13 | const signer = await makeSigner(hre); 14 | const network = await ethers.provider.getNetwork(); 15 | const contracts: ContractInterfaces = buildContractInterfaces(signer, network.chainId); 16 | const { MarketFactories } = contracts; 17 | const marketFactory = (MarketFactories[index].marketFactory as unknown) as AbstractMarketFactoryV2; 18 | 19 | const originalOwner = await marketFactory.getOwner(); 20 | 21 | if (originalOwner === address) { 22 | console.log(`Owner is already "${address}" so no need to change it.`); 23 | } else { 24 | console.log(`Changing owner from "${originalOwner}" to "${address}".`); 25 | await marketFactory.transferOwnership(address); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /packages/smart/tasks/setSportsLinkNode.ts: -------------------------------------------------------------------------------- 1 | import { task, types } from "hardhat/config"; 2 | 3 | import "hardhat/types/config"; 4 | import { buildContractInterfaces, ContractInterfaces, SportsLinkMarketFactoryV2 } from ".."; 5 | import { makeSigner } from "./deploy"; 6 | 7 | task("setSportsLinkNode", "Set linkNode for SportsLinkMarketFactory") 8 | .addParam("address", "new link node address", undefined, types.string) 9 | .addParam("index", "index of market factory to use, in addresses.ts", undefined, types.int) 10 | .setAction(async ({ address, index }, hre) => { 11 | const { ethers } = hre; 12 | 13 | const signer = await makeSigner(hre); 14 | const network = await ethers.provider.getNetwork(); 15 | const contracts: ContractInterfaces = buildContractInterfaces(signer, network.chainId); 16 | const { MarketFactories } = contracts; 17 | const marketFactory = MarketFactories[index].marketFactory as SportsLinkMarketFactoryV2; 18 | 19 | const originalLinkNode = await marketFactory.linkNode(); 20 | 21 | if (originalLinkNode === address) { 22 | console.log(`Link node is already "${address}" so no need to change it.`); 23 | } else { 24 | console.log(`Changing link node from "${originalLinkNode}" to "${address}".`); 25 | await marketFactory.setLinkNode(address); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /packages/smart/tasks/whoami.ts: -------------------------------------------------------------------------------- 1 | import { task } from "hardhat/config"; 2 | import { makeSigner } from "./deploy"; 3 | 4 | task("whoami", "Prints the default account's address", async (args, hre) => { 5 | const signer = await makeSigner(hre); 6 | const address = await signer.getAddress(); 7 | 8 | console.log(`You are: ${address}`); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/smart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["./scripts", "./typechain", "./src", "./deploy", "./test", "./tasks"], 4 | "files": ["./addresses.ts","./constants.ts","./index.ts","./hardhat.config.ts", "./hardhat.typechain.config.ts", "./abi/@chainlink/contracts/src/v0.7/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.json"], 5 | "compilerOptions": { 6 | "outDir": "dist", 7 | "rootDir": "." 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/smart/tsconfig.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["./scripts", "./typechain", "./src", "./deploy", "./test", "./tasks"], 4 | "files": ["./addresses.ts","./constants.ts","./index.ts","./hardhat.config.ts", "./hardhat.typechain.config.ts", "./abi/@chainlink/contracts/src/v0.7/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.json"], 5 | "compilerOptions": { 6 | "outDir": "dist", 7 | "rootDir": ".", 8 | "declaration": true, 9 | "declarationDir": "./types", 10 | "sourceMap": false 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/sport/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .eslintcache 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # styles types 27 | src/assets/**/*.less.d.ts 28 | src/utils/**/*.less.d.ts 29 | src/modules/**/*.styles.less.d.ts 30 | src/modules/**/*.less.d.ts -------------------------------------------------------------------------------- /packages/sport/config/pnpTs.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const { resolveModuleName } = require('ts-pnp'); 4 | 5 | exports.resolveModuleName = ( 6 | typescript, 7 | moduleName, 8 | containingFile, 9 | compilerOptions, 10 | resolutionHost 11 | ) => { 12 | return resolveModuleName( 13 | moduleName, 14 | containingFile, 15 | compilerOptions, 16 | resolutionHost, 17 | typescript.resolveModuleName 18 | ); 19 | }; 20 | 21 | exports.resolveTypeReferenceDirective = ( 22 | typescript, 23 | moduleName, 24 | containingFile, 25 | compilerOptions, 26 | resolutionHost 27 | ) => { 28 | return resolveModuleName( 29 | moduleName, 30 | containingFile, 31 | compilerOptions, 32 | resolutionHost, 33 | typescript.resolveTypeReferenceDirective 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /packages/sport/postcss.config.js: -------------------------------------------------------------------------------- 1 | const plugins = 2 | process.env.NODE_ENV === "production" 3 | ? [require("autoprefixer"), require("cssnano")] 4 | : [require("autoprefixer")]; 5 | 6 | module.exports = { 7 | plugins 8 | }; 9 | -------------------------------------------------------------------------------- /packages/sport/public/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/apple-icon.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #0E0E21 3 | -------------------------------------------------------------------------------- /packages/sport/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/favicon.ico -------------------------------------------------------------------------------- /packages/sport/public/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Augur Simplified", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ], 41 | "theme_color": "#0E0E21", 42 | "background_color": "#0E0E21", 43 | "display": "standalone" 44 | } 45 | -------------------------------------------------------------------------------- /packages/sport/public/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /packages/sport/public/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/public/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /packages/sport/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Black.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Black.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-BlackItalic.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-BlackItalic.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Bold.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Bold.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-BoldItalic.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-BoldItalic.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-ExtraBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-ExtraBold.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-ExtraBold.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-ExtraBoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-ExtraBoldItalic.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-ExtraBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-ExtraBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Italic.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Italic.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Medium.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Medium.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-MediumItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-MediumItalic.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-MediumItalic.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Regular.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-Regular.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-SemiBold.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-SemiBold.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-SemiBoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-SemiBoldItalic.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/Inter-SemiBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/Inter-SemiBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /packages/sport/src/assets/fonts/icofont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/fonts/icofont.woff -------------------------------------------------------------------------------- /packages/sport/src/assets/images/Main_Banner_Sportsbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/images/Main_Banner_Sportsbook.png -------------------------------------------------------------------------------- /packages/sport/src/assets/images/NFL_Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/images/NFL_Banner.png -------------------------------------------------------------------------------- /packages/sport/src/assets/images/top-banner-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/images/top-banner-desktop.png -------------------------------------------------------------------------------- /packages/sport/src/assets/images/top-banner-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugurProject/turbo/2878d26e3d3e75c9853f056f4689219bd801a5e7/packages/sport/src/assets/images/top-banner-mobile.png -------------------------------------------------------------------------------- /packages/sport/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { render } from "react-dom"; 3 | import App from "./modules/App"; 4 | import * as comps from "@augurproject/comps"; 5 | const { windowRef } = comps; 6 | console.log(comps); 7 | windowRef.appStatus = {}; 8 | windowRef.data = {}; 9 | windowRef.user = {}; 10 | windowRef.sport = {}; 11 | windowRef.betslip = {}; 12 | 13 | render(, document.getElementById("root")); 14 | -------------------------------------------------------------------------------- /packages/sport/src/modules/common/buy-approvals.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) "~assets/styles/shared.less"; 2 | 3 | .ApprovalButtonRow { 4 | width: 100%; 5 | display: flex; 6 | flex-flow: row nowrap; 7 | align-items: center; 8 | justify-content: space-between; 9 | padding: @size-12; 10 | 11 | &:first-of-type { 12 | border-top: @size-1 solid var(--theme-border); 13 | } 14 | 15 | > button[class*="BaseNormalButton"] { 16 | flex: 1; 17 | } 18 | 19 | > span { 20 | margin-left: @size-12; 21 | } 22 | 23 | &.Confirmed { 24 | > button { 25 | background: var(--secondary-bg); 26 | border: @size-1 solid var(--theme-border); 27 | } 28 | } 29 | } 30 | 31 | .ResetButtonRow { 32 | padding: @size-12; 33 | display: flex; 34 | flex-flow: row nowrap; 35 | align-items: center; 36 | justify-content: center; 37 | } 38 | -------------------------------------------------------------------------------- /packages/sport/src/modules/common/sports-footer.styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) "~assets/styles/shared"; 2 | 3 | .SportsFooter { 4 | align-items: center; 5 | display: flex; 6 | flex-flow: row wrap; 7 | background: var(--primary-bg); 8 | min-height: @size-40; 9 | max-height: @size-40; 10 | border-top: @size-1 solid var(--theme-border); 11 | padding: @size-14 @size-16; 12 | 13 | > span { 14 | .text-12; 15 | 16 | color: var(--primary-text); 17 | // version prepend label 18 | margin-right: @size-4; 19 | } 20 | 21 | > div { 22 | .text-12; 23 | 24 | color: var(--secondary-text); 25 | // version # 26 | margin-right: @size-16; 27 | } 28 | 29 | > a { 30 | .text-12-semi-bold; 31 | // links 32 | color: var(--primary-text); 33 | padding: 0 @size-8; 34 | text-decoration: underline; 35 | text-underline-offset: @size-3; 36 | text-decoration-style: dashed; 37 | text-decoration-thickness: @size-1; 38 | 39 | &:not(:last-of-type) { 40 | border-right: @size-1 solid var(--theme-border); 41 | } 42 | } 43 | } 44 | 45 | .BetslipOpen { 46 | display: flex; 47 | 48 | @media @breakpoint-mobile-tiny { 49 | display: none; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /packages/sport/src/modules/common/sports-footer.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classNames from "classnames"; 3 | import Styles from "./sports-footer.styles.less"; 4 | import { Links, LabelComps, Constants } from "@augurproject/comps"; 5 | import { useSportsStore } from "../stores/sport"; 6 | 7 | const { ExternalLink } = Links; 8 | const { VersionLabel } = LabelComps; 9 | const { SIDEBAR_TYPES } = Constants; 10 | 11 | export const SportsFooter = () => { 12 | const { sidebarType } = useSportsStore(); 13 | return ( 14 |
19 | Augur UI: 20 | 21 | 22 | 23 | 24 |
25 | ); 26 | }; 27 | -------------------------------------------------------------------------------- /packages/sport/src/modules/modal/common.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import Styles from './modal.styles.less'; 4 | import { Icons, useAppStatusStore } from '@augurproject/comps'; 5 | 6 | export const Header = ({ title, subtitle }) => { 7 | const { 8 | actions: { closeModal }, 9 | } = useAppStatusStore(); 10 | 11 | return ( 12 |
13 | {title} 14 | {subtitle?.value && ( 15 |
16 | {subtitle.label} 17 | {subtitle.value} 18 |
19 | )} 20 | 21 |
22 | ); 23 | }; 24 | -------------------------------------------------------------------------------- /packages/sport/src/modules/routes/authenticated-route.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router-dom'; 3 | 4 | interface AuthenticatedRouteProps { 5 | component: any; 6 | path: string; 7 | } 8 | 9 | const AuthenticatedRoute = ({ 10 | component: Component, 11 | ...rest 12 | }: AuthenticatedRouteProps) => { 13 | return ( 14 | 17 | 18 | } 19 | /> 20 | ); 21 | }; 22 | 23 | export default AuthenticatedRoute; 24 | -------------------------------------------------------------------------------- /packages/sport/src/modules/routes/routes.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, Switch, Redirect, withRouter } from 'react-router-dom'; 3 | 4 | import { Utils } from '@augurproject/comps'; 5 | import MarketsView from '../markets/markets-view'; 6 | import MarketView from '../market/market-view'; 7 | import { 8 | MARKETS, 9 | MARKET, 10 | PORTFOLIO, 11 | } from '../constants'; 12 | import PortfolioView from '../portfolio/portfolio-view'; 13 | const { PathUtils: { makePath } } = Utils; 14 | 15 | const Routes = p => { 16 | return ( 17 | 18 | 19 | 20 | 21 | 22 | 23 | ); 24 | }; 25 | 26 | export default withRouter(Routes); 27 | -------------------------------------------------------------------------------- /packages/sport/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "build", 4 | "rootDir": "src", 5 | "lib": [ 6 | "es2015", 7 | "dom", 8 | "webworker", 9 | "es2018" 10 | ], 11 | "target": "es2018", 12 | "module": "CommonJS", 13 | "jsx": "react", 14 | "declarationMap": true, 15 | "downlevelIteration": true, 16 | "sourceMap": true, 17 | "experimentalDecorators": true, 18 | "watch": false, 19 | "strictNullChecks": false, 20 | "alwaysStrict": false, 21 | "strict": false, 22 | "noImplicitReturns": true, 23 | "noImplicitThis": true, 24 | "skipLibCheck": true, 25 | "declaration": true, 26 | "noImplicitAny": false, 27 | "allowSyntheticDefaultImports": true, 28 | "baseUrl": "src", 29 | "moduleResolution": "node", 30 | "paths": { 31 | "assets/*": [ 32 | "./assets/*" 33 | ], 34 | "modules/*": [ 35 | "./modules/*" 36 | ], 37 | "services/*": [ 38 | "./services/*" 39 | ], 40 | "utils/*": [ 41 | "./utils/*" 42 | ] 43 | }, 44 | "esModuleInterop": true, 45 | "resolveJsonModule": false 46 | }, 47 | } 48 | -------------------------------------------------------------------------------- /packages/subgraph/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | /generated 64 | /build 65 | abis/*.json -------------------------------------------------------------------------------- /packages/subgraph/src/helpers/AbstractMarketFactoryHelper.ts: -------------------------------------------------------------------------------- 1 | import { ClaimedFees, ClaimedProceeds } from "../../generated/schema"; 2 | 3 | export function getOrCreateClaimedProceeds( 4 | id: string, 5 | createIfNotFound: boolean = true, 6 | save: boolean = true 7 | ): ClaimedProceeds { 8 | let entity = ClaimedProceeds.load(id); 9 | 10 | if (entity == null && createIfNotFound) { 11 | entity = new ClaimedProceeds(id); 12 | 13 | if (save) { 14 | entity.save(); 15 | } 16 | } 17 | 18 | return entity as ClaimedProceeds; 19 | } 20 | 21 | export function getOrCreateClaimedFees( 22 | id: string, 23 | createIfNotFound: boolean = true, 24 | save: boolean = true 25 | ): ClaimedFees { 26 | let entity = ClaimedFees.load(id); 27 | 28 | if (entity == null && createIfNotFound) { 29 | entity = new ClaimedFees(id); 30 | 31 | if (save) { 32 | entity.save(); 33 | } 34 | } 35 | 36 | return entity as ClaimedFees; 37 | } 38 | -------------------------------------------------------------------------------- /packages/subgraph/src/types.ts: -------------------------------------------------------------------------------- 1 | import { Address, BigInt, Bytes } from "@graphprotocol/graph-ts/index"; 2 | 3 | export class GenericSharesMintedParams { 4 | hash: Bytes; 5 | timestamp: BigInt; 6 | marketFactory: Address; 7 | marketIndex: BigInt; 8 | amount: BigInt; 9 | receiver: Address; 10 | } 11 | -------------------------------------------------------------------------------- /packages/subgraph/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["./src", "./generated"] 4 | } 5 | -------------------------------------------------------------------------------- /scripts/pin-release-on-ipfs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Found: https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c 4 | CURRENT_VERSION=$(curl --silent "https://api.github.com/repos/AugurProject/turbo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'); 5 | VERSION="${VERSION:-$CURRENT_VERSION}" 6 | APP="${APP:-turbo}" 7 | curl -OL "https://github.com/AugurProject/turbo/releases/download/$VERSION/$APP.tar.gz"; 8 | 9 | tar -xzf $APP.tar.gz; 10 | 11 | IPFS_HASH_CIDv0=$(ipfs add -rq --silent build | sed '$!d'); 12 | IPFS_HASH_CIDv1=$(ipfs cid base32 $IPFS_HASH_CIDv0); 13 | 14 | echo "CIDv0: $IPFS_HASH_CIDv0"; 15 | echo "CIDv1: $IPFS_HASH_CIDv1"; 16 | 17 | rm -rf build; 18 | rm $APP.tar.gz; 19 | 20 | echo "Propagating Hash"; 21 | curl --retry 100 "https://$IPFS_HASH_CIDv1.ipfs.dweb.link" ; 22 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "lib": [ 5 | "es2015", 6 | "dom", 7 | "webworker", 8 | "es2018" 9 | ], 10 | "module": "CommonJS", 11 | "composite": true, 12 | "downlevelIteration": true, 13 | "sourceMap": true, 14 | "experimentalDecorators": true, 15 | "watch": false, 16 | "strictNullChecks": true, 17 | "alwaysStrict": true, 18 | "strict": true, 19 | "noImplicitAny": true, 20 | "noImplicitReturns": true, 21 | "noImplicitThis": true, 22 | "esModuleInterop": true, 23 | "resolveJsonModule": true, 24 | "skipLibCheck": true, 25 | "allowJs": true, 26 | "typeRoots": ["node_modules/@types", "node_modules/hardhat/types"] 27 | }, 28 | "references": [ 29 | { 30 | "path": "./packages/smart" 31 | }, 32 | { 33 | "path": "./packages/ethereum-multicall" 34 | }, 35 | { 36 | "path": "./packages/chainlink" 37 | }, 38 | { 39 | "path": "./packages/comps" 40 | } 41 | ], 42 | "exclude": ["**/node_modules", "**/build", "**/dist"], 43 | "files": [], 44 | "include": [] 45 | } 46 | --------------------------------------------------------------------------------