checkSignature method

  1. @protected
bool checkSignature(
  1. ContractFunction function,
  2. String expected
)

Returns whether the function has the expected selector.

This is used in an assert in the generated code.

Implementation

@protected
bool checkSignature(ContractFunction function, String expected) {
  return bytesToHex(function.selector) == expected;
}