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

Fix common, make it an actual package #2820

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "common",
"version": "1.0.0",
"description": "Common code shared between GE and RM",
"main": "src/index.ts",
"types": "src/index.ts",
"author": "Josef Vacek",
"license": "MIT",
"description": "Common package for Grants Stack",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"private": false,
"scripts": {
"test": "vitest --run",
"prepare": "tsc",
"build": "tsc",
"test:watch": "vitest watch"
},
"dependencies": {
Expand Down
17 changes: 11 additions & 6 deletions packages/common/src/chains.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { Chain } from "@rainbow-me/rainbowkit";
import PublicGoodsNetworkIcon from "./icons/PublicGoodsNetwork.svg";
import zkSyncIcon from "./icons/zksync-logo.svg";
import BaseLogo from "./icons/base-logo.svg";
import {
avalanche as avalancheOriginal,
avalancheFuji as avalancheFujiOriginal,
Expand All @@ -11,10 +8,18 @@ import {
zkSync as zkSyncOriginal,
base as baseOriginal,
} from "@wagmi/chains";
import FantomFTMLogo from "./assets/fantom-ftm-logo.png";
import { ChainId } from "./chain-ids";
import { getConfig } from "./config";

export const PublicGoodsNetworkIcon =
"https://ipfs.io/ipfs/Qmagrvn2SY5TEoLgqUtcc1745ABZTFoPmod37tW37u7HYo";
export const ZkSyncIcon =
"https://ipfs.io/ipfs/QmUcGLhpBWRXD3CMbXZQT99adetptxXPqQYA6Pghb4WKSR";
export const BaseLogo =
"https://ipfs.io/ipfs/QmQaAsfJpUuKmpX3eJEzgdZjqqFWmWHXnDy3MpPVJyDzcj";
export const FantomFTMLogo =
"https://ipfs.io/ipfs/QmRJgxRqXUpHeskg48qeehUK97FzCAY7espZhTAVdrh9B9";

const config = getConfig();

export const fantom: Chain = {
Expand Down Expand Up @@ -88,7 +93,7 @@ export const avalanche: Chain = {

export const zkSyncEraTestnet: Chain = {
...zkSyncTestnetOriginal,
iconUrl: zkSyncIcon,
iconUrl: ZkSyncIcon,
rpcUrls: {
default: {
http: ["https://testnet.era.zksync.dev"],
Expand All @@ -101,7 +106,7 @@ export const zkSyncEraTestnet: Chain = {

export const zkSyncEraMainnet: Chain = {
...zkSyncOriginal,
iconUrl: zkSyncIcon,
iconUrl: ZkSyncIcon,
rpcUrls: {
default: {
http: ["https://mainnet.era.zksync.io"],
Expand Down
23 changes: 23 additions & 0 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"include": ["src/**/*"],
"compilerOptions": {
"target": "es2020",
"lib": ["dom", "dom.iterable", "esnext"],
"outDir": "dist",
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"sourceMap": true,
"declaration": true
},
}

59 changes: 54 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.