Skip to content

Commit

Permalink
add --no-request-limit to default anvil options
Browse files Browse the repository at this point in the history
some packages have gotten so big, they no longer fit in the standard
request size for anvil. Thanksully, anvil now provides an escape hatch
for this. Let's use it.
  • Loading branch information
dbeal-eth authored and mjlescano committed Sep 17, 2024
1 parent b016c6a commit 8ee0092
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/cli/src/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export async function runRpc(anvilOptions: AnvilOptions, rpcOptions: RpcOptions
anvilOptions.accounts = 1;
}

anvilOptions.noRequestSizeLimit = true;

if (anvilOptions.forkUrl && rpcOptions.forkProvider) {
throw new Error('Cannot set both an anvil forkUrl and a proxy provider connection');
}
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/util/anvil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export type AnvilOptions = {
* All storage slots are read entirely from the endpoint.
*/
noStorageCaching?: boolean | undefined;
/**
* Disables request size limit
*/
noRequestSizeLimit?: boolean | undefined;
/**
* Number of retry requests for spurious networks (timed out requests).
*
Expand Down

0 comments on commit 8ee0092

Please sign in to comment.