Skip to content

Question: how do you find the function hash "b61d27f6" #1

@lyricalpolymath

Description

@lyricalpolymath

@bokkypoobah this is more a question than an issue
I've noticed this in your https://github.com/bokkypoobah/TheDAOData/blob/master/getTheDAOCreatedTokenEventsWithNonZeroExtraBalance_v3

else if (stack[0].substring(56) == "b61d27f6")

how did you come up with this and what does it mean?

I did some digging, but I didn't come up with much
by looking at this gist it seems to be the hash of the execute function

b61d27f6: execute(address,uint256,bytes)

but I couldn't reproduce the hash from that signature
either using this https://emn178.github.io/online-tools/keccak_256.html

nor did I find it in the link you suggest to retrieve the fuction hashes
https://www.4byte.directory/signatures/?bytes4_signature=0xbaac5300
https://www.4byte.directory/signatures/?bytes4_signature=0xb61d27f6
which doesn't seem to work any more

by tracing the transactions and looking at the CALL functions stacks I've noticed that most (if not probably all) smart contract addresses have that function has as the first paramenter. Why is that?

for instance, here are the 2 CALL functions for transaction '0x694d35e8cacd209636e042e09681491ee82f15424e55db1e23fe7146af2337ad'

[{
    depth: 1,
    error: "",
    gas: 25007,
    gasCost: 96722,
    memory: ["0000000000000000000000003a1dd9ceec16c17d74a31f64040a77a6a6dec33d", "0000000000000000000000000000000000000000000000000000000000000102", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000003a1dd9ceec16c17d74a31f64040a77a6a6dec33d", "0000000000000000000000000000000000000000000000030927f74c9de00000", "000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413", "0000000000000000000000000000000000000000000000000000000000000080", "0000000000000000000000000000000000000000000000000000000000000000"],
    op: "CALL",
    pc: 3215,
    stack: ["00000000000000000000000000000000000000000000000000000000b61d27f6", "00000000000000000000000000000000000000000000000000000000000002f1", "000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413", "0000000000000000000000000000000000000000000000030927f74c9de00000", "0000000000000000000000000000000000000000000000000000000000000084", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413", "0000000000000000000000000000000000000000000000030927f74c9de00000", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000030927f74c9de00000", "000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413", "0000000000000000000000000000000000000000000000000000000000015682"],
    storage: {
      0000000000000000000000000000000000000000000000000000000000000106: "0000000000000000000000000000000000000000000000030927f74c9de00000",
      0000000000000000000000000000000000000000000000000000000000000107: "0000000000000000000000000000000000000000000000000000000000004235"
    }
}, {
    depth: 2,
    error: "",
    gas: 25007,
    gasCost: 64055,
    memory: ["0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060"],
    op: "CALL",
    pc: 2761,
    stack: ["0000000000000000000000000000000000000000000000000000000000000966", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000980", "000000000000000000000000050f81ae80a07542a70bb52f15895e347164f867", "0000000000000000000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000002061aa4ddbe955555", "000000000000000000000000807640a13483f8ac783c557fcdf27be11ea4ac7a", "000000000000000000000000000000000000000000000001030d526edf4aaaab", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060", "000000000000000000000000000000000000000000000001030d526edf4aaaab", "000000000000000000000000807640a13483f8ac783c557fcdf27be11ea4ac7a", "000000000000000000000000000000000000000000000000000000000000d6e7"],
    storage: {}
}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions