[Dev Tools] foundry-zksync non-broadcast (read-only) scripts fail to execute #916
Replies: 2 comments
-
I'm looking at setting up some foundry scripts to reproduce this, but based on the error message my assumption going in is that the scripts are calling something other than view methods, hence the balance check and failure. Will try to provide an example of a working read-only foundry script that works so you can compare what you have. |
Beta Was this translation helpful? Give feedback.
-
So here's a quick read-only script example
@ezynda3 I'd need more specific information to help here since it's not like all read-only scripts with zksync forge are broken. |
Beta Was this translation helpful? Give feedback.
-
Team or Project
No response
Environment
Mainnet
Select the Dev Tool you are using
Foundry
Provide the version of the tool (if applicable)
nightly-cf0a88d18218471dcf13d62afa4f8fe5335d9740
Provide a brief description of the functionality you're trying to implement and the issue you are running into.
I'm able to use forge scripts to successfully deploy contacts to zksync and other zkevms like Abstract but I can't get read-only scripts to work. For example I want to perform a bunch of actions that aggregate some onchain data and return the result from the script. These are all staticcalls and do not require broadcast to be enabled. However whenever I try this the script always fails with the zk evm being halted and complaining that there isn't enough gas to complete the operation. Any ideas?
Error:
Repo Link (Optional)
No response
Additional Details
No response
Beta Was this translation helpful? Give feedback.
All reactions