checkSignature method

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

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