SHARE
TWEET

Untitled

a guest Jul 16th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pragma solidity ^0.5.0;
  2.  
  3. contract Client {
  4.     uint256 public t;
  5.    
  6.     function callTest(address contractAddr, uint to, uint value) public returns (bool, bytes memory, address) {
  7.         (bool success, bytes memory data) = address(contractAddr).delegatecall(abi.encodeWithSignature("add(uint256,uint256)", to, value));
  8.        
  9.         if(!success) {
  10.             revert();
  11.         }
  12.        
  13.         return (success, data, contractAddr);
  14.     }
  15.    
  16.     function tell() public view returns(uint256) {
  17.         return (t);
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top