new fields in eth.receipt_cids to index contract addresses seen in
logs; handle null dst/contract addrs in trxs/rcts
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"bytes"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/ipfs"
|
||||
)
|
||||
|
||||
@@ -53,10 +54,18 @@ func ListContainsGap(gapList []Gap, gap Gap) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// HandleNullAddr converts a nil pointer to an address to a zero-valued hex address string
|
||||
func HandleNullAddr(to *common.Address) string {
|
||||
// HandleNullAddrPointer will return an emtpy string for a nil address pointer
|
||||
func HandleNullAddrPointer(to *common.Address) string {
|
||||
if to == nil {
|
||||
return "0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||
return ""
|
||||
}
|
||||
return to.Hex()
|
||||
}
|
||||
|
||||
// HandleNullAddr will return an empty string for a a null address
|
||||
func HandleNullAddr(to common.Address) string {
|
||||
if to.Hex() == "0x0000000000000000000000000000000000000000" {
|
||||
return ""
|
||||
}
|
||||
return to.Hex()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user