Skip to content

Commit

Permalink
Merge pull request #106 from Threshold-USD/chore/update-namings-to-th…
Browse files Browse the repository at this point in the history
…resholdusd

chore: update liquity namings to thresholdusd
  • Loading branch information
evandrosaturnino authored Dec 5, 2023
2 parents a381169 + 55db3c9 commit a7e0f37
Show file tree
Hide file tree
Showing 106 changed files with 633 additions and 756 deletions.
591 changes: 251 additions & 340 deletions README.md

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "liquity",
"name": "threshold-usd",
"private": true,
"workspaces": {
"packages": [
Expand Down Expand Up @@ -44,53 +44,53 @@
},
"scripts": {
"build": "run-s build:*",
"build:dev-frontend": "yarn workspace @liquity/dev-frontend build",
"build:subgraph": "yarn workspace @liquity/subgraph build",
"deploy": "yarn workspace @liquity/lib-ethers hardhat deploy",
"build:dev-frontend": "yarn workspace @threshold-usd/dev-frontend build",
"build:subgraph": "yarn workspace @threshold-usd/subgraph build",
"deploy": "yarn workspace @threshold-usd/lib-ethers hardhat deploy",
"docs": "run-s docs:*",
"docs:collect-sdk-apis": "node scripts/collect-sdk-apis.js",
"docs:api-documenter": "api-documenter generate -i temp/sdk-apis -o docs/sdk",
"fuzzer": "yarn workspace @liquity/fuzzer fuzzer",
"fuzzer": "yarn workspace @threshold-usd/fuzzer fuzzer",
"prepare": "run-s prepare:*",
"prepare:contracts": "yarn workspace @liquity/contracts prepare",
"prepare:lib-base": "yarn workspace @liquity/lib-base prepare",
"prepare:lib-ethers": "yarn workspace @liquity/lib-ethers prepare",
"prepare:lib-react": "yarn workspace @liquity/lib-react prepare",
"prepare:lib-subgraph": "yarn workspace @liquity/lib-subgraph prepare",
"prepare:providers": "yarn workspace @liquity/providers prepare",
"prepare:subgraph": "yarn workspace @liquity/subgraph prepare",
"prepare:contracts": "yarn workspace @threshold-usd/contracts prepare",
"prepare:lib-base": "yarn workspace @threshold-usd/lib-base prepare",
"prepare:lib-ethers": "yarn workspace @threshold-usd/lib-ethers prepare",
"prepare:lib-react": "yarn workspace @threshold-usd/lib-react prepare",
"prepare:lib-subgraph": "yarn workspace @threshold-usd/lib-subgraph prepare",
"prepare:providers": "yarn workspace @threshold-usd/providers prepare",
"prepare:subgraph": "yarn workspace @threshold-usd/subgraph prepare",
"prepare:docs": "run-s docs",
"rebuild": "run-s prepare build",
"release": "run-s release:*",
"release:delete-dev-deployments": "yarn workspace @liquity/lib-ethers delete-dev-deployments",
"release:lib-base": "yarn workspace @liquity/lib-base semantic-release",
"release:lib-ethers": "yarn workspace @liquity/lib-ethers semantic-release",
"release:lib-react": "yarn workspace @liquity/lib-react semantic-release",
"release:providers": "yarn workspace @liquity/providers semantic-release",
"save-live-version": "yarn workspace @liquity/lib-ethers save-live-version",
"release:delete-dev-deployments": "yarn workspace @threshold-usd/lib-ethers delete-dev-deployments",
"release:lib-base": "yarn workspace @threshold-usd/lib-base semantic-release",
"release:lib-ethers": "yarn workspace @threshold-usd/lib-ethers semantic-release",
"release:lib-react": "yarn workspace @threshold-usd/lib-react semantic-release",
"release:providers": "yarn workspace @threshold-usd/providers semantic-release",
"save-live-version": "yarn workspace @threshold-usd/lib-ethers save-live-version",
"start-dev-chain": "run-s start-dev-chain:*",
"start-dev-chain:openethereum": "node dev-chain/start.js",
"start-dev-chain:prepare-providers": "yarn prepare:providers",
"start-dev-chain:deploy-contracts": "yarn deploy --network dev",
"start-dev-chain:prepare-lib-ethers": "yarn prepare:lib-ethers",
"stop-dev-chain": "docker kill openethereum",
"start-dev-frontend": "yarn workspace @liquity/dev-frontend start",
"start-dev-frontend": "yarn workspace @threshold-usd/dev-frontend start",
"start-demo": "run-s start-demo:*",
"start-demo:dev-chain": "yarn start-dev-chain",
"start-demo:dev-frontend": "yarn workspace @liquity/dev-frontend start-demo",
"start-demo:dev-frontend": "yarn workspace @threshold-usd/dev-frontend start-demo",
"stop-demo": "yarn stop-dev-chain",
"test": "run-s test:*",
"test:lib-base": "yarn workspace @liquity/lib-base test",
"test:lib-ethers": "yarn workspace @liquity/lib-ethers test",
"test:lib-base": "yarn workspace @threshold-usd/lib-base test",
"test:lib-ethers": "yarn workspace @threshold-usd/lib-ethers test",
"test:dev-frontend": "run-s --continue-on-error test:dev-frontend:*",
"test:dev-frontend:start-dev-chain": "yarn start-dev-chain",
"test:dev-frontend:run": "yarn workspace @liquity/dev-frontend test --watchAll=false --forceExit --detectOpenHandles",
"test:dev-frontend:run": "yarn workspace @threshold-usd/dev-frontend test --watchAll=false --forceExit --detectOpenHandles",
"test:dev-frontend:stop-dev-chain": "yarn stop-dev-chain",
"test-contracts": "yarn workspace @liquity/contracts test",
"test-contracts": "yarn workspace @threshold-usd/contracts test",
"test-live": "run-s test-live:*",
"test-live:lib-ethers": "yarn workspace @liquity/lib-ethers test-live",
"test-live:lib-ethers": "yarn workspace @threshold-usd/lib-ethers test-live",
"coverage": "run-s coverage:*",
"coverage:contracts": "yarn workspace @liquity/contracts coverage"
"coverage:contracts": "yarn workspace @threshold-usd/contracts coverage"
},
"devDependencies": {
"@commitlint/cli": "^12.0.1",
Expand Down
24 changes: 12 additions & 12 deletions package.public.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "liquity",
"name": "threshold-usd",
"private": true,
"workspaces": {
"packages": ["packages/*"],
Expand All @@ -14,24 +14,24 @@
},
"scripts": {
"build": "run-s build:*",
"build:dev-frontend": "yarn workspace @liquity/dev-frontend build",
"build:subgraph": "yarn workspace @liquity/subgraph build",
"build:dev-frontend": "yarn workspace @threshold-usd/dev-frontend build",
"build:subgraph": "yarn workspace @threshold-usd/subgraph build",
"docs": "run-s docs:*",
"docs:collect-sdk-apis": "node scripts/collect-sdk-apis.js",
"docs:api-documenter": "api-documenter generate -i temp/sdk-apis -o docs/sdk",
"prepare": "run-s prepare:*",
"prepare:lib-base": "yarn workspace @liquity/lib-base prepare",
"prepare:lib-base": "yarn workspace @threshold-usd/lib-base prepare",
"prepare:lib-ethers": "run-s prepare:lib-ethers:*",
"prepare:lib-ethers:deployments": "yarn workspace @liquity/lib-ethers prepare:deployments",
"prepare:lib-ethers:tsc": "yarn workspace @liquity/lib-ethers prepare:tsc",
"prepare:lib-ethers:api": "yarn workspace @liquity/lib-ethers prepare:api",
"prepare:lib-react": "yarn workspace @liquity/lib-react prepare",
"prepare:lib-subgraph": "yarn workspace @liquity/lib-subgraph prepare",
"prepare:providers": "yarn workspace @liquity/providers prepare",
"prepare:subgraph": "yarn workspace @liquity/subgraph prepare",
"prepare:lib-ethers:deployments": "yarn workspace @threshold-usd/lib-ethers prepare:deployments",
"prepare:lib-ethers:tsc": "yarn workspace @threshold-usd/lib-ethers prepare:tsc",
"prepare:lib-ethers:api": "yarn workspace @threshold-usd/lib-ethers prepare:api",
"prepare:lib-react": "yarn workspace @threshold-usd/lib-react prepare",
"prepare:lib-subgraph": "yarn workspace @threshold-usd/lib-subgraph prepare",
"prepare:providers": "yarn workspace @threshold-usd/providers prepare",
"prepare:subgraph": "yarn workspace @threshold-usd/subgraph prepare",
"prepare:docs": "run-s docs",
"rebuild": "run-s prepare build",
"start-dev-frontend": "yarn workspace @liquity/dev-frontend start"
"start-dev-frontend": "yarn workspace @threshold-usd/dev-frontend start"
},
"devDependencies": {
"@microsoft/api-documenter": "^7.12.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@liquity/contracts",
"name": "@threshold-usd/contracts",
"version": "1.0.0",
"description": "",
"main": "truffle-config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@liquity/dev-frontend",
"name": "@threshold-usd/dev-frontend",
"version": "0.1.0",
"private": true,
"homepage": ".",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render } from "@testing-library/react";

import { Decimal, THUSD_MINIMUM_NET_DEBT, Trove as Vault } from "@liquity/lib-base";
import { Decimal, THUSD_MINIMUM_NET_DEBT, Trove } from "@threshold-usd/lib-base";

import App from "./App";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect } from "react";
import { Button, Flex, Spinner } from "theme-ui";

import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";

import { useThreshold } from "../hooks/ThresholdContext";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMemo } from "react";
import { Card } from "theme-ui";
import { Percent, LiquityStoreState, Decimal } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { Percent, LiquityStoreState, Decimal } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";

import { TopCard } from "./TopCard";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
ScriptableContext,
} from 'chart.js';
import { Line } from 'react-chartjs-2';
import { Decimal } from "@liquity/lib-base";
import { Decimal } from "@threshold-usd/lib-base";
import { useHover } from "../../../utils/hooks";
import { LoadingChart } from "./LoadingChart";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react";
import { ChartContext } from "./ChartContext";

import { useThreshold } from "../../../../hooks/ThresholdContext";
import { Decimal } from "@liquity/lib-base";
import { Decimal } from "@threshold-usd/lib-base";
import { fetchCoinGeckoPrice } from "./fetchCoinGeckoPrice";
import axios from "axios";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Decimal } from "@liquity/lib-base";
import { Decimal } from "@threshold-usd/lib-base";

type CoinGeckoSimplePriceResponse<T extends string, U extends string> = {
[P in T]: {
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/Dashboard/ColRatio.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Card } from "theme-ui";
import { Percent, LiquityStoreState, Decimal} from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { Percent, LiquityStoreState, Decimal} from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";

import { TopCard } from "./TopCard";

Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/Dashboard/EditPrice.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Decimal, LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { Decimal, LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { useState } from "react";
import { Button, Flex, Input, ThemeUICSSProperties } from "theme-ui";
import { useThreshold } from "../../hooks/ThresholdContext";
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/Dashboard/MintErc20.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { Button, Flex, } from "theme-ui";
import { useThreshold } from "../../hooks/ThresholdContext";
import { SystemStat } from "../SystemStat";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { Card } from "theme-ui";
import { Decimal, LiquityStoreState as ThresholdStoreState} from "@liquity/lib-base";
import { useThresholdSelector} from "@liquity/lib-react";
import { Decimal, LiquityStoreState as ThresholdStoreState} from "@threshold-usd/lib-base";
import { useThresholdSelector} from "@threshold-usd/lib-react";

import { TopCard } from "./TopCard";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Card } from "theme-ui";
import { COIN } from "../../utils/constants";

import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector} from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector} from "@threshold-usd/lib-react";

import { BottomCard } from "./BottomCard";

Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/Dashboard/VaultCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Card } from "theme-ui";

import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { VaultView } from "../Vault/context/types";
import { useVaultView } from "../Vault/context/VaultViewContext";

Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/FunctionalPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import { Wallet } from "@ethersproject/wallet";

import { Decimal, Difference, Trove as Vault } from "@liquity/lib-base";
import { ThresholdStoreProvider } from "@liquity/lib-react";
import { Decimal, Difference, Trove as Vault } from "@threshold-usd/lib-base";
import { ThresholdStoreProvider } from "@threshold-usd/lib-react";

import { useThreshold } from "../hooks/ThresholdContext";
import { VaultViewProvider } from "./Vault/context/VaultViewProvider";
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/LiquidationManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { StaticAmounts, Row } from "./Vault/Editor";
import { useThreshold } from "../hooks/ThresholdContext";
import { Transaction } from "./Transaction";
import { InfoIcon } from "./InfoIcon";
import { LiquityStoreState as ThresholdStoreState} from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState} from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";

const editableStyle: ThemeUICSSProperties = {
backgroundColor: "terciary",
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/PageRow.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector, VersionedCollateral } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector, VersionedCollateral } from "@threshold-usd/lib-react";
import { useEffect, useState } from "react";
import { Box, Container, Flex, Heading } from "theme-ui";
import { SystemStatsCard } from "./SystemStatsCard";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from "theme-ui";

import { Decimal } from "@liquity/lib-base";
import { Decimal } from "@threshold-usd/lib-base";

import { useThreshold } from "../../hooks/ThresholdContext";
import { useTransactionFunction } from "../Transaction";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useEffect, useState } from "react";
import { Box, Flex, Card, Link } from "theme-ui";

import { Decimal, Percent, LiquityStoreState as ThresholdStoreState, MINIMUM_COLLATERAL_RATIO } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { Decimal, Percent, LiquityStoreState as ThresholdStoreState, MINIMUM_COLLATERAL_RATIO } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";

import { COIN } from "../../utils/constants";

Expand Down
6 changes: 3 additions & 3 deletions packages/dev-frontend/src/components/RiskyVaults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
CRITICAL_COLLATERAL_RATIO,
UserTrove as UserVault,
Decimal
} from "@liquity/lib-base";
import { BlockPolledLiquityStoreState as BlockPolledThresholdStoreState } from "@liquity/lib-ethers";
import { useThresholdSelector } from "@liquity/lib-react";
} from "@threshold-usd/lib-base";
import { BlockPolledLiquityStoreState as BlockPolledThresholdStoreState } from "@threshold-usd/lib-ethers";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { Web3Provider } from "@ethersproject/providers";
import { useWeb3React } from "@web3-react/core";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useEffect } from "react";
import { Card, Box, Flex, Button, Link } from "theme-ui";

import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";

import { COIN } from "../../utils/constants";
import { Icon } from "../Icon";
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-frontend/src/components/Stability/NoDeposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useTransactionFunction } from "../Transaction";
import { useThreshold } from "./../../hooks/ThresholdContext";
import { COIN, DARK_FILTER } from "../../utils/constants";
import { InfoIcon } from "../InfoIcon";
import { LiquityStoreState as ThresholdStoreState } from "@liquity/lib-base";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState } from "@threshold-usd/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { GenericIcon } from "../GenericIcon";
import { ActionDescription } from "../ActionDescription";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Decimal, BammDeposit, BammDepositChange, Difference, LiquityStoreState as ThresholdStoreState} from "@liquity/lib-base";
import { Decimal, BammDeposit, BammDepositChange, Difference, LiquityStoreState as ThresholdStoreState} from "@threshold-usd/lib-base";

import { COIN } from "../../utils/constants";
import { ActionDescription, Amount } from "../ActionDescription";
import { useThresholdSelector } from "@liquity/lib-react";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { Box } from "theme-ui";

export const select = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button } from "theme-ui";
import { Decimal, BammDepositChange } from "@liquity/lib-base";
import { Decimal, BammDepositChange } from "@threshold-usd/lib-base";

import { useThreshold } from "../../hooks/ThresholdContext";
import { useTransactionFunction } from "../Transaction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
BammDeposit,
LiquityStoreState as ThresholdStoreState,
Difference
} from "@liquity/lib-base";
} from "@threshold-usd/lib-base";

import { useThresholdSelector } from "@liquity/lib-react";
import { useThresholdSelector } from "@threshold-usd/lib-react";

import { COIN } from "../../utils/constants";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useEffect } from "react";
import { Button, Flex, Link } from "theme-ui";

import { Decimal, Decimalish, LiquityStoreState } from "@liquity/lib-base";
import { ThresholdStoreUpdate, useThresholdReducer, useThresholdSelector } from "@liquity/lib-react";
import { Decimal, Decimalish, LiquityStoreState } from "@threshold-usd/lib-base";
import { ThresholdStoreUpdate, useThresholdReducer, useThresholdSelector } from "@threshold-usd/lib-react";

import { useMyTransactionState } from "../Transaction";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useCallback, useEffect, useRef } from "react";
import { useThresholdSelector } from "@liquity/lib-react";
import { LiquityStoreState as ThresholdStoreState, BammDeposit } from "@liquity/lib-base";
import { useThresholdSelector } from "@threshold-usd/lib-react";
import { LiquityStoreState as ThresholdStoreState, BammDeposit } from "@threshold-usd/lib-base";
import { StabilityViewContext } from "./StabilityViewContext";
import type { StabilityView, StabilityEvent } from "./types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {
Decimal,
BammDeposit,
BammDepositChange
} from "@liquity/lib-base";
} from "@threshold-usd/lib-base";

import {
Difference
} from "@liquity/lib-base";
} from "@threshold-usd/lib-base";

import { COIN } from "../../../utils/constants";
import { Amount } from "../../ActionDescription";
Expand Down
Loading

0 comments on commit a7e0f37

Please sign in to comment.