foundry
foundry copied to clipboard
`forge script` panicked
Component
Forge
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] Foundryup
What version of Foundry are you on?
forge 0.2.0 (01325bc 2022-08-03T00:04:48.802271Z)
What command(s) is the bug in?
forge script script/Deploy.s.sol:DeployScript --rpc-url $GOERLI_RPC_URL --private-key $PRIVATE_KEY
Operating System
macOS (Apple Silicon)
Describe the bug
The same deployment script that I used two weeks ago broke when I upgraded to the latest foundry today.
The application panicked (crashed).
Message: called `Option::unwrap()` on a `None` value
Location: cli/src/cmd/forge/script/executor.rs:34
This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
2: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
3: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
4: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
5: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
6: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
7: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
8: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
9: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
10: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
11: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
12: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
13: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
14: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
15: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
Does your contract use libraries by any chance?
cc @joshieDo it seems that the into_bytes
unwrap fails, so probably an unlinked artifact somehow. We should also replace the unwrap
with an expect
so we have more context
yes, we use a linked library for the contract to be deployed.
do you have a reproducible repo you can share?
i'm trying to create a reproducible repo to share. but while i was recreating, i found it might be related to deploying a big contract (23.646 KB) thru a create2
deployer.
also a separate issue came up as foundry gets updated in our CI, tests that involves deploying a new contract thru create2
starts to break while showing a very large gas consumption.
https://github.com/foundry-rs/foundry/issues/2665
So is this issue the same as #2665? If it is, we should close this one, as fixing one will fix the other
sorry for the late reply, this is a separate issue than #2665 . also i couldn't reproduce this in a separate repo.
Closing as can't reproduce, please feel free to reopen with a reproducible example if it's still an issue :smile: