Skip to content

Commit

Permalink
bump viem
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Oct 12, 2023
1 parent 262eaa2 commit 4c83c8d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions packages/ensjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@
"typedoc": "^0.24.8",
"typedoc-plugin-markdown": "^4.0.0-next.16",
"typescript": "^5.1.6",
"viem": "^1.12.2",
"viem": "^1.16.4",
"wait-on": "^6.0.1"
},
"peerDependencies": {
"viem": "^1.12.2"
"viem": "^1.16.4"
}
}
3 changes: 2 additions & 1 deletion packages/ensjs/src/clients/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
type Chain,
type Client,
type ClientConfig,
type PublicRpcSchema,
type Transport,
} from 'viem'
import { addEnsContracts } from '../contracts/addEnsContracts.js'
Expand Down Expand Up @@ -32,7 +33,7 @@ export type EnsPublicClient<
TTransport,
TChain,
undefined,
undefined,
PublicRpcSchema,
EnsPublicActions & EnsSubgraphActions
>
>
Expand Down
3 changes: 2 additions & 1 deletion packages/ensjs/src/clients/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
type Chain,
type Client,
type ClientConfig,
type PublicRpcSchema,
type Transport,
} from 'viem'
import { addEnsContracts } from '../contracts/addEnsContracts.js'
Expand All @@ -27,7 +28,7 @@ export type EnsSubgraphClient<
TTransport extends Transport = Transport,
TChain extends ChainWithEns = ChainWithEns,
> = Prettify<
Client<TTransport, TChain, undefined, undefined, EnsSubgraphActions>
Client<TTransport, TChain, undefined, PublicRpcSchema, EnsSubgraphActions>
>

/**
Expand Down
9 changes: 6 additions & 3 deletions packages/ensjs/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ export type Prettify<T> = {
[K in keyof T]: T[K]
} & {}

export type SimpleTransactionRequest = Prettify<
Required<Pick<TransactionRequest, 'to' | 'data'>>
>
export type SimpleTransactionRequest = {
[P in keyof Pick<TransactionRequest, 'to' | 'data'>]-?: Exclude<
TransactionRequest[P],
null
>
}

export type TransactionRequestWithPassthrough = SimpleTransactionRequest & {
passthrough?: any
Expand Down
3 changes: 2 additions & 1 deletion packages/ensjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"types": ["jest"],
"resolveJsonModule": true,
"paths": {
"abitype": ["./node_modules/abitype/dist"]
"abitype": ["./node_modules/abitype/dist"],
"viem": ["./node_modules/viem/_types"]
}
}
}
21 changes: 7 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4c83c8d

Please sign in to comment.