foundry-zksync: `forge script` reverts likely due to incorrect data construction
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.0.2 (532ef5e 2024-04-22T00:22:39.180249000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
forge script
is likely constructing the incorrect data leading to the following error:
Sending transactions [0 - 0].
The application panicked (crashed).
Message: called `Result::unwrap()` on an `Err` value: JsonRpcClientError(JsonRpcError(JsonRpcError { code: 3, message: "execution reverted", data: Some(String("0x")) }))
Location: crates/forge/bin/cmd/script/broadcast.rs:669
Check out the warp block: https://app.warp.dev/block/F0yTm0BDEqyyYdN327UZuF
About this issue
- Original URL
- State: closed
- Created 2 months ago
- Reactions: 1
- Comments: 31
Amazing 🎉 👍 Glad it worked!!
I was able to reproduce, and its certainly a weird issue as it works locally, testnet, forked mainnet but not on mainnet. Investigating the
SablierV2NFTDescriptor.sol
contract further as it seems thats where the issue may be. Will provide an update if I find anything.@smol-ninja thanks for posting the issue, it should not panic here so we will be investigating.
Though, why did the testnet deployment work without removing the remapping, but it didn’t work for the mainnet? Does mainnet work different than testnet? @dutterbutter
@smol-ninja not a problem! We will be investigating it further so will provide an update when I can.
Yes, exactly the same for us
Indeed, it works for the testnet. But when trying to deploy on the mainnet, it doesn’t: https://app.warp.dev/block/R8pSjMJQWIljGSczzTNmTy
It also works with Foundry for the testnet.
The previous fail on testnet was due to an error in the initial HH script when passing the constructor arguments.
No, we are not using any special opcode. We saw this bug when we tried to deploy contracts with Foundry. But we thought it may be a bug with Foundry itself. So Andrei ported the code to HH and saw the same error again. That’s why we are guessing if it’s related to one of the libraries that we import.
nvm found the hh branch. Will investigate.