I think I can identify it by parsing input data of then transaction then checking it declares the required functions and events. Are there any good ways or tools?
Update 1
Sebastian gave me the answer.
I can identify whether a transaction is for creating token or not by the following.
block := ethrpc.EthGetBlockByNumber(blockNumber)
for key, value := range block.Transactions {
if value.Input != "0x" && strings.Contains(value.Input, "18160ddd") && strings.Contains(value.Input, "70a08231") && strings.Contains(value.Input, "dd62ed3e") && strings.Contains(value.Input, "a9059cbb") && strings.Contains(value.Input, "095ea7b3") && strings.Contains(value.Input, "23b872dd") {
fmt.Println("key:", key, " value.Hash:", value.Hash)
}
}
However the above check is not enough. Etherscan says it is Not ERC-20 Compliant for some cases. I guess it is due to lack of information like token name and symbol.
e.g. https://etherscan.io/tokens?q=0x1e025340d6f75a2a4ef81139049cfbf976782eeb
Now I'm trying to find out whether transaction is fully valid ERC20 Token standard. Do you have any good idea?
Update 2
I think I need to know how the input data is created. I will try to understand getData method of web3.eth.contract. well, I have a long way to go.
var ST = web3.eth.contract(HumanStandardToken.abi);
var creation_data = ST.new.getData(args[0], args[1], args[2], args[3], {from: addr, data: "0x" + HumanStandardToken.prototype.binary, gasPrice: 50000000000, gas: 3100000});
https://github.com/ConsenSys/Token-Factory/search?utf8=%E2%9C%93&q=ST&type=