public_function_overrides.sol 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // RUN: --target polkadot --release --emit cfg
  2. interface IERC165 {
  3. function supportsInterface(bytes4 interfaceId) external view returns (bool);
  4. }
  5. interface IERC1155 is IERC165 {}
  6. // CHECK: # function ERC165::ERC165::function::supportsInterface__bytes4 public:true
  7. contract ERC165 is IERC165 {
  8. function supportsInterface(
  9. bytes4 interfaceId
  10. ) public view virtual override returns (bool) {}
  11. }
  12. // CHECK: # function ERC1155::ERC165::function::supportsInterface__bytes4 public:false
  13. // CHECK: # function ERC1155::ERC1155::function::supportsInterface__bytes4 public:true
  14. contract ERC1155 is ERC165, IERC1155 {
  15. function supportsInterface(
  16. bytes4 interfaceId
  17. ) public view virtual override(ERC165, IERC165) returns (bool) {}
  18. // CHECK: # function polkadot_deploy_dispatch public:false selector: nonpayable:false
  19. // CHECK: case uint32 3576764294
  20. // CHECK: # function polkadot_call_dispatch public:false selector: nonpayable:false
  21. // CHECK: case uint32 2815033089
  22. // NOT-CHECK: case uint32 3576764294
  23. }
  24. contract MyToken is ERC1155 {}