From 4703674b477cc5dd3626c51ea0ad508111339352 Mon Sep 17 00:00:00 2001 From: Will Cory Date: Mon, 17 Jul 2023 19:54:00 -0700 Subject: [PATCH] fix: Bad tsupconfig entrypoint --- packages/contracts-ts/src/actions.spec.ts | 31 ----------------------- packages/contracts-ts/tsup.config.ts | 2 +- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 packages/contracts-ts/src/actions.spec.ts diff --git a/packages/contracts-ts/src/actions.spec.ts b/packages/contracts-ts/src/actions.spec.ts deleted file mode 100644 index e88e5364eb2c..000000000000 --- a/packages/contracts-ts/src/actions.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { test, expect } from 'vitest' -import { getOptimismPortal } from './actions' -import { createConfig, configureChains } from 'wagmi' -import { jsonRpcProvider } from 'wagmi/providers/jsonRpc' -import { mainnet } from 'viem/chains' - -const { publicClient } = configureChains( - [mainnet], - [ - jsonRpcProvider({ - rpc: () => ({ - http: - import.meta.env.VITE_RPC_URL_L1_MAINNET ?? mainnet.rpcUrls.default[0], - }), - }), - ] -) - -createConfig({ - publicClient: ({ chainId }) => publicClient({ chainId }), -}) - -const blockNumber = BigInt(17681356) - -test('should be able to create a wagmi contract and use it', async () => { - const portal = getOptimismPortal({ chainId: 1 }) - expect(portal).toBeDefined() - expect(await portal.read.version({ blockNumber })).toMatchInlineSnapshot( - '"1.6.0"' - ) -}) diff --git a/packages/contracts-ts/tsup.config.ts b/packages/contracts-ts/tsup.config.ts index fcb9f3fb5405..08f18f247364 100644 --- a/packages/contracts-ts/tsup.config.ts +++ b/packages/contracts-ts/tsup.config.ts @@ -3,7 +3,7 @@ import packageJson from './package.json' export default defineConfig({ name: packageJson.name, - entry: ['src/index.ts', 'src/actions.ts', 'src/react.ts'], + entry: ['src/constants.ts', 'src/actions.ts', 'src/react.ts'], outDir: 'dist', format: ['esm', 'cjs'], splitting: false,