Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.5.0;
- contract Client {
- uint256 public t;
- function callTest(address contractAddr, uint to, uint value) public returns (bool, bytes memory, address) {
- (bool success, bytes memory data) = address(contractAddr).delegatecall(abi.encodeWithSignature("add(uint256,uint256)", to, value));
- if(!success) {
- revert();
- }
- return (success, data, contractAddr);
- }
- function tell() public view returns(uint256) {
- return (t);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement