12345678910111213141516171819202122 |
- @program_id("F1ipperKF9EfD821ZbbYjS319LXYiBmjhzkkf5a26rC")
- 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;
- }
- }
|