mirror of
https://github.com/luxdao/zodiac.git
synced 2026-10-30 20:34:38 +00:00
20 lines
623 B
Solidity
20 lines
623 B
Solidity
// SPDX-License-Identifier: LGPL-3.0-only
|
|
pragma solidity >=0.6.0 <0.7.0;
|
|
|
|
// We import the contract so truffle compiles it, and we have the ABI
|
|
// available when working from truffle console.
|
|
import "@gnosis.pm/mock-contract/contracts/MockContract.sol";
|
|
|
|
contract Mock is MockContract {
|
|
function exec(address payable to, uint256 value, bytes calldata data) external {
|
|
bool success;
|
|
bytes memory response;
|
|
(success,response) = to.call{value: value}(data);
|
|
if(!success) {
|
|
assembly {
|
|
revert(add(response, 0x20), mload(response))
|
|
}
|
|
}
|
|
}
|
|
}
|