Description
When using the propose function in GovernorCompatibilityBravo with function signatures along with calldata the resulting encoded calldata is incorrect.
💻 Environment
4.4.1
📝 Details
It seems that calling propose in GovernorCompatibilityBravo with signatures and calldata ends up calling
function _encodeCalldata(string[] memory signatures, bytes[] memory calldatas)
which then calls
abi.encodeWithSignature(signatures[i], calldatas[i])
.
This causes the calldata + signature to be encoded incorrectly.
In GovernorBravo the calldata and signatures get sent to the timelock seperatley and they then get encoded with: abi.encodePacked(bytes4(keccak256(bytes(signature))), data);
As I understand it the issue is that abi.encodeWithSignature
is expecting the arguments to be like this: abi.encodeWithSignature(add(uint256, uint256), 1, 2)
but really it is getting this
abi.encodeWithSignature("add(uint256,uint256)", 0x0...010....02)
.
Activity