Skip to content

Commit

Permalink
🚨 fix: Run linter (#500)
Browse files Browse the repository at this point in the history
## Description

Run linter to fix broken lint

## Testing

Explain the quality checks that have been done on the code changes

## Additional Information

- [ ] I read the [contributing docs](../docs/contributing.md) (if this
is your first contribution)

Your ENS/address:

Co-authored-by: Will Cory <[email protected]>
  • Loading branch information
roninjin10 and Will Cory authored Oct 1, 2023
1 parent cda17e9 commit 2f6d176
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 65 deletions.
70 changes: 35 additions & 35 deletions core/src/event/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,40 @@ export type Events<
TName extends string,
THumanReadableAbi extends readonly string[],
> = {
[TEventName in ExtractAbiEventNames<ParseAbi<THumanReadableAbi>>]: (<
TStrict extends boolean = false,
TFromBlock extends BlockNumber | BlockTag | undefined = undefined,
TToBlock extends BlockNumber | BlockTag | undefined = undefined,
>(
params: Pick<
CreateEventFilterParameters<
ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>,
ParseAbi<THumanReadableAbi>,
TStrict,
TFromBlock,
TToBlock,
TEventName,
MaybeExtractEventArgsFromAbi<ParseAbi<THumanReadableAbi>, TEventName>
>,
'fromBlock' | 'toBlock' | 'args' | 'strict'
[TEventName in ExtractAbiEventNames<ParseAbi<THumanReadableAbi>>]: (<
TStrict extends boolean = false,
TFromBlock extends BlockNumber | BlockTag | undefined = undefined,
TToBlock extends BlockNumber | BlockTag | undefined = undefined,
>(
params: Pick<
CreateEventFilterParameters<
ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>,
ParseAbi<THumanReadableAbi>,
TStrict,
TFromBlock,
TToBlock,
TEventName,
MaybeExtractEventArgsFromAbi<ParseAbi<THumanReadableAbi>, TEventName>
>,
) => CreateEventFilterParameters<
ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>,
ParseAbi<THumanReadableAbi>,
TStrict,
TFromBlock,
TToBlock,
TEventName,
MaybeExtractEventArgsFromAbi<ParseAbi<THumanReadableAbi>, TEventName>
> & {
evmtsContractName: TName
eventName: TEventName
abi: [ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>]
}) & {
eventName: TEventName
humanReadableAbi: FormatAbi<
[ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>]
>
abi: [ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>]
}
'fromBlock' | 'toBlock' | 'args' | 'strict'
>,
) => CreateEventFilterParameters<
ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>,
ParseAbi<THumanReadableAbi>,
TStrict,
TFromBlock,
TToBlock,
TEventName,
MaybeExtractEventArgsFromAbi<ParseAbi<THumanReadableAbi>, TEventName>
> & {
evmtsContractName: TName
eventName: TEventName
abi: [ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>]
}) & {
eventName: TEventName
humanReadableAbi: FormatAbi<
[ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>]
>
abi: [ExtractAbiEvent<ParseAbi<THumanReadableAbi>, TEventName>]
}
}
28 changes: 14 additions & 14 deletions core/src/read/Read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ export type Read<
TName extends string,
THumanReadableAbi extends readonly string[],
> = {
[TFunctionName in
[TFunctionName in
ExtractAbiFunctionNames<ParseAbi<THumanReadableAbi>, 'pure' | 'view'>]: <
TArgs extends AbiParametersToPrimitiveTypes<
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
TArgs extends AbiParametersToPrimitiveTypes<
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
any[] = AbiParametersToPrimitiveTypes<
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
any[],
>(
...args: TArgs
) => TArgs['length'] extends 0
? {
>(
...args: TArgs
) => TArgs['length'] extends 0
? {
evmtsContractName: TName
functionName: TFunctionName
humanReadableAbi: FormatAbi<
[ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
>
abi: [ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
}
: {
}
: {
evmtsContractName: TName
functionName: TFunctionName
args: TArgs
humanReadableAbi: FormatAbi<
[ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
>
abi: [ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
}
}
}
}
28 changes: 14 additions & 14 deletions core/src/write/Write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@ export type Write<
TName extends string,
THumanReadableAbi extends readonly string[],
> = {
[TFunctionName in
[TFunctionName in
ExtractAbiFunctionNames<
ParseAbi<THumanReadableAbi>,
'payable' | 'nonpayable'
>]: <
TArgs extends AbiParametersToPrimitiveTypes<
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
TArgs extends AbiParametersToPrimitiveTypes<
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
any[] = AbiParametersToPrimitiveTypes<
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>['inputs']
> &
any[],
>(
...args: TArgs
) => TArgs['length'] extends 0
? {
>(
...args: TArgs
) => TArgs['length'] extends 0
? {
functionName: TFunctionName
humanReadableAbi: FormatAbi<
[ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
>
abi: [ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
}
: {
}
: {
evmtsContractName: TName
functionName: TFunctionName
args: TArgs
humanReadableAbi: FormatAbi<
[ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
>
abi: [ExtractAbiFunction<ParseAbi<THumanReadableAbi>, TFunctionName>]
}
}
}
}
7 changes: 6 additions & 1 deletion examples/esbuild/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ import { mainnet } from 'viem/chains'
import { z } from 'zod'

export const rpcUrls = {
1: z.string().url().optional().default(mainnet.rpcUrls.public.http[0]).parse(process.env.RPC_URL_MAINNET),
1: z
.string()
.url()
.optional()
.default(mainnet.rpcUrls.public.http[0])
.parse(process.env.RPC_URL_MAINNET),
}
3 changes: 2 additions & 1 deletion examples/esbuild/src/ownerOf.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe(ownerOf.name, () => {
'"0x1a1E021A302C237453D3D45c7B82B19cEEB7E2e6"',
)
await expect(ownerOf(BigInt(420))).resolves.toMatchInlineSnapshot(
'"0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC"')
'"0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC"',
)
})
})

1 comment on commit 2f6d176

@vercel
Copy link

@vercel vercel bot commented on 2f6d176 Oct 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

evmts-docs – ./

evmts-docs-git-main-evmts.vercel.app
evmts.dev
evmts-docs-evmts.vercel.app

Please sign in to comment.