The added unit test currently reverts the transaction, because the way we convert address to bytes doesn't seem to be valid.
This surfaces if a contract under test calls a mocked method that returns an address (originally reported from a failing test here: https://github.com/okwme/safe-contracts/blob/billy/arbitrage-module/test/arbitrageModule.js#L75).
Note, that this issue doesn't happen when the mocked method is called directly from JS (however mocking only makes sense when mocked method is called from another smart contract).
The added unit test currently reverts the transaction, because the way we convert
address
tobytes
doesn't seem to be valid. This surfaces if a contract under test calls a mocked method that returns an address (originally reported from a failing test here: https://github.com/okwme/safe-contracts/blob/billy/arbitrage-module/test/arbitrageModule.js#L75). Note, that this issue doesn't happen when the mocked method is called directly from JS (however mocking only makes sense when mocked method is called from another smart contract).Instead of using the complicated way of converting address into bytes (originally taken from: https://ethereum.stackexchange.com/questions/884/how-to-convert-an-address-to-bytes-in-solidity), it seems to be fine to convert the
address
intouint
and use the existinguintToBytes
method.