Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. contract Base {
  2. function foo() external returns (uint) {
  3. return 1234;
  4. }
  5. function bar() internal returns (uint) {
  6. return 1234;
  7. }
  8. function baz() public returns (uint) {
  9. return 1234;
  10. }
  11. }
  12.  
  13. contract A is Base {
  14. function test() public returns (uint, uint, uint) {
  15. // solidity 0.4 allows this
  16. // uint a = foo();
  17. // with solidity 0.5 you have to explicitely use 'this.'
  18. uint a = this.foo(); // external use call
  19. uint b = bar(); // do not use call
  20. uint c = baz(); // do not use call
  21. return (a, b, c);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement