From 5318e2d92332577c1823900b13c4cf0d8dc9be97 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 18 Jul 2022 18:28:08 -0700 Subject: [PATCH 01/17] Set up Atlas3 instance --- common/envs/atlas3.ts | 36 +++++++++++++++++++++++++++ common/envs/constants.ts | 2 ++ firestore.rules | 6 ++--- functions/.env | 2 +- web/package.json | 1 + web/public/atlas/atlas-logo-white.svg | 1 + 6 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 common/envs/atlas3.ts create mode 100644 web/public/atlas/atlas-logo-white.svg diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts new file mode 100644 index 00000000..ab490cbd --- /dev/null +++ b/common/envs/atlas3.ts @@ -0,0 +1,36 @@ +import { EnvConfig } from './prod' + +export const ATLAS3_CONFIG: EnvConfig = { + domain: 'atlas2.manifold.markets', + firebaseConfig: { + apiKey: 'AIzaSyAAsJPN_4HAvmWtsdW2EIY2iRRbyTxEZQI', + authDomain: 'atlas3-manifold.firebaseapp.com', + projectId: 'atlas3-manifold', + storageBucket: 'atlas3-manifold.appspot.com', + messagingSenderId: '453445191752', + appId: '1:453445191752:web:f7a899553e702d6d48b07d', + measurementId: 'G-0F3F5X37YN', + }, + + cloudRunId: 'todo', + cloudRunRegion: 'uc', + + adminEmails: [ + 'akrolsmir@gmail.com', + 'ricki.heicklen@gmail.com', + 'ross@ftx.org', + 'gpimpale29@gmail.com', + ], + whitelistEmail: '', + moneyMoniker: '📎', + fixedAnte: 25, + startingBalance: 0, + visibility: 'PRIVATE', + navbarLogoPath: '/atlas/atlas-logo-white.svg', + newQuestionPlaceholders: [ + 'Will we have at least 5 new team members by the end of this quarter?', + 'Will we meet or exceed our goals this sprint?', + 'Will we sign on 3 or more new clients this month?', + 'Will Paul shave his beard by the end of the month?', + ], +} diff --git a/common/envs/constants.ts b/common/envs/constants.ts index 7092d711..d3db041a 100644 --- a/common/envs/constants.ts +++ b/common/envs/constants.ts @@ -1,4 +1,5 @@ import { escapeRegExp } from 'lodash' +import { ATLAS3_CONFIG } from './atlas3' import { DEV_CONFIG } from './dev' import { EnvConfig, PROD_CONFIG } from './prod' import { THEOREMONE_CONFIG } from './theoremone' @@ -9,6 +10,7 @@ const CONFIGS: { [env: string]: EnvConfig } = { PROD: PROD_CONFIG, DEV: DEV_CONFIG, THEOREMONE: THEOREMONE_CONFIG, + ATLAS3: ATLAS3_CONFIG, } export const ENV_CONFIG = CONFIGS[ENV] diff --git a/firestore.rules b/firestore.rules index 96378d8b..7779c93d 100644 --- a/firestore.rules +++ b/firestore.rules @@ -8,9 +8,9 @@ service cloud.firestore { function isAdmin() { return request.auth.token.email in [ 'akrolsmir@gmail.com', - 'jahooma@gmail.com', - 'taowell@gmail.com', - 'manticmarkets@gmail.com' + 'ricki.heicklen@gmail.com', + 'ross@ftx.org', + 'gpimpale29@gmail.com' ] } diff --git a/functions/.env b/functions/.env index 0c4303df..5e9a52d5 100644 --- a/functions/.env +++ b/functions/.env @@ -1,3 +1,3 @@ # This sets which EnvConfig is deployed to Firebase Cloud Functions -NEXT_PUBLIC_FIREBASE_ENV=PROD +NEXT_PUBLIC_FIREBASE_ENV=ATLAS3 diff --git a/web/package.json b/web/package.json index f8e1881b..148d1bb7 100644 --- a/web/package.json +++ b/web/package.json @@ -6,6 +6,7 @@ "dev": "concurrently -n NEXT,TS -c magenta,cyan \"next dev -p 3000\" \"yarn ts --watch\"", "devdev": "cross-env NEXT_PUBLIC_FIREBASE_ENV=DEV concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=DEV next dev -p 3000\" \"cross-env FIREBASE_ENV=DEV yarn ts --watch\"", "dev:dev": "yarn devdev", + "dev:atlas3": "cross-env NEXT_PUBLIC_FIREBASE_ENV=ATLAS3 concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=ATLAS3 next dev -p 3000\" \"cross-env FIREBASE_ENV=ATLAS3 yarn ts --watch\"", "dev:the": "cross-env NEXT_PUBLIC_FIREBASE_ENV=THEOREMONE concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=THEOREMONE next dev -p 3000\" \"cross-env FIREBASE_ENV=THEOREMONE yarn ts --watch\"", "dev:emulate": "cross-env NEXT_PUBLIC_FIREBASE_EMULATE=TRUE yarn devdev", "ts": "tsc --noEmit --incremental --preserveWatchOutput --pretty", diff --git a/web/public/atlas/atlas-logo-white.svg b/web/public/atlas/atlas-logo-white.svg new file mode 100644 index 00000000..d90f3006 --- /dev/null +++ b/web/public/atlas/atlas-logo-white.svg @@ -0,0 +1 @@ + \ No newline at end of file From 88cea63f12537fcad2301b3cce78253569930a7c Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 18 Jul 2022 23:17:37 -0700 Subject: [PATCH 02/17] Update firestore.indexes.json --- firestore.indexes.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/firestore.indexes.json b/firestore.indexes.json index 12e88033..1d09265c 100644 --- a/firestore.indexes.json +++ b/firestore.indexes.json @@ -22,6 +22,20 @@ } ] }, + { + "collectionGroup": "bets", + "queryScope": "COLLECTION_GROUP", + "fields": [ + { + "fieldPath": "isFilled", + "order": "ASCENDING" + }, + { + "fieldPath": "userId", + "order": "ASCENDING" + } + ] + }, { "collectionGroup": "bets", "queryScope": "COLLECTION_GROUP", From 2cc3350f4d963872c3b719bfe3d84b26e2885561 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 18 Jul 2022 23:18:53 -0700 Subject: [PATCH 03/17] Start users with 500; ante is 250 --- common/envs/atlas3.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts index ab490cbd..020c5647 100644 --- a/common/envs/atlas3.ts +++ b/common/envs/atlas3.ts @@ -23,8 +23,8 @@ export const ATLAS3_CONFIG: EnvConfig = { ], whitelistEmail: '', moneyMoniker: '📎', - fixedAnte: 25, - startingBalance: 0, + fixedAnte: 250, + startingBalance: 500, visibility: 'PRIVATE', navbarLogoPath: '/atlas/atlas-logo-white.svg', newQuestionPlaceholders: [ From 86a85ba065b0c480018e32d8b3e00a79b5c0a82c Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 18 Jul 2022 23:23:33 -0700 Subject: [PATCH 04/17] Fix domain config --- common/envs/atlas3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts index 020c5647..63095b27 100644 --- a/common/envs/atlas3.ts +++ b/common/envs/atlas3.ts @@ -1,7 +1,7 @@ import { EnvConfig } from './prod' export const ATLAS3_CONFIG: EnvConfig = { - domain: 'atlas2.manifold.markets', + domain: 'atlas3.manifold.markets', firebaseConfig: { apiKey: 'AIzaSyAAsJPN_4HAvmWtsdW2EIY2iRRbyTxEZQI', authDomain: 'atlas3-manifold.firebaseapp.com', From 4edb16a1b468cfb0f6ff7aad57d35b102ebdc36f Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 18 Jul 2022 23:24:40 -0700 Subject: [PATCH 05/17] Show Atlas logo --- web/components/nav/manifold-logo.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/web/components/nav/manifold-logo.tsx b/web/components/nav/manifold-logo.tsx index ec15d54b..35a68f39 100644 --- a/web/components/nav/manifold-logo.tsx +++ b/web/components/nav/manifold-logo.tsx @@ -17,16 +17,23 @@ export function ManifoldLogo(props: { return ( - + {!ENV_CONFIG.navbarLogoPath && ( + + )} {!hideText && (ENV_CONFIG.navbarLogoPath ? ( - + ) : twoLine ? (
Date: Mon, 18 Jul 2022 23:30:48 -0700 Subject: [PATCH 06/17] Disable referral bonus for Atlas 3 instance --- common/envs/atlas3.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts index 63095b27..86653669 100644 --- a/common/envs/atlas3.ts +++ b/common/envs/atlas3.ts @@ -25,6 +25,7 @@ export const ATLAS3_CONFIG: EnvConfig = { moneyMoniker: '📎', fixedAnte: 250, startingBalance: 500, + referralBonus: 0, visibility: 'PRIVATE', navbarLogoPath: '/atlas/atlas-logo-white.svg', newQuestionPlaceholders: [ From 21303205862c227cad9bb6794c0188240d772e5b Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 19 Jul 2022 01:55:48 -0700 Subject: [PATCH 07/17] Set cloudRunid --- common/envs/atlas3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts index 86653669..b5f0c2f7 100644 --- a/common/envs/atlas3.ts +++ b/common/envs/atlas3.ts @@ -12,7 +12,7 @@ export const ATLAS3_CONFIG: EnvConfig = { measurementId: 'G-0F3F5X37YN', }, - cloudRunId: 'todo', + cloudRunId: 'o7zdjo5hka', cloudRunRegion: 'uc', adminEmails: [ From b91e848deb3b5ba77db6419bd86eb89e40432bf8 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 19 Jul 2022 02:56:21 -0700 Subject: [PATCH 08/17] Disable FR and numeric markets --- web/pages/create.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index 45eb120f..a978af9f 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -246,8 +246,8 @@ export function NewContract(props: { }} choicesMap={{ 'Yes / No': 'BINARY', - 'Free response': 'FREE_RESPONSE', - Numeric: 'PSEUDO_NUMERIC', + // 'Free response': 'FREE_RESPONSE', + // Numeric: 'PSEUDO_NUMERIC', }} isSubmitting={isSubmitting} className={'col-span-4'} From 963f1c156a48f4e9beecf809d8b9b8baf0dd27de Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 19 Jul 2022 13:59:24 -0700 Subject: [PATCH 09/17] Fix undefined mostRecentDonor --- web/pages/charity/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index b1cfc353..dd5653fc 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -6,6 +6,7 @@ import { sortBy, debounce, uniqBy, + last, } from 'lodash' import { useState, useMemo } from 'react' import { charities, Charity as CharityType } from 'common/charity' @@ -36,7 +37,8 @@ export async function getStaticProps() { ]) const matches = quadraticMatches(txns, totalRaised) const numDonors = uniqBy(txns, (txn) => txn.fromId).length - const mostRecentDonor = await getUser(txns[txns.length - 1].fromId) + const donorId = last(txns)?.fromId + const mostRecentDonor = donorId ? await getUser(donorId) : undefined return { props: { @@ -89,7 +91,7 @@ export default function Charity(props: { matches: { [charityId: string]: number } txns: Txn[] numDonors: number - mostRecentDonor: User + mostRecentDonor?: User }) { const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props @@ -140,8 +142,8 @@ export default function Charity(props: { }, { name: 'Most recent donor', - stat: mostRecentDonor.name ?? 'Nobody', - url: `/${mostRecentDonor.username}`, + stat: mostRecentDonor?.name ?? 'Nobody', + url: `/${mostRecentDonor?.username}`, }, ]} /> From 37048dcbe34b1f47f70c0699451fa8aec7a1dd1b Mon Sep 17 00:00:00 2001 From: RickiHeicklen Date: Fri, 22 Jul 2022 13:04:20 -0700 Subject: [PATCH 10/17] Ricki testing commiting --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f6e85007..e8b16389 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ This [monorepo][] has basically everything involved in running and operating Manifold. +# Ricki testing + + ## Getting started 0. Make sure you have [Yarn 1.x][yarn] From 7ca8fe15b9d9c76ebcadbfbb11c3aa4d6383b2fb Mon Sep 17 00:00:00 2001 From: RickiHeicklen Date: Fri, 22 Jul 2022 14:01:54 -0700 Subject: [PATCH 11/17] reversing testing --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index e8b16389..12eda2ec 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ This [monorepo][] has basically everything involved in running and operating Manifold. -# Ricki testing - ## Getting started From 9ebf350d10e1a1aedeaecd19dd27bf55c7dbeb1b Mon Sep 17 00:00:00 2001 From: nicholascc Date: Fri, 22 Jul 2022 17:17:22 -0700 Subject: [PATCH 12/17] Fixed 'yarn build' in functions/ for my Windows machine. --- functions/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/package.json b/functions/package.json index f8657516..786a0e97 100644 --- a/functions/package.json +++ b/functions/package.json @@ -5,7 +5,7 @@ "firestore": "dev-mantic-markets.appspot.com" }, "scripts": { - "build": "yarn compile && rm -rf dist && mkdir -p dist/functions && cp -R ../common/lib dist/common && cp -R lib/src dist/functions/src && cp ../yarn.lock dist && cp package.json dist && cp .env dist", + "build": "yarn compile && rm -rf dist && mkdir dist && mkdir dist\\functions && cp -R ../common/lib dist/common && cp -R lib/src dist/functions/src && cp ../yarn.lock dist && cp package.json dist && cp .env dist", "compile": "tsc -b", "watch": "tsc -w", "shell": "yarn build && firebase functions:shell", From d929ba5ff5c552b60c8e5eca5f9655e42fc740c1 Mon Sep 17 00:00:00 2001 From: nicholascc Date: Mon, 25 Jul 2022 16:04:10 -0700 Subject: [PATCH 13/17] Decreased ante to 25 clips. --- common/envs/atlas3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts index b5f0c2f7..84ec3cf7 100644 --- a/common/envs/atlas3.ts +++ b/common/envs/atlas3.ts @@ -23,7 +23,7 @@ export const ATLAS3_CONFIG: EnvConfig = { ], whitelistEmail: '', moneyMoniker: '📎', - fixedAnte: 250, + fixedAnte: 25, startingBalance: 500, referralBonus: 0, visibility: 'PRIVATE', From c74f178bcb532e01000e79780f8ce80ed7be846a Mon Sep 17 00:00:00 2001 From: nicholascc Date: Mon, 25 Jul 2022 16:49:50 -0700 Subject: [PATCH 14/17] Added a description for limit orders. --- web/components/bet-panel.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 0cbee7b5..2db61657 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -262,9 +262,17 @@ function BuyPanel(props: { return ( <> + {isLimitOrder && ( + <> +

Place a limit order to add to the order book rather than trade directly. Your orders will be filled over time if others trade with them at the prices you set.

+
+ + )} +
{isPseudoNumeric ? 'Direction' : 'Outcome'}
+ {isLimitOrder && ( <> +

test

Limit {isPseudoNumeric ? 'value' : 'probability'} Date: Mon, 25 Jul 2022 17:18:26 -0700 Subject: [PATCH 15/17] Use null instead of undefined --- web/pages/charity/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index dd5653fc..0c970a42 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -38,7 +38,7 @@ export async function getStaticProps() { const matches = quadraticMatches(txns, totalRaised) const numDonors = uniqBy(txns, (txn) => txn.fromId).length const donorId = last(txns)?.fromId - const mostRecentDonor = donorId ? await getUser(donorId) : undefined + const mostRecentDonor = donorId ? await getUser(donorId) : null return { props: { @@ -91,7 +91,7 @@ export default function Charity(props: { matches: { [charityId: string]: number } txns: Txn[] numDonors: number - mostRecentDonor?: User + mostRecentDonor?: User | null }) { const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props From a190082fe4652bc224fff940bd38775d8f55ef77 Mon Sep 17 00:00:00 2001 From: nicholascc Date: Mon, 25 Jul 2022 18:10:12 -0700 Subject: [PATCH 16/17] Decreased join bonus to 250 clips. --- common/envs/atlas3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts index 84ec3cf7..91e63e61 100644 --- a/common/envs/atlas3.ts +++ b/common/envs/atlas3.ts @@ -24,7 +24,7 @@ export const ATLAS3_CONFIG: EnvConfig = { whitelistEmail: '', moneyMoniker: '📎', fixedAnte: 25, - startingBalance: 500, + startingBalance: 250, referralBonus: 0, visibility: 'PRIVATE', navbarLogoPath: '/atlas/atlas-logo-white.svg', From 0ad3a893e019eedf98edc678799d5303d3fd7072 Mon Sep 17 00:00:00 2001 From: nicholascc Date: Wed, 27 Jul 2022 16:07:30 -0700 Subject: [PATCH 17/17] Removed previously committed placeholder text. --- web/components/bet-panel.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 2db61657..8ebb15c8 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -293,7 +293,6 @@ function BuyPanel(props: { /> {isLimitOrder && ( <> -

test

Limit {isPseudoNumeric ? 'value' : 'probability'}