2018-07-04 09:25:45 +00:00
contract C {
function f ( ) view public {
2020-12-14 15:51:07 +00:00
payable ( this ) . transfer ( 1 ) ;
2018-07-04 09:25:45 +00:00
}
function g ( ) view public {
2020-12-14 15:51:07 +00:00
require ( payable ( this ) . send ( 2 ) ) ;
2018-07-04 09:25:45 +00:00
}
function h ( ) view public {
2020-12-14 15:51:07 +00:00
selfdestruct ( payable ( this ) ) ;
2018-07-04 09:25:45 +00:00
}
function i ( ) view public {
2018-08-15 21:30:09 +00:00
( bool success , ) = address ( this ) . delegatecall ( " " ) ;
require ( success ) ;
2018-07-04 09:25:45 +00:00
}
function j ( ) view public {
2018-08-15 21:30:09 +00:00
( bool success , ) = address ( this ) . call ( " " ) ;
require ( success ) ;
2018-07-04 09:25:45 +00:00
}
2019-09-09 16:22:02 +00:00
receive ( ) payable external {
2018-09-12 14:21:43 +00:00
}
2018-07-04 09:25:45 +00:00
}
// ----
2023-01-19 08:34:14 +00:00
// Warning 5159: (201-213): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
2022-02-17 15:52:36 +00:00
// TypeError 8961: (52-77): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (132-153): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (201-228): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (293-323): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (414-436): Function cannot be declared as view because this expression (potentially) modifies the state.