fix: use abi.encode for sender in CCIPLocalSimulatorFork v1.6 messages - #63
Conversation
|
Thank you for looking into this. I am not the maintainer, but, based on the repo’s conventions, there are a few things before this commit can be merged. The release playbook states that fixes are pushed to It makes sense to add a regression test: verify that And add an entry to the |
|
Hello @Yurii3721 , thanks for raising the issue, using Chainlink Local and apologies for inconvenience. @Nalon is owning this fix and we will cut the new release as soon as possible. @kurogami-ibrahim79 thank you for opening this PR and willingness to contribute to Chainlink Local. @Yurii3721 is right, we can not merge this to the @Nalon can you please assist with this PR and make sure this is very well tested? Thanks in advance! |
Fixes #62.
Description
This PR addresses the byte-length mismatch issue for the
senderfield in CCIP v1.6+ simulated messages.Previously,
CCIPLocalSimulatorFork._executePostV1dot6utilizedabi.encodePacked(message.sender), which resulted in a 20-byte string. On production EVM source chains for v1.6 lanes, this field is expected to be a 32-byte ABI word, matching the fix previously applied in #52 forreceiver,destTokenAddress, andsourcePoolAddress.This mismatch caused the receiver contract to revert when executing
abi.decode(message.sender, (address))or to failtrustedRemotevalidations due to byte misalignment.Changes Made
sender: abi.encodePacked(message.sender)tosender: abi.encode(message.sender)insrc/ccip/CCIPLocalSimulatorFork.solto enforce standard 32-byte ABI encoding with left-zero padding.Testing
CCIPLocalSimulatorUnitTestandCCIPLocalSimulatorForkRoutingTestpass locally without breaking existing routing logic.