2

I'm using Geth and thinking maybe I'll have to deep dive into the Go code to make this happen, but it should be possible. What would I need to do to check if a function signature exists in a contract?

0

You need to get hold of the contract ABI, Otherwise it seems to be impossible. More info here

  • I know I need the contract ABI -- I'm asking the other half of it -- if I have the ABI signature how do I check if that signature exists in the contract? – Dan Rice Dec 29 '17 at 6:56
  • If I understand you correctly, you are asking whether you could read the byte code and find the signature, which is not possible (because It is reverse engineering) as per the info link I provided. If you are coming from C/C++ background, the analogy would be a .h file for a library is ABI. – Chim Dec 31 '17 at 12:38
  • One possible option would be to use Remix or Parity client, with ABI & deployed contract address to invoke the method you want to verify (This save time from you writing any code). If it returns expected results it would confirm the existence of the signature. – Chim Dec 31 '17 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.