pimlicolabs / permissionless.js

TypeScript utilities built on viem for ERC-4337: Account Abstraction
https://docs.pimlico.io/permissionless
MIT License
167 stars 46 forks source link

feat: allow to set callGasLimit on deployContract #274

Open ctrlc03 opened 1 month ago

ctrlc03 commented 1 month ago

callGasLimit is a valid param for both 0.6 and 0.7 user operations, however it is not possible to specify this parameter when calling smart account actions such as deployContract (https://github.com/pimlicolabs/permissionless.js/blob/main/packages/permissionless/actions/smartAccount/deployContract.ts#L106) - could it be added to the args param please? This is blocking some work for us as we are not able to deploy larger contracts via a kernel account due to the call running out of gas. On the other hand, if I manually patch the lib to pass callGasLimit, I am able to deploy my contracts via the smart account.

ctrlc03 commented 3 weeks ago

Resorted sending the user operation directly myself. Btw seems like when calldata gets too big, bundlers fail to estimate the correct gas limit required, so have to calculate using "prepareUserOperation" and add a 5-10% extra to be safe - not sure that's relevant still here