Skip to content

Commit

Permalink
rename bleu-fi to bleu everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeirojose committed May 28, 2024
1 parent 8ccefce commit eca84e5
Show file tree
Hide file tree
Showing 181 changed files with 14,860 additions and 12,026 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* eslint-env node */

module.exports = require("@bleu-fi/eslint-config");
module.exports = require("@bleu/eslint-config");
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ strict-peer-dependencies=false
; Yarn Node Linker
node-linker=node-modules

; Scoped Registry Configuration for bleu-fi
; Scoped Registry Configuration for bleu
@bleu:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A Safe App to interact to create milkman orders on CoW Protocol.

## Repository Structure

The project uses a monorepo structure. See the repo's [wiki](https://github.com/bleu-fi/monorepo/wiki) to find more detail about each project structure.
The project uses a monorepo structure. See the repo's [wiki](https://github.com/bleu/monorepo/wiki) to find more detail about each project structure.

## Pre-requisites

Expand Down Expand Up @@ -76,8 +76,8 @@ foundryup

If you encounter any issues or need assistance:

1. Review our [wiki](https://github.com/bleu-fi/monorepo/wiki)
2. Check [open issues](https://github.com/bleu-fi/monorepo/issues) or create a new one.
1. Review our [wiki](https://github.com/bleu/monorepo/wiki)
2. Check [open issues](https://github.com/bleu/monorepo/issues) or create a new one.
3. Reach out to us at [[email protected]](mailto:[email protected]).

## Contributors
Expand All @@ -86,7 +86,7 @@ A heartfelt thanks to all who've contributed:

- **Nichollas Rennah** and **Marcos Tullyo**: Initial designs and development of for the metadata app.

Wish to be listed? Make a contribution and [open an issue](https://github.com/bleu-fi/monorepo/issues/new) or send a pull request.
Wish to be listed? Make a contribution and [open an issue](https://github.com/bleu/monorepo/issues/new) or send a pull request.

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions apps/balancer-tools/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const moduleExports = {
// Add the "@sentry/profiling-node" to serverComponentsExternalPackages.
serverComponentsExternalPackages: ["@sentry/profiling-node"],
},
transpilePackages: ["@bleu-fi/gql"],
transpilePackages: ["@bleu/gql"],
reactStrictMode: true,
swcMinify: true,
/**
Expand Down Expand Up @@ -86,5 +86,5 @@ module.exports = withSentryConfig(

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
},
}
);
18 changes: 9 additions & 9 deletions apps/balancer-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@bleu-fi/balancer-tools",
"name": "@bleu/balancer-tools",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "pnpm --filter=\"@bleu-fi/balancer-apr\" build && next build",
"build": "pnpm --filter=\"@bleu/balancer-apr\" build && next build",
"build:prepare:gql": "cd ../../ && pnpm run -C=packages/gql graphql:update-types",
"build:prepare:wagmi": "pnpm run wagmi",
"build:prepare": "pnpm npm-run-all -l --parallel 'build:prepare:gql'",
"dev": "pnpm npm-run-all -l --parallel dev:**",
"dev:next": "next dev",
"dev:get-pools": "pnpm --filter=\"@bleu-fi/balancer-apr\" build",
"dev:get-pools": "pnpm --filter=\"@bleu/balancer-apr\" build",
"start": "next start",
"wagmi": "wagmi generate",
"wagmi:watch": "wagmi generate --watch",
Expand All @@ -19,10 +19,10 @@
"test:watch": "pnpm exec jest --watchAll --verbose"
},
"dependencies": {
"@bleu-fi/balancer-apr": "workspace:^",
"@bleu-fi/gql": "workspace:*",
"@bleu-fi/math-poolsimulator": "workspace:*",
"@bleu-fi/tsconfig": "workspace:*",
"@bleu/balancer-apr": "workspace:^",
"@bleu/gql": "workspace:*",
"@bleu/math-poolsimulator": "workspace:*",
"@bleu/tsconfig": "workspace:*",
"@hookform/resolvers": "3.3.2",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-accordion": "^1.1.2",
Expand Down Expand Up @@ -75,8 +75,8 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@bleu-fi/eslint-config": "workspace:^",
"@bleu-fi/utils": "workspace:^",
"@bleu/eslint-config": "workspace:^",
"@bleu/utils": "workspace:^",
"@testing-library/jest-dom": "6.1.6",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "14.5.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/balancer-tools/seed.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { runETLs } from "@bleu-fi/balancer-apr";
import { runETLs } from "@bleu/balancer-apr";

runETLs();
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AMM } from "@bleu-fi/math-poolsimulator/src";
import { PoolPairData } from "@bleu-fi/math-poolsimulator/src/types";
import { AMM } from "@bleu/math-poolsimulator/src";
import { PoolPairData } from "@bleu/math-poolsimulator/src/types";

import { calculateDepthCost } from "#/app/poolsimulator/(components)/DepthCost";
import { PoolTypeEnum } from "#/app/poolsimulator/(types)";
Expand Down Expand Up @@ -37,7 +37,7 @@ describe("calculateDepthCost for Gyro2", () => {

beforeAll(async () => {
const mockAmmPromise = await convertAnalysisDataToAMM(
mockAnalysisDataGyro2,
mockAnalysisDataGyro2
);
if (!mockAmmPromise)
throw new Error("Failed to convert mock analysis data to AMM");
Expand All @@ -55,7 +55,7 @@ describe("calculateDepthCost for Gyro2", () => {
"out",
mockAnalysisDataGyro2,
mockAmm,
mockAnalysisDataGyro2.poolType,
mockAnalysisDataGyro2.poolType
);

expect(result.type).toBe("price limit");
Expand All @@ -70,7 +70,7 @@ describe("calculateDepthCost for Gyro2", () => {
"in",
mockAnalysisDataGyro2,
mockAmm,
mockAnalysisDataGyro2.poolType,
mockAnalysisDataGyro2.poolType
);

expect(result.type).toBe("2% of price change");
Expand All @@ -94,7 +94,7 @@ describe("calculateDepthCost for MetaStable", () => {

beforeAll(async () => {
const mockAmmPromise = await convertAnalysisDataToAMM(
mockAnalysisDataMetaStable,
mockAnalysisDataMetaStable
);
if (!mockAmmPromise)
throw new Error("Failed to convert mock analysis data to AMM");
Expand All @@ -108,7 +108,7 @@ describe("calculateDepthCost for MetaStable", () => {
"in",
mockAnalysisDataMetaStable,
mockAmm,
mockAnalysisDataMetaStable.poolType,
mockAnalysisDataMetaStable.poolType
);

expect(result.type).toBe("2% of price change");
Expand Down
10 changes: 5 additions & 5 deletions apps/balancer-tools/src/app/apr/(components)/Breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";

import { Pool } from "@bleu-fi/balancer-apr/src/lib/balancer/gauges";
import { Network } from "@bleu-fi/utils";
import { parseMMDDYYYYToDate } from "@bleu-fi/utils/date";
import { Pool } from "@bleu/balancer-apr/src/lib/balancer/gauges";
import { Network } from "@bleu/utils";
import { parseMMDDYYYYToDate } from "@bleu/utils/date";
import {
ChevronRightIcon,
ClipboardIcon,
Expand Down Expand Up @@ -107,7 +107,7 @@ export default function Breadcrumb() {
link={generatePoolPageLink(
parseMMDDYYYYToDate(searchParams.get("startAt")) as Date,
parseMMDDYYYYToDate(searchParams.get("endAt")) as Date,
{ network },
{ network }
)}
>
{network}
Expand All @@ -124,7 +124,7 @@ export default function Breadcrumb() {
<BreadcrumbItem
link={generatePoolPageLink(
parseMMDDYYYYToDate(searchParams.get("startAt")) as Date,
parseMMDDYYYYToDate(searchParams.get("endAt")) as Date,
parseMMDDYYYYToDate(searchParams.get("endAt")) as Date
)}
>
<div className="flex items-center gap-x-2">
Expand Down
10 changes: 5 additions & 5 deletions apps/balancer-tools/src/app/apr/(components)/HeaderEndButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { capitalize, networkIdFor, networksOnBalancer } from "@bleu-fi/utils";
import { formatDateToMMDDYYYY, parseMMDDYYYYToDate } from "@bleu-fi/utils/date";
import { capitalize, networkIdFor, networksOnBalancer } from "@bleu/utils";
import { formatDateToMMDDYYYY, parseMMDDYYYYToDate } from "@bleu/utils/date";
import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
import {
useParams,
Expand Down Expand Up @@ -43,8 +43,8 @@ export default function HeaderEndButton() {
parseMMDDYYYYToDate(startAtParam as string) as Date,
parseMMDDYYYYToDate(endAtParam as string) as Date,
null,
poolId,
),
poolId
)
);
};
const avaliableNetworks = Object.keys(networksOnBalancer).map((key) => ({
Expand Down Expand Up @@ -77,7 +77,7 @@ export default function HeaderEndButton() {
} = values;
handleDateUpdate(
formatDateToMMDDYYYY(from),
formatDateToMMDDYYYY(to as Date),
formatDateToMMDDYYYY(to as Date)
);
}}
initialDateFrom={startAtParam ?? undefined}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as balEmissions from "@bleu-fi/balancer-apr/src/lib/balancer/emissions";
import { dateToEpoch } from "@bleu-fi/utils/date";
import { formatNumber } from "@bleu-fi/utils/formatNumber";
import * as balEmissions from "@bleu/balancer-apr/src/lib/balancer/emissions";
import { dateToEpoch } from "@bleu/utils/date";
import { formatNumber } from "@bleu/utils/formatNumber";

import { getBALPriceForDateRange } from "../(utils)/getBALPriceForDateRange";
import OverviewCards, { getDatesDetails } from "./OverviewCards";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { capitalize, networksOnBalancer } from "@bleu-fi/utils";
import { capitalize, networksOnBalancer } from "@bleu/utils";
import * as Accordion from "@radix-ui/react-accordion";
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
import * as Popover from "@radix-ui/react-popover";
Expand Down Expand Up @@ -135,7 +135,7 @@ export function MoreFiltersButton() {
}
return count;
}, 0),
[selectedAttributes],
[selectedAttributes]
);

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatDate } from "@bleu-fi/utils";
import { formatDate } from "@bleu/utils";

import { KPI } from "./KPI";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { formatNumber } from "@bleu-fi/utils/formatNumber";
import { formatNumber } from "@bleu/utils/formatNumber";
import {
ChevronDownIcon,
DashIcon,
Expand Down Expand Up @@ -72,7 +72,7 @@ export function PoolListTable({
params.set("sort", accessor);
return params.toString();
},
[searchParams],
[searchParams]
);

const loadMorePools = async () => {
Expand Down Expand Up @@ -279,7 +279,7 @@ function APRHover({ apr }: { apr: APRwithoutBreakdown }) {

function OrderIcon(
searchParams: ReadonlyURLSearchParams,
fieldName: keyof PoolStats,
fieldName: keyof PoolStats
) {
if (searchParams.get("sort") !== fieldName) return <DashIcon />;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use client";

import POOLS_WITH_LIVE_GAUGES from "@bleu-fi/balancer-apr/src/lib/balancer/data/voting-gauges.json";
import POOLS_WITH_LIVE_GAUGES from "@bleu/balancer-apr/src/lib/balancer/data/voting-gauges.json";
import { useRouter, useSearchParams } from "next/navigation";

import { MultiSelectDropdown } from "./MultiSelectDropdown";

const AVALIABLE_TOKENS = [
...new Set(
POOLS_WITH_LIVE_GAUGES.flatMap((pool) =>
pool.tokens.map((token) => token.symbol),
),
pool.tokens.map((token) => token.symbol)
)
),
];

Expand Down
14 changes: 7 additions & 7 deletions apps/balancer-tools/src/app/apr/(components)/TopPoolsChart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { formatDate } from "@bleu-fi/utils";
import { formatDate } from "@bleu/utils";
import { greenDarkA } from "@radix-ui/colors";
import { useRouter } from "next/navigation";
import { Data, PlotMouseEvent, PlotType } from "plotly.js";
Expand All @@ -27,23 +27,23 @@ export default function TopPoolsChart({
result.tokens
.map(
(t) =>
`${t.symbol}${t.weight ? `-${(t.weight! * 100).toFixed()}%` : ""}`,
`${t.symbol}${t.weight ? `-${(t.weight! * 100).toFixed()}%` : ""}`
)
.join(" "),
`${result.apr.total.toFixed()}% APR`,
]);

const longestyAxisLabelLength = Math.max(
...yAxisLabels.map(
([tokenNames, aprLabel]) => tokenNames.length + aprLabel.length,
),
([tokenNames, aprLabel]) => tokenNames.length + aprLabel.length
)
);

const paddedYAxisLabels = yAxisLabels.map(([tokenNames, aprValue]) =>
[
tokenNames.padEnd(longestyAxisLabelLength - aprValue.length, " "),
aprValue,
].join(" "),
].join(" ")
);

const chartData: Data = {
Expand All @@ -65,7 +65,7 @@ export default function TopPoolsChart({
startAt,
endAt,
null,
clickedRoundData.poolId,
clickedRoundData.poolId
);
router.push(poolRedirectURL);
}
Expand All @@ -75,7 +75,7 @@ export default function TopPoolsChart({
<Plot
onClick={onClickHandler}
title={`Top APR Pools from ${formatDate(startAt)} to ${formatDate(
endAt,
endAt
)}`}
toolTip="Values are averaged for the given dates."
data={[chartData]}
Expand Down
Loading

0 comments on commit eca84e5

Please sign in to comment.