-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📦 Feat: @tevm/whatsabi #1345
📦 Feat: @tevm/whatsabi #1345
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 160 files out of 278 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the WalkthroughThe recent updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ContractUriParser
participant ContractUriResolver
participant Whatsabi
User->>ContractUriParser: Provide contract URI
ContractUriParser->>ContractUriResolver: Parse URI components
ContractUriResolver->>Whatsabi: Resolve contract details
Whatsabi-->>ContractUriResolver: Return ABI, address, bytecode
ContractUriResolver-->>User: Provide contract information
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @roninjin10 and the rest of your teammates on Graphite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Outside diff range, codebase verification and nitpick comments (2)
bundler-packages/whatsabi/src/parseUri.js (1)
1-2
: Consider organizing imports.Organizing imports can improve readability and maintainability. Group related imports together.
import { getAddress } from '@tevm/utils' import { contractUriPattern } from './contractUriPattern.js'bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js (1)
7-21
: Ensure error message provides actionable guidance.The error message should provide clear and actionable guidance for the user.
- `Unknown chain ID: ${chainId}. No default rpc known. Please pass in a valid rpc url as a query string \`?rpcUrl=${rpcUrl}\` or open a pr to viem to add your chain to viem/chains`, + `Unknown chain ID: ${chainId}. No default RPC known. Please pass in a valid RPC URL as a query string \`?rpcUrl=<your_rpc_url>\` or open a PR to viem to add your chain to viem/chains.`,
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (18)
- bundler-packages/whatsabi/.gitignore (1 hunks)
- bundler-packages/whatsabi/LICENSE (1 hunks)
- bundler-packages/whatsabi/README.md (1 hunks)
- bundler-packages/whatsabi/biome.json (1 hunks)
- bundler-packages/whatsabi/package.json (1 hunks)
- bundler-packages/whatsabi/src/ContractUri.ts (1 hunks)
- bundler-packages/whatsabi/src/KnownChainIds.ts (1 hunks)
- bundler-packages/whatsabi/src/KnownChainsType.ts (1 hunks)
- bundler-packages/whatsabi/src/ParsedUri.ts (1 hunks)
- bundler-packages/whatsabi/src/contractUriPattern.js (1 hunks)
- bundler-packages/whatsabi/src/index.ts (1 hunks)
- bundler-packages/whatsabi/src/knownChains.js (1 hunks)
- bundler-packages/whatsabi/src/parseUri.js (1 hunks)
- bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js (1 hunks)
- bundler-packages/whatsabi/tsconfig.json (1 hunks)
- bundler-packages/whatsabi/tsup.config.ts (1 hunks)
- bundler-packages/whatsabi/typedoc.json (1 hunks)
- bundler-packages/whatsabi/vitest.config.ts (1 hunks)
Files skipped from review due to trivial changes (10)
- bundler-packages/whatsabi/.gitignore
- bundler-packages/whatsabi/LICENSE
- bundler-packages/whatsabi/README.md
- bundler-packages/whatsabi/package.json
- bundler-packages/whatsabi/src/KnownChainIds.ts
- bundler-packages/whatsabi/src/contractUriPattern.js
- bundler-packages/whatsabi/src/index.ts
- bundler-packages/whatsabi/tsup.config.ts
- bundler-packages/whatsabi/typedoc.json
- bundler-packages/whatsabi/vitest.config.ts
Additional context used
Biome
bundler-packages/whatsabi/src/parseUri.js
[error] 14-14: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.(lint/style/useNumberNamespace)
Additional comments not posted (15)
bundler-packages/whatsabi/src/ContractUri.ts (1)
1-4
: LGTM!The type definition for
ContractUri
is well-structured and leverages TypeScript's template literal types effectively.bundler-packages/whatsabi/tsconfig.json (1)
1-10
: LGTM!The TypeScript configuration settings are standard and align with best practices.
bundler-packages/whatsabi/src/ParsedUri.ts (1)
1-11
: LGTM!The type definition for
ParsedUri
is comprehensive and covers various aspects of Ethereum contract URIs.bundler-packages/whatsabi/src/parseUri.js (1)
15-15
: EnsuregetAddress
handles invalid addresses.Verify that
getAddress
handles invalid addresses appropriately to avoid potential issues.Verification successful
Verified that
getAddress
handles invalid addresses appropriately.The
getAddress
function checks if the address is valid usingisAddress
and throws anInvalidAddressError
if it is not, ensuring proper error handling for invalid addresses.
experimental/viem-effect/src-viem/_esm/utils/address/getAddress.js
experimental/viem-effect/src-viem/_cjs/utils/address/getAddress.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `getAddress` handles invalid addresses appropriately. # Test: Search for the function implementation. Expect: Proper error handling for invalid addresses. rg --type js -A 5 $'function getAddress'Length of output: 2388
bundler-packages/whatsabi/biome.json (4)
37-43
: Ensure formatter settings meet project standards.Verify that the formatter settings align with the project's coding standards.
Verification successful
Formatter settings in
bundler-packages/whatsabi/biome.json
align with project standards.The formatter settings in
bundler-packages/whatsabi/biome.json
are consistent with those in otherbiome.json
files across the project, indicating adherence to the project's coding standards.
enabled
: trueformatWithErrors
: falseindentStyle
: tabindentWidth
: 2lineWidth
: 120quoteStyle
: singletrailingCommas
: allsemicolons
: asNeededScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify formatter settings. # Test: Search for project coding standards. Expect: Alignment with formatter settings. rg --type json -A 5 $'formatter'Length of output: 34394
44-67
: Ensure linter settings meet project standards.Verify that the linter settings align with the project's coding standards.
Verification successful
Linter settings verified
The linter settings in
bundler-packages/whatsabi/biome.json
align with the project's standards as indicated by the consistency across multiplebiome.json
files and theCONTRIBUTING.md
file in the project.
bundler-packages/whatsabi/biome.json
bundler-packages/config/CONTRIBUTING.md
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify linter settings. # Test: Search for project coding standards. Expect: Alignment with linter settings. rg --type json -A 5 $'linter'Length of output: 16814
Script:
#!/bin/bash # Description: Search for central linter configuration or documentation in the project. # Search for any central linter configuration file or documentation that might define the project's linter standards. rg --files | grep -E 'linter|lint|eslint|biome|config|readme|docs' | xargs rg -i 'linter|lint|rules|standards'Length of output: 111912
70-75
: Ensure JavaScript formatter settings meet project standards.Verify that the JavaScript formatter settings align with the project's coding standards.
3-5
: Ensure import organization settings meet project standards.Verify that the import organization settings align with the project's coding standards.
bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js (1)
39-42
: EnsurecreateClient
handles missingrpcUrl
.Verify that
createClient
handles cases whererpcUrl
is missing.Verification successful
Verified:
createClient
handles missingrpcUrl
appropriately.The
http
function, used as the transport increateClient
, throws aUrlRequiredError
if theurl
parameter is missing, ensuring thatcreateClient
handles the case whererpcUrl
is missing.
experimental/viem-effect/src-viem/_esm/clients/transports/http.js
experimental/viem-effect/src-viem/_cjs/clients/transports/http.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `createClient` handles missing `rpcUrl` appropriately. # Test: Search for the function implementation. Expect: Proper error handling for missing `rpcUrl`. rg --type js -A 5 $'function createClient'Length of output: 1097
Script:
#!/bin/bash # Extract the full implementation of the `createClient` function from both files. # Extract the full function from the first file ast-grep --lang javascript --pattern $'function createClient($_) { $$$ }' experimental/viem-effect/src-viem/_esm/clients/createClient.js # Extract the full function from the second file ast-grep --lang javascript --pattern $'function createClient($_) { $$$ }' experimental/viem-effect/src-viem/_cjs/clients/createClient.jsLength of output: 7536
Script:
#!/bin/bash # Locate and extract the implementation of the `parameters.transport` function or method. # Search for the definition of the transport function rg --type js 'function transport' -A 10 # Search for the definition of the transport method rg --type js 'transport: function' -A 10Length of output: 84
Script:
#!/bin/bash # Search for the usage and definition of the `transport` keyword in the files where `createClient` is defined. # Search for `transport` in the first file rg --type js 'transport' experimental/viem-effect/src-viem/_esm/clients/createClient.js -A 5 -B 5 # Search for `transport` in the second file rg --type js 'transport' experimental/viem-effect/src-viem/_cjs/clients/createClient.js -A 5 -B 5Length of output: 1152
Script:
#!/bin/bash # Search for the definition of `transport` across the entire codebase. # Search for the definition of the transport function or variable rg --type js 'transport' -A 5 -B 5Length of output: 249915
bundler-packages/whatsabi/src/knownChains.js (3)
6-202
: LGTM! The knownChains object is well-structured.The mappings of chain IDs to chain configurations are accurate and follow a consistent pattern.
3-5
: LGTM! The type annotation is accurate and helpful.The JSDoc comment provides a clear type annotation for the
knownChains
object.
1-1
: Verify the necessity of importing all chains.Importing all chains might lead to unused imports. Ensure that all imported chains are utilized in the
knownChains
object.Verification successful
Let's re-run the script without specifying the file type to ensure we capture all usages of the
chains
import.
The import of all chains is necessary and utilized.
The
chains
import is extensively used in thebundler-packages/whatsabi/src/knownChains.js
file, confirming that it is necessary and not leading to unused imports.
bundler-packages/whatsabi/src/knownChains.js
: Multiple instances ofchains
usage found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of all imported chains. # Test: Search for the usage of each imported chain. Expect: All imported chains are utilized. rg --type javascript -A 5 $'chains\.\w+'Length of output: 76
Script:
#!/bin/bash # Description: Verify the usage of all imported chains. # Test: Search for the usage of each imported chain. Expect: All imported chains are utilized. rg -A 5 'chains\.\w+'Length of output: 45140
bundler-packages/whatsabi/src/KnownChainsType.ts (3)
1-2
: LGTM! The imports are necessary and correctly used.The imports from 'viem/chains' are necessary for defining the known chains and their types.
4-5
: LGTM! The type definition is accurate.The KnownChainsType provides a clear and accurate type for the known chains.
7-203
: LGTM! The knownChains object is well-structured.The mappings of chain IDs to chain configurations are accurate and follow a consistent pattern.
return undefined | ||
} | ||
|
||
const chainId = parseInt(match.groups?.['chainId'] ?? '1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Number.parseInt
instead of parseInt
.
Using Number.parseInt
is recommended for consistency with ES2015 standards.
- const chainId = parseInt(match.groups?.['chainId'] ?? '1')
+ const chainId = Number.parseInt(match.groups?.['chainId'] ?? '1')
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const chainId = parseInt(match.groups?.['chainId'] ?? '1') | |
const chainId = Number.parseInt(match.groups?.['chainId'] ?? '1') |
Tools
Biome
[error] 14-14: Use Number.parseInt instead of the equivalent global.
ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.parseInt instead.(lint/style/useNumberNamespace)
|
||
export type KnownChainsType = typeof knownChains | ||
|
||
// TODO this is just lazily copying this twice we could do this cleaner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address the TODO comment.
The TODO comment indicates that the structure can be improved. Consider refactoring to avoid redundancy.
- // TODO this is just lazily copying this twice we could do this cleaner
+ // TODO: Refactor to avoid redundancy in defining known chains.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// TODO this is just lazily copying this twice we could do this cleaner | |
// TODO: Refactor to avoid redundancy in defining known chains. |
return { | ||
chainId: /** @type {import('./KnownChainIds.js').KnownChainIds}*/ (chainId), | ||
address: address, | ||
rpcUrl: params.get('rpcUrl') || undefined, | ||
etherscanApiKey: params.get('etherscanApiKey') || undefined, | ||
etherscanBaseUrl: params.get('etherscanBaseUrl') || undefined, | ||
followProxies: params.get('followProxies') === 'true' || undefined, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a type guard for chainId
.
Adding a type guard for chainId
ensures it matches known chain IDs.
const chainId = /** @type {import('./KnownChainIds.js').KnownChainIds}*/ (chainId)
if (!Object.values(import('./KnownChainIds.js').KnownChainIds).includes(chainId)) {
return undefined
}
Committable suggestion was skipped due to low confidence.
} | ||
} | ||
|
||
// TODO pass in tevm config too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: Add configuration for tevm.
The TODO comment indicates that configuration for tevm is missing.
Do you want me to generate the configuration code or open a GitHub issue to track this task?
export const resolveWithWhatsabi = async (contractUri) => { | ||
const parsedUri = parseUri(contractUri) | ||
if (!parsedUri) { | ||
return undefined | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle undefined parsedUri
appropriately.
Ensure the function handles cases where parsedUri
is undefined.
- if (!parsedUri) {
- return undefined
- }
+ if (!parsedUri) {
+ throw new Error('Invalid contract URI')
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export const resolveWithWhatsabi = async (contractUri) => { | |
const parsedUri = parseUri(contractUri) | |
if (!parsedUri) { | |
return undefined | |
} | |
export const resolveWithWhatsabi = async (contractUri) => { | |
const parsedUri = parseUri(contractUri) | |
if (!parsedUri) { | |
throw new Error('Invalid contract URI') | |
} |
return { | ||
abi: /** @type {any}*/ (whatsabiResult.abi), | ||
address: whatsabiResult.address, | ||
deployedBytecode, | ||
// TODO if we can get a verified contract we should compile it with solc and return solc output too | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding additional context to the returned object.
Adding more context to the returned object can be useful for debugging and further processing.
return {
abi: /** @type {any}*/ (whatsabiResult.abi),
address: whatsabiResult.address,
deployedBytecode,
+ chainId: parsedUri.chainId,
+ rpcUrl: parsedUri.rpcUrl,
}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
return { | |
abi: /** @type {any}*/ (whatsabiResult.abi), | |
address: whatsabiResult.address, | |
deployedBytecode, | |
// TODO if we can get a verified contract we should compile it with solc and return solc output too | |
} | |
return { | |
abi: /** @type {any}*/ (whatsabiResult.abi), | |
address: whatsabiResult.address, | |
deployedBytecode, | |
// TODO if we can get a verified contract we should compile it with solc and return solc output too | |
chainId: parsedUri.chainId, | |
rpcUrl: parsedUri.rpcUrl, | |
} |
const deployedBytecode = await getCode(client, { address: whatsabiResult.address }) | ||
if (!deployedBytecode) { | ||
throw new Error('Could not fetch deployed bytecode') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle cases where deployedBytecode
is empty.
Ensure the function handles cases where deployedBytecode
is empty.
- if (!deployedBytecode) {
- throw new Error('Could not fetch deployed bytecode')
- }
+ if (!deployedBytecode || deployedBytecode.length === 0) {
+ throw new Error('Could not fetch deployed bytecode')
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const deployedBytecode = await getCode(client, { address: whatsabiResult.address }) | |
if (!deployedBytecode) { | |
throw new Error('Could not fetch deployed bytecode') | |
} | |
const deployedBytecode = await getCode(client, { address: whatsabiResult.address }) | |
if (!deployedBytecode || deployedBytecode.length === 0) { | |
throw new Error('Could not fetch deployed bytecode') | |
} |
…mts/tevm-monorepo into 07-27-_sparkles_feat_whatsabi_imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (5)
- bundler-packages/whatsabi/package.json (1 hunks)
- bundler-packages/whatsabi/src/contractUriPattern.js (1 hunks)
- bundler-packages/whatsabi/src/index.ts (1 hunks)
- bundler-packages/whatsabi/src/loadAbi.js (1 hunks)
- bundler-packages/whatsabi/src/resolveContractUri.js (1 hunks)
Files skipped from review due to trivial changes (1)
- bundler-packages/whatsabi/package.json
Files skipped from review as they are similar to previous changes (2)
- bundler-packages/whatsabi/src/contractUriPattern.js
- bundler-packages/whatsabi/src/index.ts
Additional comments not posted (7)
bundler-packages/whatsabi/src/loadAbi.js (3)
1-1
: Imports look good.The import statements are correct and necessary for the functionality of the file.
3-11
: JSDoc comment looks good.The JSDoc comment is well-written and provides necessary information for understanding the function's usage.
12-29
: Function implementation looks good.The
loadAbi
function is well-structured and uses appropriate loaders based on the provided options. It handles optional parameters correctly and ensures type safety.bundler-packages/whatsabi/src/resolveContractUri.js (4)
1-5
: Imports look good.The import statements are correct and necessary for the functionality of the file.
7-24
: Custom error class looks good.The
UnknownChainError
class is well-defined and provides useful information when an unknown chain ID is encountered.
28-33
: JSDoc comment looks good.The JSDoc comment is well-written and provides necessary information for understanding the function's usage.
34-69
: Function implementation looks good.The
resolveContractUri
function is well-structured and handles various scenarios, including unknown chain IDs and missing RPC URLs. It uses appropriate utilities and loaders to resolve the contract URI and fetch the deployed bytecode.
} | ||
} | ||
|
||
// TODO pass in tevm config too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: Address the TODO comment.
The TODO comment indicates that the tevm
config should be passed in.
Do you want me to help address this TODO or open a GitHub issue to track this task?
…rkles_feat_whatsabi_imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (1)
docs/src/content/docs/reference/@tevm/base-client/type-aliases/BaseClientOptions.md (1)
The
forkTransport
property is still present in the codebase.The
forkTransport
section has been removed from the documentation, but it is still referenced in multiple files throughout the codebase. Please ensure the documentation is consistent with the current implementation.
packages/procedures/src/eth/ethGetTransactionByHashProcedure.js
packages/procedures/src/eth/ethGetBlockByNumberProcedure.js
packages/procedures/src/eth/gasPriceProcedure.js
packages/procedures/src/eth/getStorageAtProcedure.spec.ts
packages/procedures/src/eth/gasPriceProcedure.spec.ts
packages/procedures/src/debug/debugTraceTransactionProcedure.js
packages/actions/src/internal/forkAndCacheBlock.js
packages/actions/src/eth/ethGetTransactionReceipt.js
packages/actions/src/eth/gasPriceHandler.spec.ts
packages/actions/src/eth/getBalanceHandler.js
packages/actions/src/eth/gasPriceHandler.js
packages/actions/src/eth/getCodeHandler.js
packages/actions/src/eth/ethGetLogsHandler.js
packages/actions/src/internal/forkAndCacheBlock.spec.ts
packages/actions/src/Call/cloneVmWithBlock.js
packages/actions/src/Call/cloneVmWithBlock.spec.ts
packages/base-client/src/createBaseClient.spec.ts
packages/base-client/src/createBaseClient.js
packages/base-client/src/BaseClient.ts
Analysis chain
Line range hint
1-158
:
Verify the removal of theforkTransport
section.The
forkTransport
section has been removed. Ensure that this change aligns with the overall documentation and codebase updates.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the removal of the `forkTransport` property in the codebase. # Test: Search for the `forkTransport` property in the codebase. Expect: No occurrences. rg --type ts --type tsx --type js --type jsx --type json 'forkTransport'Length of output: 100
Script:
#!/bin/bash # Description: Verify the removal of the `forkTransport` property in the codebase. # Test: Search for the `forkTransport` property in the codebase. Expect: No occurrences. rg --type ts --type js --type json 'forkTransport'Length of output: 4178
Tools
LanguageTool
[grammar] ~25-~25: Did you mean to write the noun ‘use’ here?
Context: ...onal**common**:
TCommon` The common used of the blockchain. Defaults to tevmDevn...(USED_OF)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (5)
- bundler-packages/whatsabi/src/KnownChainsType.ts (1 hunks)
- bundler-packages/whatsabi/src/parseUri.js (1 hunks)
- bundler-packages/whatsabi/src/resolveContractUri.js (1 hunks)
- bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js (1 hunks)
- docs/src/content/docs/reference/@tevm/base-client/type-aliases/BaseClientOptions.md (3 hunks)
Files skipped from review as they are similar to previous changes (4)
- bundler-packages/whatsabi/src/KnownChainsType.ts
- bundler-packages/whatsabi/src/parseUri.js
- bundler-packages/whatsabi/src/resolveContractUri.js
- bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js
Additional context used
LanguageTool
docs/src/content/docs/reference/@tevm/base-client/type-aliases/BaseClientOptions.md
[grammar] ~25-~25: Did you mean to write the noun ‘use’ here?
Context: ...onal**common**:
TCommon` The common used of the blockchain. Defaults to tevmDevn...(USED_OF)
@@ -22,8 +22,7 @@ If set to true you may still run up against block limits | |||
|
|||
> `readonly` `optional` **common**: `TCommon` | |||
|
|||
The common used of the blockchain. Defaults to tevmDevnet. Required for some APIs such as `getEnsAddress` to work. | |||
If not specified and a fork is provided the common chainId will be fetched from the fork | |||
The common used of the blockchain. Defaults to tevmDevnet. Required for some APIs such as `getEnsAddress` to work. If not specified and a fork is provided the common chainId will be fetched from the fork |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammatical error in the common
property description.
The phrase "The common used of the blockchain" should be corrected to "The common use of the blockchain."
- The common used of the blockchain. Defaults to tevmDevnet. Required for some APIs such as `getEnsAddress` to work. If not specified and a fork is provided the common chainId will be fetched from the fork
+ The common use of the blockchain. Defaults to tevmDevnet. Required for some APIs such as `getEnsAddress` to work. If not specified and a fork is provided, the common chainId will be fetched from the fork.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
The common used of the blockchain. Defaults to tevmDevnet. Required for some APIs such as `getEnsAddress` to work. If not specified and a fork is provided the common chainId will be fetched from the fork | |
The common use of the blockchain. Defaults to tevmDevnet. Required for some APIs such as `getEnsAddress` to work. If not specified and a fork is provided, the common chainId will be fetched from the fork. |
Tools
LanguageTool
[grammar] ~25-~25: Did you mean to write the noun ‘use’ here?
Context: ...onal**common**:
TCommon` The common used of the blockchain. Defaults to tevmDevn...(USED_OF)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- bundler-packages/whatsabi/package.json (1 hunks)
- bundler-packages/whatsabi/src/ContractUri.ts (1 hunks)
- bundler-packages/whatsabi/src/resolveContractUri.js (1 hunks)
- bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js (1 hunks)
Files skipped from review due to trivial changes (1)
- bundler-packages/whatsabi/src/ContractUri.ts
Files skipped from review as they are similar to previous changes (2)
- bundler-packages/whatsabi/src/resolveContractUri.js
- bundler-packages/whatsabi/src/whatsAbiTevmAdapter.js
Additional comments not posted (9)
bundler-packages/whatsabi/package.json (9)
2-5
: Package metadata looks good.The name, version, privacy, and description fields are correctly populated.
6-12
: Keywords are well-chosen.The keywords accurately reflect the package's domain and usage.
13-21
: Repository and contributor information is accurate.The repository URL, directory, license, and contributor details are correctly specified.
22-38
: Module type and exports configuration is correct.The
type
is set tomodule
, and theexports
,main
,module
, andtypes
fields are correctly configured for both ESM and CJS.
39-43
: Files configuration is correct.The
files
field correctly includes thedist
,types
, andsrc
directories.
62-68
: Dependencies are correctly specified.The runtime dependencies are appropriate and correctly specified.
69-71
: DevDependencies are correctly specified.The development dependencies are appropriate and correctly specified.
73-75
: Publish configuration is correct.The
publishConfig
field correctly specifies the access level for publishing the package.
76-76
: Side effect configuration is correct.The
sideEffect
field is correctly set tofalse
, indicating that the package has no side effects.
"scripts": { | ||
"all": "pnpm i && bun run build && bun run lint && bun run lint:check && bun run format:check && bun run format && bun run test:coverage && bun run generate:docs", | ||
"build": "nx run-many --targets=build:dist,build:types --projects=@tevm/whatsabi ", | ||
"build:dist": "tsup", | ||
"build:types": "tsup --dts-only && tsc --emitDeclarationOnly --declaration", | ||
"clean": "rm -rf node_modules && rm -rf artifacts && rm -rf dist && rm -rf cache", | ||
"format": "biome format . --write", | ||
"format:check": "biome format .", | ||
"generate:docs": "typedoc", | ||
"lint": "biome check . --write --unsafe", | ||
"lint:check": "biome check . --verbose", | ||
"lint:deps": "bunx depcheck", | ||
"lint:package": "bunx publint --strict && attw --pack", | ||
"test": "vitest --coverage", | ||
"test:coverage": "vitest run --coverage", | ||
"test:run": "vitest run", | ||
"test:ui": "vitest --ui" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scripts section is comprehensive but could be simplified.
The scripts cover all necessary tasks but some scripts could be simplified for better readability and maintainability.
Consider breaking down complex scripts into smaller, more manageable scripts. For example, the all
script could be broken down into individual steps:
- "all": "pnpm i && bun run build && bun run lint && bun run lint:check && bun run format:check && bun run format && bun run test:coverage && bun run generate:docs",
+ "all": "pnpm i && bun run build:all && bun run lint:all && bun run format:all && bun run test:all && bun run generate:docs",
+ "build:all": "bun run build && bun run build:dist && bun run build:types",
+ "lint:all": "bun run lint && bun run lint:check && bun run lint:deps && bun run lint:package",
+ "format:all": "bun run format && bun run format:check",
+ "test:all": "bun run test && bun run test:coverage && bun run test:run && bun run test:ui",
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"scripts": { | |
"all": "pnpm i && bun run build && bun run lint && bun run lint:check && bun run format:check && bun run format && bun run test:coverage && bun run generate:docs", | |
"build": "nx run-many --targets=build:dist,build:types --projects=@tevm/whatsabi ", | |
"build:dist": "tsup", | |
"build:types": "tsup --dts-only && tsc --emitDeclarationOnly --declaration", | |
"clean": "rm -rf node_modules && rm -rf artifacts && rm -rf dist && rm -rf cache", | |
"format": "biome format . --write", | |
"format:check": "biome format .", | |
"generate:docs": "typedoc", | |
"lint": "biome check . --write --unsafe", | |
"lint:check": "biome check . --verbose", | |
"lint:deps": "bunx depcheck", | |
"lint:package": "bunx publint --strict && attw --pack", | |
"test": "vitest --coverage", | |
"test:coverage": "vitest run --coverage", | |
"test:run": "vitest run", | |
"test:ui": "vitest --ui" | |
}, | |
"scripts": { | |
"all": "pnpm i && bun run build:all && bun run lint:all && bun run format:all && bun run test:all && bun run generate:docs", | |
"build": "nx run-many --targets=build:dist,build:types --projects=@tevm/whatsabi ", | |
"build:dist": "tsup", | |
"build:types": "tsup --dts-only && tsc --emitDeclarationOnly --declaration", | |
"clean": "rm -rf node_modules && rm -rf artifacts && rm -rf dist && rm -rf cache", | |
"format": "biome format . --write", | |
"format:check": "biome format .", | |
"generate:docs": "typedoc", | |
"lint": "biome check . --write --unsafe", | |
"lint:check": "biome check . --verbose", | |
"lint:deps": "bunx depcheck", | |
"lint:package": "bunx publint --strict && attw --pack", | |
"test": "vitest --coverage", | |
"test:coverage": "vitest run --coverage", | |
"test:run": "vitest run", | |
"test:ui": "vitest --ui", | |
"build:all": "bun run build && bun run build:dist && bun run build:types", | |
"lint:all": "bun run lint && bun run lint:check && bun run lint:deps && bun run lint:package", | |
"format:all": "bun run format && bun run format:check", | |
"test:all": "bun run test && bun run test:coverage && bun run test:run && bun run test:ui" | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- bundler-packages/whatsabi/package.json (1 hunks)
Additional comments not posted (6)
bundler-packages/whatsabi/package.json (6)
23-38
: Exports and entry points are correctly configured.The exports and entry points for ESM and CJS are set up correctly.
39-43
: Files section is correctly configured.The files section lists the necessary directories for inclusion in the package.
44-60
: Scripts section is comprehensive but could be simplified.The scripts cover all necessary tasks but some scripts could be simplified for better readability and maintainability.
Consider breaking down complex scripts into smaller, more manageable scripts. For example, the
all
script could be broken down into individual steps:- "all": "pnpm i && bun run build && bun run lint && bun run lint:check && bun run format:check && bun run format && bun run test:coverage && bun run generate:docs", + "all": "pnpm i && bun run build:all && bun run lint:all && bun run format:all && bun run test:all && bun run generate:docs", + "build:all": "bun run build && bun run build:dist && bun run build:types", + "lint:all": "bun run lint && bun run lint:check && bun run lint:deps && bun run lint:package", + "format:all": "bun run format && bun run format:check", + "test:all": "bun run test && bun run test:coverage && bun run test:run && bun run test:ui",
62-72
: Dependencies and devDependencies are correctly listed.The dependencies are correctly specified, using the workspace protocol for internal packages.
73-76
: PublishConfig and sideEffect are correctly configured.The settings are appropriate for public distribution and indicate no side effects.
2-22
: Verify repository URL and directory.Ensure that the repository URL and directory are correct and accessible.
Verification successful
Repository URL and directory are correct.
Both the repository URL and directory in the
package.json
are valid and accessible. No issues found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the repository URL and directory. # Test: Check if the repository URL is valid and the directory exists. git ls-remote https://github.com/evmts/tevm-monorepo.git &> /dev/null && echo "Repository URL is valid" || echo "Repository URL is invalid" fd --type d 'bundler-packages/whatsabi' && echo "Directory exists" || echo "Directory does not exist"Length of output: 620
Script:
#!/bin/bash # Description: Verify the existence of the directory using the correct fd command. # Corrected Test: Check if the directory exists using --full-path. fd --full-path 'bundler-packages/whatsabi' && echo "Directory exists" || echo "Directory does not exist"Length of output: 960
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (1)
- bundler-packages/whatsabi/package.json (1 hunks)
Files skipped from review due to trivial changes (1)
- bundler-packages/whatsabi/package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (107)
- bundler-packages/whatsabi/package.json (1 hunks)
- packages/actions/src/eth/gasPriceHandler.spec.ts (1 hunks)
- packages/errors/docs/classes/AccountLockedError.md (1 hunks)
- packages/errors/docs/classes/AccountNotFoundError.md (1 hunks)
- packages/errors/docs/classes/AuthCallNonZeroValueExtError.md (1 hunks)
- packages/errors/docs/classes/AuthCallUnsetError.md (1 hunks)
- packages/errors/docs/classes/AuthInvalidSError.md (1 hunks)
- packages/errors/docs/classes/BLS12381FpNotInFieldError.md (1 hunks)
- packages/errors/docs/classes/BLS12381InputEmptyError.md (1 hunks)
- packages/errors/docs/classes/BLS12381InvalidInputLengthError.md (1 hunks)
- packages/errors/docs/classes/BLS12381PointNotOnCurveError.md (1 hunks)
- packages/errors/docs/classes/BaseError.md (1 hunks)
- packages/errors/docs/classes/BlockGasLimitExceededError.md (1 hunks)
- packages/errors/docs/classes/ChainIdMismatchError.md (1 hunks)
- packages/errors/docs/classes/CodeSizeExceedsMaximumError.md (1 hunks)
- packages/errors/docs/classes/CodeStoreOutOfGasError.md (1 hunks)
- packages/errors/docs/classes/CommonMismatchError.md (1 hunks)
- packages/errors/docs/classes/ContractExecutionFailedError.md (1 hunks)
- packages/errors/docs/classes/CreateCollisionError.md (1 hunks)
- packages/errors/docs/classes/DecodeFunctionDataError.md (1 hunks)
- packages/errors/docs/classes/DefensiveNullCheckError.md (1 hunks)
- packages/errors/docs/classes/EipNotEnabledError.md (1 hunks)
- packages/errors/docs/classes/EncodeFunctionReturnDataError.md (1 hunks)
- packages/errors/docs/classes/EvmRevertError.md (1 hunks)
- packages/errors/docs/classes/ExecutionError.md (1 hunks)
- packages/errors/docs/classes/ForkError.md (1 hunks)
- packages/errors/docs/classes/GasLimitExceededError.md (1 hunks)
- packages/errors/docs/classes/InitcodeSizeViolationError.md (1 hunks)
- packages/errors/docs/classes/InsufficientBalanceError.md (1 hunks)
- packages/errors/docs/classes/InsufficientFundsError.md (1 hunks)
- packages/errors/docs/classes/InsufficientPermissionsError.md (1 hunks)
- packages/errors/docs/classes/InternalError.md (1 hunks)
- packages/errors/docs/classes/InternalEvmError.md (1 hunks)
- packages/errors/docs/classes/InternalRpcError.md (1 hunks)
- packages/errors/docs/classes/InvalidAbiError.md (1 hunks)
- packages/errors/docs/classes/InvalidAddressError.md (1 hunks)
- packages/errors/docs/classes/InvalidArgsError.md (1 hunks)
- packages/errors/docs/classes/InvalidBalanceError.md (1 hunks)
- packages/errors/docs/classes/InvalidBeginSubError.md (1 hunks)
- packages/errors/docs/classes/InvalidBlobVersionedHashesError.md (1 hunks)
- packages/errors/docs/classes/InvalidBlockError.md (1 hunks)
- packages/errors/docs/classes/InvalidBytecodeError.md (1 hunks)
- packages/errors/docs/classes/InvalidBytecodeResultError.md (1 hunks)
- packages/errors/docs/classes/InvalidBytesSizeError.md (1 hunks)
- packages/errors/docs/classes/InvalidCallerError.md (1 hunks)
- packages/errors/docs/classes/InvalidCommitmentError.md (1 hunks)
- packages/errors/docs/classes/InvalidDataError.md (1 hunks)
- packages/errors/docs/classes/InvalidDeployedBytecodeError.md (1 hunks)
- packages/errors/docs/classes/InvalidDepthError.md (1 hunks)
- packages/errors/docs/classes/InvalidEofFormatError.md (1 hunks)
- packages/errors/docs/classes/InvalidFunctionNameError.md (1 hunks)
- packages/errors/docs/classes/InvalidGasLimitError.md (1 hunks)
- packages/errors/docs/classes/InvalidGasPriceError.md (1 hunks)
- packages/errors/docs/classes/InvalidGasRefundError.md (1 hunks)
- packages/errors/docs/classes/InvalidInputLengthError.md (1 hunks)
- packages/errors/docs/classes/InvalidInputRpcError.md (1 hunks)
- packages/errors/docs/classes/InvalidJumpError.md (1 hunks)
- packages/errors/docs/classes/InvalidJumpSubError.md (1 hunks)
- packages/errors/docs/classes/InvalidKzgInputsError.md (1 hunks)
- packages/errors/docs/classes/InvalidMaxFeePerGasError.md (1 hunks)
- packages/errors/docs/classes/InvalidMaxPriorityFeePerGasError.md (1 hunks)
- packages/errors/docs/classes/InvalidNonceError.md (1 hunks)
- packages/errors/docs/classes/InvalidOpcodeError.md (1 hunks)
- packages/errors/docs/classes/InvalidOriginError.md (1 hunks)
- packages/errors/docs/classes/InvalidParamsError.md (1 hunks)
- packages/errors/docs/classes/InvalidParamsRpcError.md (1 hunks)
- packages/errors/docs/classes/InvalidProofError.md (1 hunks)
- packages/errors/docs/classes/InvalidRequestError.md (1 hunks)
- packages/errors/docs/classes/InvalidRequestRpcError.md (1 hunks)
- packages/errors/docs/classes/InvalidReturnSubError.md (1 hunks)
- packages/errors/docs/classes/InvalidSaltError.md (1 hunks)
- packages/errors/docs/classes/InvalidSelfdestructError.md (1 hunks)
- packages/errors/docs/classes/InvalidSignatureError.md (1 hunks)
- packages/errors/docs/classes/InvalidSkipBalanceError.md (1 hunks)
- packages/errors/docs/classes/InvalidStorageRootError.md (1 hunks)
- packages/errors/docs/classes/InvalidToError.md (1 hunks)
- packages/errors/docs/classes/InvalidTransactionError.md (1 hunks)
- packages/errors/docs/classes/InvalidUrlError.md (1 hunks)
- packages/errors/docs/classes/InvalidValueError.md (1 hunks)
- packages/errors/docs/classes/JsonRpcVersionUnsupportedError.md (1 hunks)
- packages/errors/docs/classes/LimitExceededError.md (1 hunks)
- packages/errors/docs/classes/LimitExceededRpcError.md (1 hunks)
- packages/errors/docs/classes/MethodNotFoundError.md (1 hunks)
- packages/errors/docs/classes/MethodNotFoundRpcError.md (1 hunks)
- packages/errors/docs/classes/MethodNotSupportedError.md (1 hunks)
- packages/errors/docs/classes/MethodNotSupportedRpcError.md (1 hunks)
- packages/errors/docs/classes/MisconfiguredClientError.md (1 hunks)
- packages/errors/docs/classes/NoForkTransportSetError.md (1 hunks)
- packages/errors/docs/classes/NonceAlreadyUsedError.md (1 hunks)
- packages/errors/docs/classes/NonceTooHighError.md (1 hunks)
- packages/errors/docs/classes/NonceTooLowError.md (1 hunks)
- packages/errors/docs/classes/OutOfGasError.md (1 hunks)
- packages/errors/docs/classes/OutOfRangeError.md (1 hunks)
- packages/errors/docs/classes/ParseError.md (1 hunks)
- packages/errors/docs/classes/ParseRpcError.md (1 hunks)
- packages/errors/docs/classes/PendingTransactionTimeoutError.md (1 hunks)
- packages/errors/docs/classes/ProviderDisconnectedError.md (1 hunks)
- packages/errors/docs/classes/RateLimitExceededError.md (1 hunks)
- packages/errors/docs/classes/RefundExhaustedError.md (1 hunks)
- packages/errors/docs/classes/ResourceNotFoundError.md (1 hunks)
- packages/errors/docs/classes/ResourceNotFoundRpcError.md (1 hunks)
- packages/errors/docs/classes/ResourceUnavailableError.md (1 hunks)
- packages/errors/docs/classes/ResourceUnavailableRpcError.md (1 hunks)
- packages/errors/docs/classes/RevertError.md (1 hunks)
- packages/errors/docs/classes/StackOverflowError.md (1 hunks)
- packages/errors/docs/classes/StackUnderflowError.md (1 hunks)
- packages/errors/docs/classes/StaticStateChangeError.md (1 hunks)
Files not processed due to max files limit (13)
- packages/errors/docs/classes/StopError.md
- packages/errors/docs/classes/TimeoutError.md
- packages/errors/docs/classes/TransactionRejectedError.md
- packages/errors/docs/classes/TransactionTooLargeError.md
- packages/errors/docs/classes/TransactionUnderpricedError.md
- packages/errors/docs/classes/UnknownBlockError.md
- packages/errors/docs/classes/UnknownRpcError.md
- packages/errors/docs/classes/UnreachableCodeError.md
- packages/errors/docs/classes/UnsupportedChainError.md
- packages/errors/docs/classes/UnsupportedProviderMethodError.md
- packages/errors/docs/classes/UserRejectedRequestError.md
- packages/errors/docs/classes/ValueOverflowError.md
- packages/utils/docs/classes/AsyncEventEmitter.md
Files skipped from review due to trivial changes (105)
- packages/errors/docs/classes/AccountLockedError.md
- packages/errors/docs/classes/AccountNotFoundError.md
- packages/errors/docs/classes/AuthCallNonZeroValueExtError.md
- packages/errors/docs/classes/AuthCallUnsetError.md
- packages/errors/docs/classes/AuthInvalidSError.md
- packages/errors/docs/classes/BLS12381FpNotInFieldError.md
- packages/errors/docs/classes/BLS12381InputEmptyError.md
- packages/errors/docs/classes/BLS12381InvalidInputLengthError.md
- packages/errors/docs/classes/BLS12381PointNotOnCurveError.md
- packages/errors/docs/classes/BaseError.md
- packages/errors/docs/classes/BlockGasLimitExceededError.md
- packages/errors/docs/classes/ChainIdMismatchError.md
- packages/errors/docs/classes/CodeSizeExceedsMaximumError.md
- packages/errors/docs/classes/CodeStoreOutOfGasError.md
- packages/errors/docs/classes/CommonMismatchError.md
- packages/errors/docs/classes/ContractExecutionFailedError.md
- packages/errors/docs/classes/CreateCollisionError.md
- packages/errors/docs/classes/DecodeFunctionDataError.md
- packages/errors/docs/classes/DefensiveNullCheckError.md
- packages/errors/docs/classes/EipNotEnabledError.md
- packages/errors/docs/classes/EncodeFunctionReturnDataError.md
- packages/errors/docs/classes/EvmRevertError.md
- packages/errors/docs/classes/ExecutionError.md
- packages/errors/docs/classes/ForkError.md
- packages/errors/docs/classes/GasLimitExceededError.md
- packages/errors/docs/classes/InitcodeSizeViolationError.md
- packages/errors/docs/classes/InsufficientBalanceError.md
- packages/errors/docs/classes/InsufficientFundsError.md
- packages/errors/docs/classes/InsufficientPermissionsError.md
- packages/errors/docs/classes/InternalError.md
- packages/errors/docs/classes/InternalEvmError.md
- packages/errors/docs/classes/InternalRpcError.md
- packages/errors/docs/classes/InvalidAbiError.md
- packages/errors/docs/classes/InvalidAddressError.md
- packages/errors/docs/classes/InvalidArgsError.md
- packages/errors/docs/classes/InvalidBalanceError.md
- packages/errors/docs/classes/InvalidBeginSubError.md
- packages/errors/docs/classes/InvalidBlobVersionedHashesError.md
- packages/errors/docs/classes/InvalidBlockError.md
- packages/errors/docs/classes/InvalidBytecodeError.md
- packages/errors/docs/classes/InvalidBytecodeResultError.md
- packages/errors/docs/classes/InvalidBytesSizeError.md
- packages/errors/docs/classes/InvalidCallerError.md
- packages/errors/docs/classes/InvalidCommitmentError.md
- packages/errors/docs/classes/InvalidDataError.md
- packages/errors/docs/classes/InvalidDeployedBytecodeError.md
- packages/errors/docs/classes/InvalidDepthError.md
- packages/errors/docs/classes/InvalidEofFormatError.md
- packages/errors/docs/classes/InvalidFunctionNameError.md
- packages/errors/docs/classes/InvalidGasLimitError.md
- packages/errors/docs/classes/InvalidGasPriceError.md
- packages/errors/docs/classes/InvalidGasRefundError.md
- packages/errors/docs/classes/InvalidInputLengthError.md
- packages/errors/docs/classes/InvalidInputRpcError.md
- packages/errors/docs/classes/InvalidJumpError.md
- packages/errors/docs/classes/InvalidJumpSubError.md
- packages/errors/docs/classes/InvalidKzgInputsError.md
- packages/errors/docs/classes/InvalidMaxFeePerGasError.md
- packages/errors/docs/classes/InvalidMaxPriorityFeePerGasError.md
- packages/errors/docs/classes/InvalidNonceError.md
- packages/errors/docs/classes/InvalidOpcodeError.md
- packages/errors/docs/classes/InvalidOriginError.md
- packages/errors/docs/classes/InvalidParamsError.md
- packages/errors/docs/classes/InvalidParamsRpcError.md
- packages/errors/docs/classes/InvalidProofError.md
- packages/errors/docs/classes/InvalidRequestError.md
- packages/errors/docs/classes/InvalidRequestRpcError.md
- packages/errors/docs/classes/InvalidReturnSubError.md
- packages/errors/docs/classes/InvalidSaltError.md
- packages/errors/docs/classes/InvalidSelfdestructError.md
- packages/errors/docs/classes/InvalidSignatureError.md
- packages/errors/docs/classes/InvalidSkipBalanceError.md
- packages/errors/docs/classes/InvalidStorageRootError.md
- packages/errors/docs/classes/InvalidToError.md
- packages/errors/docs/classes/InvalidTransactionError.md
- packages/errors/docs/classes/InvalidUrlError.md
- packages/errors/docs/classes/InvalidValueError.md
- packages/errors/docs/classes/JsonRpcVersionUnsupportedError.md
- packages/errors/docs/classes/LimitExceededError.md
- packages/errors/docs/classes/LimitExceededRpcError.md
- packages/errors/docs/classes/MethodNotFoundError.md
- packages/errors/docs/classes/MethodNotFoundRpcError.md
- packages/errors/docs/classes/MethodNotSupportedError.md
- packages/errors/docs/classes/MethodNotSupportedRpcError.md
- packages/errors/docs/classes/MisconfiguredClientError.md
- packages/errors/docs/classes/NoForkTransportSetError.md
- packages/errors/docs/classes/NonceAlreadyUsedError.md
- packages/errors/docs/classes/NonceTooHighError.md
- packages/errors/docs/classes/NonceTooLowError.md
- packages/errors/docs/classes/OutOfGasError.md
- packages/errors/docs/classes/OutOfRangeError.md
- packages/errors/docs/classes/ParseError.md
- packages/errors/docs/classes/ParseRpcError.md
- packages/errors/docs/classes/PendingTransactionTimeoutError.md
- packages/errors/docs/classes/ProviderDisconnectedError.md
- packages/errors/docs/classes/RateLimitExceededError.md
- packages/errors/docs/classes/RefundExhaustedError.md
- packages/errors/docs/classes/ResourceNotFoundError.md
- packages/errors/docs/classes/ResourceNotFoundRpcError.md
- packages/errors/docs/classes/ResourceUnavailableError.md
- packages/errors/docs/classes/ResourceUnavailableRpcError.md
- packages/errors/docs/classes/RevertError.md
- packages/errors/docs/classes/StackOverflowError.md
- packages/errors/docs/classes/StackUnderflowError.md
- packages/errors/docs/classes/StaticStateChangeError.md
Files skipped from review as they are similar to previous changes (1)
- bundler-packages/whatsabi/package.json
Additional comments not posted (2)
packages/actions/src/eth/gasPriceHandler.spec.ts (2)
Line range hint
10-19
: LGTM!The test case correctly verifies the default behavior of
gasPriceHandler
when noforkUrl
is provided.
Line range hint
33-37
: Verify alignment with updated requirements.The test now expects a gas price greater than
0.1
Gwei instead of1
Gwei. Ensure this change aligns with updated business logic or external factors influencing gas price calculations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- bundler-packages/whatsabi/.depcheckrc (1 hunks)
- bundler-packages/whatsabi/package.json (1 hunks)
- bundler-packages/whatsabi/src/resolveContractUri.js (1 hunks)
Files skipped from review due to trivial changes (1)
- bundler-packages/whatsabi/.depcheckrc
Files skipped from review as they are similar to previous changes (1)
- bundler-packages/whatsabi/package.json
Additional comments not posted (2)
bundler-packages/whatsabi/src/resolveContractUri.js (2)
7-24
: LGTM!The
UnknownChainError
class is well-implemented and provides a clear error message for unknown chain IDs.
27-27
: Reminder: Address the TODO comment.The TODO comment indicates that the
tevm
config should be passed in.
// TODO we want to represent proxies in some way like listing the resolved addy | ||
// ...{resolvedAddress: whatsabiResult.address}, | ||
// TODO if we can get a verified contract we should compile it with solc and return solc output too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: Address the TODO comments.
The TODO comments suggest representing proxies and compiling verified contracts with solc
.
Do you want me to help address these TODOs or open a GitHub issue to track these tasks?
const deployedBytecode = await getCode(client, { | ||
address: /** @type {import('@tevm/utils').Address}*/ (whatsabiResult.address), | ||
}) | ||
if (!deployedBytecode) { | ||
throw new Error('Could not fetch deployed bytecode') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance error handling for getCode
.
The call to getCode
should include error handling to manage potential failures in fetching the deployed bytecode.
try {
const deployedBytecode = await getCode(client, {
address: /** @type {import('@tevm/utils').Address}*/ (whatsabiResult.address),
});
if (!deployedBytecode) {
throw new Error('Could not fetch deployed bytecode');
}
} catch (error) {
throw new Error(`Error fetching deployed bytecode: ${error.message}`);
}
* @throws {UnknownChainError} if the chainId is not known and no rpcUrl is provided | ||
*/ | ||
export const resolveContractUri = async (contractUri, config) => { | ||
console.log('todo config', config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove console log statement.
The console log statement is likely for debugging purposes and should be removed in production code.
- console.log('todo config', config)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
console.log('todo config', config) |
…rkles_feat_whatsabi_imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (1)
- bundler-packages/whatsabi/src/resolveContractUri.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- bundler-packages/whatsabi/src/resolveContractUri.js
Description
Concise description of proposed changes
Testing
Explain the quality checks that have been done on the code changes
Additional Information
Your ENS/address:
Summary by CodeRabbit
New Features
.gitignore
file to streamline repository management by excluding unnecessary files.LICENSE
file, specifying the terms of using the software under the MIT License.README.md
for the@tevm/whatsabi
package, providing essential documentation and usage information.package.json
for managing dependencies and configurations for the@tevm/whatsabi
package.Configuration Updates
.depcheckrc
file to manage dependency checks flexibly.biome.json
file for code formatting and linting configurations.Code Quality Enhancements