Last active
May 3, 2022 08:11
-
-
Save bitcoinwarrior1/d186f0e1fb3ae719efe5e216fae8fb6b to your computer and use it in GitHub Desktop.
A simple contract that acts as a go between for transactions to change the msg.sender for testing (in solidity based tests)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.7.0 <0.9.0; | |
// A simple contract that acts as a go between for transactions to change the msg.sender for testing (in solidity based tests) | |
contract ChangeSender { | |
function call(address to, bytes4 functionSignature, bytes memory data) public returns(bool success, bytes memory result) { | |
(success, result) = to.call(abi.encode(functionSignature, data)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment