Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
switch to thirdweb rpc (#101)
Browse files Browse the repository at this point in the history
* upgrade dependencies

* switch to thirdweb rpc
  • Loading branch information
alecananian authored Mar 5, 2024
1 parent 729d694 commit 5cf56dc
Show file tree
Hide file tree
Showing 8 changed files with 6,453 additions and 7,292 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAGICSWAP_API_URL=
VITE_ALCHEMY_KEY=
VITE_THIRDWEB_CLIENT_ID=
VITE_WALLETCONNECT_PROJECT_ID=
VITE_ENABLE_TESTNETS=true
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
8 changes: 6 additions & 2 deletions app/utils/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from "@rainbow-me/rainbowkit/wallets";
import { arbitrum, arbitrumSepolia } from "viem/chains";
import { configureChains, createConfig } from "wagmi";
import { alchemyProvider } from "wagmi/providers/alchemy";
import { jsonRpcProvider } from "wagmi/providers/jsonRpc";
import { publicProvider } from "wagmi/providers/public";

const projectId = import.meta.env.VITE_WALLETCONNECT_PROJECT_ID;
Expand All @@ -29,7 +29,11 @@ const { chains, publicClient } = configureChains(
: []),
],
[
alchemyProvider({ apiKey: import.meta.env.VITE_ALCHEMY_KEY }),
jsonRpcProvider({
rpc: (chain) => ({
http: `https://${chain.id}.rpc.thirdweb.com/${import.meta.env.VITE_THIRDWEB_CLIENT_ID}`,
}),
}),
publicProvider(),
],
);
Expand Down
2 changes: 1 addition & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE__ALCHEMY_KEY: string;
readonly VITE_THIRDWEB_CLIENT_ID: string;
readonly VITE_ENABLE_TESTNETS: string;
readonly VITE_WALLETCONNECT_PROJECT_ID: string;
}
Expand Down
13,670 changes: 6,437 additions & 7,233 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"typecheck": "tsc",
"codegen": "graphql-codegen -r dotenv/config",
"lint": "prettier --write 'app/**/{*.ts,*.tsx}' && eslint --fix --no-error-on-unmatched-pattern 'app/**/{*.ts,*.tsx}'",
"prepare": "husky install"
"prepare": "husky"
},
"dependencies": {
"@blocto/rainbowkit-connector": "^0.2.4",
Expand All @@ -48,7 +48,7 @@
"graphql": "^16.6.0",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.12.6",
"isbot": "^4.4.0",
"isbot": "^5.0.0",
"nprogress": "^0.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down Expand Up @@ -79,9 +79,9 @@
"@vitejs/plugin-react": "^4.0.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"husky": "^8.0.1",
"jsdom": "^23.0.1",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
Expand Down
42 changes: 0 additions & 42 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
mono: ["GroteskSemi", ...defaultTheme.fontFamily.mono],
},
spacing: {
3.25: "0.775rem",
6.5: "1.65rem",
},
borderRadius: {
Expand Down Expand Up @@ -59,26 +58,6 @@ module.exports = {
},
},
keyframes: {
"bounce-right-to-left": {
"0%, 100%": {
transform: "translateX(0)",
"animation-timing-function": "cubic-bezier(0.8, 0, 1, 1)",
},
"50%": {
transform: "translateX(-20%)",
"animation-timing-function": "cubic-bezier(0, 0, 0.2, 1)",
},
},
"bounce-bottom-to-top": {
"0%, 100%": {
transform: "translateY(0)",
"animation-timing-function": "cubic-bezier(0.8, 0, 1, 1)",
},
"50%": {
transform: "translateY(-20%)",
"animation-timing-function": "cubic-bezier(0, 0, 0.2, 1)",
},
},
"rotate-right-to-left": {
"100%": {
transform: "rotate(180deg)",
Expand All @@ -92,31 +71,10 @@ module.exports = {
transform: "rotate(0deg)",
},
},
drift: {
from: {
"background-position-x": "0",
},
to: {
"background-position-x": "100vw",
},
},
"slide-up": {
"0%": { opacity: 0, transform: "translateY(10px)" },
"100%": { opacity: 1, transform: "translateY(0)" },
},
"slide-down": {
"0%": { opacity: 0, transform: "translateY(-10px)" },
"100%": { opacity: 1, transform: "translateY(0)" },
},
},
animation: {
"bounce-right-to-left": "bounce-right-to-left 1s ease-in-out infinite",
"bounce-bottom-to-top": "bounce-bottom-to-top 1s ease-in-out infinite",
"rotate-180": "rotate-right-to-left 0.2s forwards linear",
"rotate-back": "rotate-back 0.2s forwards linear",
drift: "drift 30s linear infinite",
"slide-down": "slide-down 0.6s cubic-bezier(0.16, 1, 0.3, 1)",
"slide-up": "slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1)",
},
},
},
Expand Down
8 changes: 3 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { unstable_vitePlugin as remix } from "@remix-run/dev";
import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { defineConfig, loadEnv } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
Expand All @@ -9,15 +9,13 @@ export default ({ mode }: { mode: string }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd(), "") };
return defineConfig({
ssr: {
noExternal: [
"decimal.js-light",
],
noExternal: ["decimal.js-light"],
},
plugins: [
remix({
ignoredRouteFiles: ["**/.*"],
}),
tsconfigPaths()
tsconfigPaths(),
],
});
};

0 comments on commit 5cf56dc

Please sign in to comment.