Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: env updates #288

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@radix-ui/react-slot": "^1.1.0",
"@rainbow-me/rainbowkit": "2.x",
"@tanstack/react-query": "^5.51.11",
"@wagmi/connectors": "^5.0.26",
"@wagmi/connectors": "5.0.26",
"autoprefixer": "^10.4.19",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.412.0",
"lucide-react": "^0.414.0",
"postcss": "^8.4.39",
"react": "18.x",
"react-dom": "18.x",
Expand All @@ -36,13 +36,13 @@
"@types/node": "latest",
"@types/react": "18.x",
"@types/react-dom": "18.x",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.7.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.8",
"typescript": "^5.5.3",
"eslint-plugin-react-refresh": "^0.4.9",
"typescript": "^5.5.4",
"vite": "^5.3.4"
}
}
8 changes: 4 additions & 4 deletions apps/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"bn.js": "^5.2.1",
"express": "^4.19.2",
"lodash": "^4.17.21",
"node-fetch": "2.6.4",
"resend": "^3.4.0",
"node-fetch": "3.3.2",
"resend": "^3.5.0",
"app-contracts": "workspace:*",
"app-env": "workspace:*",
"app-lib": "workspace:*",
Expand All @@ -34,14 +34,14 @@
"devDependencies": {
"@types/express": "^4.17.21",
"@types/lodash": "^4.17.7",
"@types/node-fetch": "^2.6.11",
"@types/node-fetch": " 2.6.4",
"bun-types": "latest",
"env-cmd": "^10.1.0",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"@repo/typescript-config": "workspace:*",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.5.3"
"typescript": "^5.5.4"
}
}
4 changes: 2 additions & 2 deletions apps/supabase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"dependencies": {},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"supabase-to-zod": "^1.0.5",
"supabase-to-zod": "^1.0.7",
"@faker-js/faker": "^8.4.1",
"supabase": "^1.178.2"
"supabase": "^1.187.3"
}
}
7 changes: 7 additions & 0 deletions apps/webapp/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NEXT_PUBLIC_ENABLE_WALLET_REDIRECT=true
NEXT_PUBLIC_FEAT_NEW_NAV_STRUCT=true
NEXT_PUBLIC_FEAT_PRESALE=true
NEXT_PUBLIC_NEW_SECTIONS=true
NEXT_PUBLIC_LEARN_SECTION=true
NEXT_PUBLIC_NEW_I18N=false
NEXT_PUBLIC_EXPLORATIONS=false
21 changes: 9 additions & 12 deletions apps/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"vercel:install": "npm i -g node-gyp; bun install"
},
"dependencies": {
"@ai-sdk/anthropic": "^0.0.30",
"@ai-sdk/openai": "^0.0.37",
"@ai-sdk/anthropic": "^0.0.32",
"@ai-sdk/openai": "^0.0.39",
"@blockmatic/hooks-utils": "^3.0.0",
"@formatjs/intl-localematcher": "^0.5.4",
"@genql/runtime": "^2.10.0",
Expand Down Expand Up @@ -49,25 +49,24 @@
"@vercel/analytics": "^1.3.1",
"@vercel/og": "^0.6.2",
"@vercel/speed-insights": "^1.0.12",
"@wagmi/connectors": "^5.0.26",
"@wagmi/connectors": "5.0.26",
"@wharfkit/antelope": "^1.0.8",
"ai": "^3.2.32",
"ai": "^3.2.35",
"axios": "^1.7.2",
"camelize-ts": "^3.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"datocms-structured-text-to-plain-text": "^4.0.1",
"eosio-signing-request": "^2.5.3",
"framer-motion": "^11.3.8",
"framer-motion": "^11.3.17",
"graphql": "^16.9.0",
"graphql-ws": "^5.16.0",
"lodash": "^4.17.21",
"lucide-react": "^0.412.0",
"lucide-react": "^0.414.0",
"mini-svg-data-uri": "^1.4.4",
"negotiator": "^0.6.3",
"next": "14.2.5",
"next-sanity": "^9.4.2",
"next-share": "^0.27.0",
"next-themes": "^0.3.0",
"pako": "^2.1.0",
Expand All @@ -84,9 +83,7 @@
"react-useanimations": "^2.10.0",
"react-wrap-balancer": "^1.1.1",
"recharts": "^2.12.7",
"resend": "^3.4.0",
"sanity": "^3.52.0",
"sanity-plugin-asset-source-unsplash": "^3.0.1",
"resend": "^3.5.0",
"server-only": "^0.0.1",
"sharp": "^0.33.4",
"app-contracts": "workspace:*",
Expand All @@ -107,7 +104,7 @@
"@types/pako": "^2.0.3",
"@types/react-google-recaptcha": "^2.1.9",
"@types/react-syntax-highlighter": "^15.5.13",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/parser": "^7.17.0",
"autoprefixer": "^10.4.19",
"eslint-config-next": "^14.2.5",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -118,7 +115,7 @@
"tailwind-merge": "^2.4.0",
"tailwindcss": "^3.4.6",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.5.3",
"typescript": "^5.5.4",
"@types/react": "18.x",
"@types/react-dom": "18.x",
"postcss-import": "^16.1.0",
Expand Down
66 changes: 0 additions & 66 deletions apps/webapp/types/index.ts

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
11 changes: 11 additions & 0 deletions packages/app-env/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# app-env

This package manages the environment configurations for the smartsale project, covering production, pre-production, and development settings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Consider capitalizing 'smartsale' to 'SmartSale'.

It might be a proper noun or brand name, so capitalizing it could be more appropriate.

Suggested change
This package manages the environment configurations for the smartsale project, covering production, pre-production, and development settings.
This package manages the environment configurations for the SmartSale project, covering production, pre-production, and development settings.


## Environments

- **Production (prod)**: [bitlauncher.ai](https://bitlauncher.ai) - Mainnet auction contracts with real tokens.
- **Pre-Production (test)**: [test.bitlauncher.ai](https://test.bitlauncher.ai) - Mainnet pre-prod auction contracts with real tokens.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Consider changing 'pre-prod' to 'pre-production' for consistency.

Using 'pre-production' instead of 'pre-prod' would maintain consistency with the rest of the document.

Suggested change
- **Pre-Production (test)**: [test.bitlauncher.ai](https://test.bitlauncher.ai) - Mainnet pre-prod auction contracts with real tokens.
**Pre-Production (test)**: [test.bitlauncher.ai](https://test.bitlauncher.ai) - Mainnet pre-production auction contracts with real tokens.

- **Development (dev)**: [dev.bitlauncher.ai](https://dev.bitlauncher.ai) - Testnet auction contracts with mocked tokens.

All preview deployments run against the development environment.
53 changes: 7 additions & 46 deletions packages/app-env/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const prod: SmartsaleEnvConfig = {
auction: "0x",
bk: "launchpad.bk",
},
usdt: [EOSUSDT],
usdt: [EOSUSDT,...usdcContracts, ...usdtContracts],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Potential issue with spread operator usage.

Ensure that usdcContracts and usdtContracts are arrays. If they are not, this could lead to unexpected behavior.

};

const dev: SmartsaleEnvConfig = {
Expand All @@ -41,7 +41,6 @@ const dev: SmartsaleEnvConfig = {
},
chains: smartsaleChains.dev,
esrCallbackUrl: "https://dev.bitlauncher.ai/api/esr",
// esrCallbackUrl: "https://192.168.23.3:3000/api/esr",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider removing commented-out code.

Leaving commented-out code can clutter the codebase and make it harder to maintain. If this line is no longer needed, consider removing it entirely.

Suggested change
// esrCallbackUrl: "https://192.168.23.3:3000/api/esr",
},
chains: smartsaleChains.dev,
esrCallbackUrl: "https://dev.bitlauncher.ai/api/esr",
issuer: {
eos: "gaboesquivel",

issuer: {
eos: "gaboesquivel",
evm: "0x",
Expand All @@ -57,59 +56,21 @@ const dev: SmartsaleEnvConfig = {
},
usdt: [EOSFakeBITUSD, EOSFakeUSDT, SepoliaUSDT, TestnetUSDT],
};

const canary: SmartsaleEnvConfig = {
supabase: {
url : 'https://mitkjznioyrucenuzsdb.supabase.co',
anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1pdGtqem5pb3lydWNlbnV6c2RiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTMxMzA3MzgsImV4cCI6MjAyODcwNjczOH0.uVdiJfaonQfWvL--71QFAdiXGMiN1SRYlYGLNiSuNC0',
},
chains: smartsaleChains.dev,
esrCallbackUrl: "https://canary.bitlauncher.ai/api/esr",
issuer: {
eos: "gaboesquivel",
evm: "0x",
},
bitcash: {
bank: "bkbbanktest3",
token: "bkbtokentest",
accounts: "bkbaccountst",
},
smartsale: {
auction: "0x",
bk: "bkblaunchpad",
},
usdt: [EOSFakeBITUSD, EOSFakeUSDT, SepoliaUSDT, TestnetUSDT, ...usdcContracts, ...usdtContracts],
};

// pre production tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Unclear comment.

The comment // pre production tests is vague. If it is necessary, consider making it more descriptive or removing it if it does not add value.

Suggested change
// pre production tests
/**
* Configuration for pre-production testing environment.
* This includes settings and contracts for testing purposes.
*/

const test: SmartsaleEnvConfig = {
supabase: {
url : 'https://mitkjznioyrucenuzsdb.supabase.co',
anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1pdGtqem5pb3lydWNlbnV6c2RiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTMxMzA3MzgsImV4cCI6MjAyODcwNjczOH0.uVdiJfaonQfWvL--71QFAdiXGMiN1SRYlYGLNiSuNC0',
},
chains: smartsaleChains.prod,
...prod,
// supabase: {
// url : 'https://mitkjznioyrucenuzsdb.supabase.co',
// anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1pdGtqem5pb3lydWNlbnV6c2RiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTMxMzA3MzgsImV4cCI6MjAyODcwNjczOH0.uVdiJfaonQfWvL--71QFAdiXGMiN1SRYlYGLNiSuNC0',
// },
esrCallbackUrl: "https://test.bitlauncher.ai/api/esr",
issuer: {
eos: "gaboesquivel",
evm: "0x",
},
bitcash: {
bank: "bkbbanktest3",
token: "bkbtokentest",
accounts: "bkbaccountst",
},
smartsale: {
auction: "0x",
bk: "bkblaunchpad",
},
usdt: [EOSFakeBITUSD, EOSFakeUSDT, SepoliaUSDT, TestnetUSDT, ...usdcContracts, ...usdtContracts],
};

// common environment configs
export const smartsaleEnv = {
prod,
dev,
test,
canary,
};

// expiclit type to enforce it
Expand Down
Loading