diff --git a/jest.config.ts b/jest.config.ts index 30279f6aac..cdafad4807 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -9,7 +9,7 @@ const jestConfig: JestConfigWithTsJest = { rootDir: "projects/sdk-wells", testMatch: ["/src/**/?(*.)+(spec|test).[jt]s?(x)", "/test/**/?(*.)+(spec|test).[jt]s?(x)"], moduleNameMapper: { - "@beanstalk/wells/(.*)$": "/src/$1", + "@beanstalk/sdk-wells/(.*)$": "/src/$1", "^src/(.*)$": "/src/$1" } }, diff --git a/projects/dex-ui/src/components/Swap/useSwapBuilder.tsx b/projects/dex-ui/src/components/Swap/useSwapBuilder.tsx index 34e5a733df..b9af4cf9cd 100644 --- a/projects/dex-ui/src/components/Swap/useSwapBuilder.tsx +++ b/projects/dex-ui/src/components/Swap/useSwapBuilder.tsx @@ -1,4 +1,4 @@ -import { SwapBuilder } from "@beanstalk/wells"; +import { SwapBuilder } from "@beanstalk/sdk-wells"; import { useEffect, useState } from "react"; import useSdk from "src/utils/sdk/useSdk"; import { useWells } from "src/wells/useWells"; diff --git a/projects/examples/package.json b/projects/examples/package.json index d956f64917..8ab3054c46 100644 --- a/projects/examples/package.json +++ b/projects/examples/package.json @@ -4,7 +4,7 @@ "dependencies": { "@beanstalk/sdk": "workspace:*", "@beanstalk/sdk-core": "workspace:*", - "@beanstalk/wells": "workspace:*", + "@beanstalk/sdk-wells": "workspace:*", "chalk": "4", "dotenv": "16.0.3", "table": "6.8.1" diff --git a/projects/examples/src/dex/deploy.ts b/projects/examples/src/dex/deploy.ts index c6bb2f1797..e4472f19b0 100644 --- a/projects/examples/src/dex/deploy.ts +++ b/projects/examples/src/dex/deploy.ts @@ -1,4 +1,4 @@ -import { Aquifer, WellFunction, WellsSDK, Well } from "@beanstalk/wells"; +import { Aquifer, WellFunction, WellsSDK, Well } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, provider, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/dex/flows/multi-reverse-unwrap-eth.ts b/projects/examples/src/dex/flows/multi-reverse-unwrap-eth.ts index c68893475e..c0dbaff075 100644 --- a/projects/examples/src/dex/flows/multi-reverse-unwrap-eth.ts +++ b/projects/examples/src/dex/flows/multi-reverse-unwrap-eth.ts @@ -1,7 +1,7 @@ import { Clipboard, FarmFromMode, FarmToMode, TokenValue } from "@beanstalk/sdk"; import chalk from "chalk"; import { BigNumber } from "ethers"; -import { WETH9__factory } from "@beanstalk/wells"; +import { WETH9__factory } from "@beanstalk/sdk-wells"; import { account as _account, impersonate, chain } from "../../setup"; import { getWell, getWellsFromAquifer } from "../utils"; diff --git a/projects/examples/src/dex/flows/multi-reverse-wrap-eth.ts b/projects/examples/src/dex/flows/multi-reverse-wrap-eth.ts index 756adb9ccb..201dee9e16 100644 --- a/projects/examples/src/dex/flows/multi-reverse-wrap-eth.ts +++ b/projects/examples/src/dex/flows/multi-reverse-wrap-eth.ts @@ -1,7 +1,7 @@ import { Clipboard, FarmFromMode, FarmToMode, TokenValue } from "@beanstalk/sdk"; import chalk from "chalk"; import { BigNumber } from "ethers"; -import { WETH9__factory } from "@beanstalk/wells"; +import { WETH9__factory } from "@beanstalk/sdk-wells"; import { account as _account, impersonate, chain } from "../../setup"; import { getWell, getWellsFromAquifer } from "../utils"; diff --git a/projects/examples/src/dex/flows/multi-unwrap-eth.ts b/projects/examples/src/dex/flows/multi-unwrap-eth.ts index 96fa8c2855..3a33215af4 100644 --- a/projects/examples/src/dex/flows/multi-unwrap-eth.ts +++ b/projects/examples/src/dex/flows/multi-unwrap-eth.ts @@ -2,7 +2,7 @@ import { Clipboard, FarmFromMode, FarmToMode, TokenValue } from "@beanstalk/sdk" import chalk from "chalk"; import { BigNumber } from "ethers"; import { account as _account, impersonate, chain } from "../../setup"; -import { WETH9__factory } from "@beanstalk/wells"; +import { WETH9__factory } from "@beanstalk/sdk-wells"; import { getWellsFromAquifer, getWell } from "../utils"; main().catch((e) => { diff --git a/projects/examples/src/dex/flows/multi-wrap-eth.ts b/projects/examples/src/dex/flows/multi-wrap-eth.ts index 8b00e63cc0..38b7738acc 100644 --- a/projects/examples/src/dex/flows/multi-wrap-eth.ts +++ b/projects/examples/src/dex/flows/multi-wrap-eth.ts @@ -2,7 +2,7 @@ import { Clipboard, FarmFromMode, FarmToMode, TokenValue } from "@beanstalk/sdk" import chalk from "chalk"; import { BigNumber } from "ethers"; import { account as _account, impersonate, chain } from "../../setup"; -import { WETH9__factory } from "@beanstalk/wells"; +import { WETH9__factory } from "@beanstalk/sdk-wells"; import { getWellsFromAquifer, getWell } from "../utils"; main().catch((e) => { diff --git a/projects/examples/src/dex/loadWells.ts b/projects/examples/src/dex/loadWells.ts index b11ef7e7ca..5660b0e59b 100644 --- a/projects/examples/src/dex/loadWells.ts +++ b/projects/examples/src/dex/loadWells.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, provider, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/dex/swaps.ts b/projects/examples/src/dex/swaps.ts index 6a8a604020..4db1b14988 100644 --- a/projects/examples/src/dex/swaps.ts +++ b/projects/examples/src/dex/swaps.ts @@ -1,5 +1,5 @@ import { BeanstalkSDK, Clipboard, Token, TokenValue } from "@beanstalk/sdk"; -import { Direction, SwapBuilder } from "@beanstalk/wells"; +import { Direction, SwapBuilder } from "@beanstalk/sdk-wells"; import chalk from "chalk"; import { account as _account, sdk, chain } from "../setup"; import { BigNumber } from "ethers"; diff --git a/projects/examples/src/wells/liquidity.ts b/projects/examples/src/wells/liquidity.ts index a49f29410d..91c04960a9 100644 --- a/projects/examples/src/wells/liquidity.ts +++ b/projects/examples/src/wells/liquidity.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, provider, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/loadWells.ts b/projects/examples/src/wells/loadWells.ts index 7c527b67c2..116c07ee79 100644 --- a/projects/examples/src/wells/loadWells.ts +++ b/projects/examples/src/wells/loadWells.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, provider, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/reset.ts b/projects/examples/src/wells/reset.ts index 04fb71c82c..7e010c3b1a 100644 --- a/projects/examples/src/wells/reset.ts +++ b/projects/examples/src/wells/reset.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, provider, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/revoke-approval.ts b/projects/examples/src/wells/revoke-approval.ts index 129d0cf8fa..e4a45264e6 100644 --- a/projects/examples/src/wells/revoke-approval.ts +++ b/projects/examples/src/wells/revoke-approval.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { TestUtils } from "@beanstalk/sdk"; import { signer, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/sampleData.ts b/projects/examples/src/wells/sampleData.ts index 007933d4ed..18e22b112f 100644 --- a/projects/examples/src/wells/sampleData.ts +++ b/projects/examples/src/wells/sampleData.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { TestUtils } from "@beanstalk/sdk"; import { signer, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/swap.ts b/projects/examples/src/wells/swap.ts index 251d39aa91..437d1a6f63 100644 --- a/projects/examples/src/wells/swap.ts +++ b/projects/examples/src/wells/swap.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/swaptest.ts b/projects/examples/src/wells/swaptest.ts index 4625561a19..3c5f776cf0 100644 --- a/projects/examples/src/wells/swaptest.ts +++ b/projects/examples/src/wells/swaptest.ts @@ -1,4 +1,4 @@ -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { BeanstalkSDK, TestUtils } from "@beanstalk/sdk"; import { signer, account, sdk as bsdk } from "../setup"; import { TokenValue } from "@beanstalk/sdk-core"; diff --git a/projects/examples/src/wells/wells.ts b/projects/examples/src/wells/wells.ts index 6155ee6f30..8982b1fe77 100644 --- a/projects/examples/src/wells/wells.ts +++ b/projects/examples/src/wells/wells.ts @@ -1,5 +1,5 @@ import { provider } from "../setup"; -import { WellsSDK, Well } from "@beanstalk/wells"; +import { WellsSDK, Well } from "@beanstalk/sdk-wells"; const WELL_ADDRESS = process.env.WELL_ADDRESS!; diff --git a/projects/sdk-wells/package.json b/projects/sdk-wells/package.json index 50b56ed128..3ab8f07e7c 100644 --- a/projects/sdk-wells/package.json +++ b/projects/sdk-wells/package.json @@ -1,5 +1,5 @@ { - "name": "@beanstalk/wells", + "name": "@beanstalk/sdk-wells", "version": "0.0.1", "description": "A JavaScript framework for interacting with the Beanstalk Wells.", "license": "MIT", diff --git a/projects/sdk/package.json b/projects/sdk/package.json index d9f6c98db1..1a1bdf0c3f 100644 --- a/projects/sdk/package.json +++ b/projects/sdk/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@beanstalk/sdk-core": "workspace:*", - "@beanstalk/wells": "workspace:*", + "@beanstalk/sdk-wells": "workspace:*", "@ethersproject/bytes": "5.7.0", "@ethersproject/logger": "5.7.0", "bn.js": "5.2.1", diff --git a/projects/sdk/src/Wells.ts b/projects/sdk/src/Wells.ts index 9c0cf2c1bc..80bc45610d 100644 --- a/projects/sdk/src/Wells.ts +++ b/projects/sdk/src/Wells.ts @@ -1,2 +1,2 @@ -export * from "@beanstalk/wells"; -export type { WellDetails, WellFunction, Pump, TxOverrides, PreloadOptions, CallStruct, QuoteResult } from "@beanstalk/wells"; +export * from "@beanstalk/sdk-wells"; +export type { WellDetails, WellFunction, Pump, TxOverrides, PreloadOptions, CallStruct, QuoteResult } from "@beanstalk/sdk-wells"; diff --git a/projects/sdk/src/lib/BeanstalkSDK.ts b/projects/sdk/src/lib/BeanstalkSDK.ts index 5342b7d648..f75fa8580f 100644 --- a/projects/sdk/src/lib/BeanstalkSDK.ts +++ b/projects/sdk/src/lib/BeanstalkSDK.ts @@ -15,7 +15,7 @@ import { Swap } from "src/lib/swap/Swap"; import { Bean } from "./bean"; import { Pools } from "./pools"; import defaultSettings from "src/defaultSettings.json"; -import { WellsSDK } from "@beanstalk/wells"; +import { WellsSDK } from "@beanstalk/sdk-wells"; import { ChainId } from "@beanstalk/sdk-core"; export type Provider = ethers.providers.JsonRpcProvider; diff --git a/yarn.lock b/yarn.lock index 6c0f4b9ed0..64e3b5bdb1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2270,7 +2270,7 @@ __metadata: dependencies: "@beanstalk/sdk": "workspace:*" "@beanstalk/sdk-core": "workspace:*" - "@beanstalk/wells": "workspace:*" + "@beanstalk/sdk-wells": "workspace:*" "@swc-node/register": 1.6.6 "@swc/core": 1.3.68 "@swc/helpers": 0.5.1 @@ -2353,96 +2353,96 @@ __metadata: languageName: unknown linkType: soft -"@beanstalk/sdk@workspace:*, @beanstalk/sdk@workspace:projects/sdk": +"@beanstalk/sdk-wells@workspace:*, @beanstalk/sdk-wells@workspace:projects/sdk-wells": version: 0.0.0-use.local - resolution: "@beanstalk/sdk@workspace:projects/sdk" + resolution: "@beanstalk/sdk-wells@workspace:projects/sdk-wells" dependencies: "@beanstalk/sdk-core": "workspace:*" - "@beanstalk/wells": "workspace:*" - "@ethersproject/bytes": 5.7.0 - "@ethersproject/logger": 5.7.0 - "@foundry-rs/hardhat-anvil": ^0.1.6 "@graphql-codegen/cli": 2.13.7 "@graphql-codegen/typescript": 2.7.4 "@graphql-codegen/typescript-graphql-request": ^4.5.6 "@graphql-codegen/typescript-operations": ^2.5.4 "@graphql-codegen/typescript-resolvers": 2.7.4 - "@nomiclabs/hardhat-ethers": ^2.1.1 "@rollup/plugin-commonjs": 23.0.2 "@rollup/plugin-json": 5.0.1 "@rollup/plugin-multi-entry": 6.0.0 "@rollup/plugin-node-resolve": 15.0.1 "@typechain/ethers-v5": ^10.1.0 - "@types/bn.js": ^5 - "@types/chai": ^4 - "@types/eslint": ^8 "@types/graphlib": 2.1.8 "@types/jest": ^29.1.2 - "@types/lodash.flattendeep": ^4 "@types/rimraf": ^3 - bn.js: 5.2.1 - chai: 4.3.6 dotenv: ^16.0.3 - eslint: 8.26.0 + ethers: ^5.0.0 graphlib: 2.1.8 graphql: 16.6.0 graphql-request: ^4 graphql-tag: 2.12.6 jest: ^29.2.0 - lodash.flattendeep: 4.4.0 rimraf: 3.0.2 rollup: 3.2.5 rollup-plugin-alias: 2.2.0 rollup-plugin-exclude-dependencies-from-bundle: 1.1.23 + rollup-plugin-sourcemaps: 0.6.3 rollup-plugin-typescript2: 0.34.1 - ts-jest: ^29.0.3 - ts-node: 10.9.1 tsc-alias: 1.7.0 tslib: 2.4.1 typechain: ^8.1.0 typescript: 4.8.4 peerDependencies: - ethers: 5.6.8 + ethers: ^5.0.0 languageName: unknown linkType: soft -"@beanstalk/wells@workspace:*, @beanstalk/wells@workspace:projects/sdk-wells": +"@beanstalk/sdk@workspace:*, @beanstalk/sdk@workspace:projects/sdk": version: 0.0.0-use.local - resolution: "@beanstalk/wells@workspace:projects/sdk-wells" + resolution: "@beanstalk/sdk@workspace:projects/sdk" dependencies: "@beanstalk/sdk-core": "workspace:*" + "@beanstalk/sdk-wells": "workspace:*" + "@ethersproject/bytes": 5.7.0 + "@ethersproject/logger": 5.7.0 + "@foundry-rs/hardhat-anvil": ^0.1.6 "@graphql-codegen/cli": 2.13.7 "@graphql-codegen/typescript": 2.7.4 "@graphql-codegen/typescript-graphql-request": ^4.5.6 "@graphql-codegen/typescript-operations": ^2.5.4 "@graphql-codegen/typescript-resolvers": 2.7.4 + "@nomiclabs/hardhat-ethers": ^2.1.1 "@rollup/plugin-commonjs": 23.0.2 "@rollup/plugin-json": 5.0.1 "@rollup/plugin-multi-entry": 6.0.0 "@rollup/plugin-node-resolve": 15.0.1 "@typechain/ethers-v5": ^10.1.0 + "@types/bn.js": ^5 + "@types/chai": ^4 + "@types/eslint": ^8 "@types/graphlib": 2.1.8 "@types/jest": ^29.1.2 + "@types/lodash.flattendeep": ^4 "@types/rimraf": ^3 + bn.js: 5.2.1 + chai: 4.3.6 dotenv: ^16.0.3 - ethers: ^5.0.0 + eslint: 8.26.0 graphlib: 2.1.8 graphql: 16.6.0 graphql-request: ^4 graphql-tag: 2.12.6 jest: ^29.2.0 + lodash.flattendeep: 4.4.0 rimraf: 3.0.2 rollup: 3.2.5 rollup-plugin-alias: 2.2.0 rollup-plugin-exclude-dependencies-from-bundle: 1.1.23 - rollup-plugin-sourcemaps: 0.6.3 rollup-plugin-typescript2: 0.34.1 + ts-jest: ^29.0.3 + ts-node: 10.9.1 tsc-alias: 1.7.0 tslib: 2.4.1 typechain: ^8.1.0 typescript: 4.8.4 peerDependencies: - ethers: ^5.0.0 + ethers: 5.6.8 languageName: unknown linkType: soft