original.sol 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. interface ITarget {
  2. function run() external payable;
  3. function veryAndVeryLongNameOfSomeRunFunction() external payable;
  4. }
  5. contract FunctionCallArgsStatement {
  6. ITarget public target;
  7. function estimate() public returns (uint256 gas) {
  8. gas = 1 gwei;
  9. }
  10. function veryAndVeryLongNameOfSomeGasEstimateFunction() public returns (uint256) {
  11. return gasleft();
  12. }
  13. function value(uint256 val) public returns (uint256) {
  14. return val;
  15. }
  16. function test() external {
  17. target.run{ gas: gasleft(), value: 1 wei };
  18. target.run{gas:1,value:0x00}();
  19. target.run{
  20. gas : 1000,
  21. value: 1 ether
  22. } ();
  23. target.run{ gas: estimate(),
  24. value: value(1) }();
  25. target.run { value:
  26. value(1 ether), gas: veryAndVeryLongNameOfSomeGasEstimateFunction() } ();
  27. target.run /* comment 1 */ { value: /* comment2 */ 1 };
  28. target.run { /* comment3 */ value: 1, // comment4
  29. gas: gasleft()};
  30. target.run {
  31. // comment5
  32. value: 1,
  33. // comment6
  34. gas: gasleft()};
  35. vm.expectEmit({ checkTopic1: false, checkTopic2: false });
  36. }
  37. }