123456789101112131415161718192021 |
- contract flipper {
- bool private value = true;
- @payer(payer)
- constructor() {
- print("Hello, World!");
- }
- /// A message that can be called on instantiated contracts.
- /// This one flips the value of the stored `bool` from `true`
- /// to `false` and vice versa.
- function flip() public {
- value = !value;
- }
- /// Simply returns the current value of our `bool`.
- function get() public view returns (bool) {
- return value;
- }
- }
|