4

On this transaction: https://etherscan.io/tx/0xae2630cdfbd0ca5292d272343c35dc8094365f2ecdc5c262c5639e79683f74dc, the input data is parsed and displayed as 'fund'.

This is both correct and incorrect.

It is incorrect because there is no function in the 'to' contract (singularDTVToken) called 'fund.' (https://etherscan.io/address/0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009#code).

But there is a function called 'fund' in a related contract, and the 4byte encoding for 'fund()' is 0xb60d4288, which is the value of the input data. (Related contract is called SNGLSCrowdFund: https://etherscan.io/address/0xbdf5c4f1c1a9d7335a6a68d9aa011d5f40cf5520#code.)

I think it's misleading to say that the input data resolves to 'fund' in this case. This suggests that a function called 'fund' was invoked on the contract, when in fact, it was not.

My question is this: Is it correct to report 'fund' in the context of a contract that has no 'fund' function. Wouldn't it be more accurate to indicate that the default function had actually been called? (And is it true that the default function would have been called in this case?)

  • 1
    I think this results from assuming that, because 4byte encodings are the same across all contracts, that they carry the same meaning across all contracts. They don't. The meaning of an encoding in the input data is dependent only on the contract receiving the transaction. If there is no corresponding function, then I'm pretty sure the default function (if it exists) gets called. I'm trying to confirm this. Plus, I think etherscan reporting it as such is at best misleading. – Thomas Jay Rush Feb 1 '17 at 12:35
  • I suggest you contact Ethercan.io author directly regarding this. Furthermore suggest ways to discriminate calls and other contract transactions. – Mikko Ohtamaa Feb 1 '17 at 15:28
  • I think that EtherScan picked these 4 bytes signature then correlated them to another contract whose code contains function fund(). – Xavier Leprêtre B9lab Feb 1 '17 at 17:26
  • While this is misleading, it's also probably not very common. The wording should probably be clarified to say that this may have been a call to fund(), but I'm not sure it's worth complicating the issue by checking the source to make sure the function exists. (For instance, a proxy contract may just pass the data on, so the user may be calling a fund methopd of a different contract). – Tjaden Hess Feb 1 '17 at 17:33
  • 1
    Let us continue this discussion in chat. – Thomas Jay Rush Feb 1 '17 at 21:10

Your Answer

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

Browse other questions tagged or ask your own question.