In this doc :


Given this representation of the contract

contract Foo {
  function bar(fixed[2] xy) {}
  function baz(uint32 x, bool y) returns (bool r) { r = x > 32 || y; }
  function sam(bytes name, bool z, uint[] data) {}

it is said that If we wanted to call the method sam with the arguments "dave", true and [1,2,3] it would be broken down into :

0x0000000000000000000000000000000000000000000000000000000000000060: the location of the data part of the first parameter (dynamic type), measured in bytes from the start of the arguments block. In this case, 0x60.

What does that mean ?

I can't wrap my head around this concept nor the way it's ordered (methodid,datalocationparam1,hexparm2,datalocationparam3,hexparam3,hexparam1,datalocationparam3,entry1,entry2,entry3),or what an "entry" is.

  • I struggled mightily with this exact issue. I don't know if there's a better solution, but I can tell you that if you pick apart the page you've referenced above, what you're looking for is in there. It took me a couple of days, but I was able to ultimately figure it out using what's there. It's not at all clearly written, though. Dec 8, 2016 at 19:49
  • did you ever figured out to ordering ? (methodid,datalocationparam1,hexparm2,datalocationparam3,hexparam3,hexparam1,datalocationparam3,hex3-1,hex3-2,hex3-3)
    – solinooby
    Dec 11, 2016 at 23:01
  • I did. There's a GitHub repository called "ethslurp" that does this, but it's kind of hacky. In a file called transaction.cpp. In a function called parseParams. The function takes the input string and a list of parameter types and returns and returns the parameters in a pipe separated string. It's hacky, but it works. Dec 11, 2016 at 23:33


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.