Closed mesozoic-technology closed 3 months ago
The signature in the Rust code you provided is replicate(bytes,bytes,bytes,address)
, which is correct for the given sol!
function. What signature are you expecting?
independently verifying the 4-byte with cast gives the same result as sol!
which we can see matches the sol!
output of the rust-sketch
bin
Can you say what function definition gave 0x6fc310f8
and how it was printed from the forge script?
Sorry, you're right, I'm wrong. Had a huge cold yesterday and put the similarly named but incorrect contract into forge to derive that "expected selector".
I was trying to encode a call to Multicall3 and it was working when I did not include any calls, but when including this call, failed. Combined with my head pounding, jumped to a false conclusion
Component
sol-types, sol! macro
What version of Alloy are you on?
No response
Operating System
macOS (Apple Silicon)
Describe the bug
I reproduced the issue below. This is for version 0.7.4.
The abi encoded hex bytes produced by
replicateCall{...}.abi_encode()
does not result in the correct encoding of the function's selector, which was derived from a forge script and printed out afterwards.https://github.com/mesozoic-technology/rust-sketches/blob/main/src/main.rs