Commit 4703674b authored by Will Cory's avatar Will Cory

fix: Bad tsupconfig entrypoint

parent 346d7885
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"'
)
})
...@@ -3,7 +3,7 @@ import packageJson from './package.json' ...@@ -3,7 +3,7 @@ import packageJson from './package.json'
export default defineConfig({ export default defineConfig({
name: packageJson.name, 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', outDir: 'dist',
format: ['esm', 'cjs'], format: ['esm', 'cjs'],
splitting: false, splitting: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment