function_selector_override.sol 304 B

123456789101112
  1. contract foo {
  2. // The selector attribute can be an array of values (bytes)
  3. @selector([1, 2, 3, 4])
  4. function get_foo() pure public returns (int) {
  5. return 102;
  6. }
  7. @selector([0x05, 0x06, 0x07, 0x08])
  8. function get_bar() pure public returns (int) {
  9. return 105;
  10. }
  11. }