Advertisement
Guest User

Untitled

a guest
Dec 8th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. pragma solidity >=0.4.22 <0.7.0;
  2. contract D {
  3. uint public n;
  4. address public sender;
  5.  
  6. function delegatecallSetN(address _e, uint _n) public {
  7. (bool success,) = address(_e).call(abi.encodeWithSignature("setN(uint256)", _n));
  8. }
  9. }
  10.  
  11. contract E {
  12. uint public n;
  13. address public sender;
  14. uint test = 10;
  15.  
  16. function setN(uint256 _n) public {
  17. n = _n;
  18. sender = msg.sender;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement