Can anyone help ?
I am trying to listen for a new contract deployed. I thought that contracts were sent to the zero address which means its a new contract deployment, although this is not working. Maybe I am doing something wrong ?
for _, tx := range block.Transactions() {
zeroed := util.IsZeroAddress(tx.Hash().Hex())
if zeroed {
fmt.Println("We have a zero address!!!!")
fmt.Println("header", header.Hash().Hex())
fmt.Println("tx", tx.Hash().Hex())
}
The above doesn't seem to work so I am obviously doing something wrong.
I am listening for new headers, then getting the block and then finally the transactions.
Does anybody know how I can confirm that one of the transaction is a new contract deployment ?
Thanks in advance