EthSlurp

Drink the blockchain

Download as .zip Download as .tar.gz View on GitHub

Application Binary Interface (ABI) Files

The first time you slurp an Ethereum address you may simply tell it an address. If, however, you additionally provide an ABI (Application Binary Interface) file, EthSlurp can do so much more. We won't explain what an ABI is (Google it), but it's worth learning if you don't know.

Parsing the Ethereum Input Data Field

Ethereum transactions are very like Bitcoin transactions, in the sense that they include at least three fields: from_account, to_account, and transaction_amount. This makes perfect sense. How else would one transfer money between accounts. Of course, there are other data fields, but one in particular is of interest to us. That fields is called input.

Bitcoin has an input field, but it has at most 80 bytes of storage. This is one of the important differences between Bitcoin and Ethereum. Ethereum's input field can be of any length. Why is this important? Becuase the input field is how Ethereum passes along its function calls.

This is the contents of a typical Ethereum data field:

    0xc9d27afe
    00000000000000000000000000000000000000000000000000000000000000ff
    0000000000000000000000000000000000000000000000000000000000000001

Computer gobbeldy-gook again. Using the information we find in the contract's ABI, EthSlurp is able to convert this string into this function call:

    vote(255,”Yea”)

Which, because this is The DAO's transaction represents a user voting on one of the proposals. Another transaction:

    0x23b872dd
    000000000000000000000000bf6cc4a882ace8e3a19bb8f5372280b33b2f6c9e
    000000000000000000000000fbb1b73c4f0bda4f67dca266ce6ef42f520fbb98
    0000000000000000000000000000000000000000000000056bc75e2d63100000

might transalte to this:

    transferFrom(0xbf6cc4a882ace8e3a19bb8f5372280b33b2f6c9e,
                 0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98,
                 -1)

which, in the case of The DAO, means move all DAO tokens in the first account to the second account (-1 is the largest possible unsigned integer: 2256-1, in effect this means move 'all' the ether).

And This Matters Why?

We beleive that EthSlurp is the only currently available software that displays the Ethereum function calls for a known contract in a human readable way. This allows us to seperate transactions based on function signature as we've done here. It also allows us to "see activity on contracts that would be very difficult to see otherwise> Recently, the WhiteHat DAO curators added their own address to the DarkDAO's whitelist. We saw this activity a full twelve hours before it was announced as is demonstrated here.

Stay tuned. There's more to come.