remove unnecessary byte slicing

This commit is contained in:
Taka Goto 2018-10-17 12:04:11 -05:00
parent 2f64269ab3
commit a3ca319e9b

View File

@ -37,9 +37,9 @@ func (VatFluxConverter) ToModels(ethLogs []types.Log) ([]VatFluxModel, error) {
return nil, err return nil, err
} }
ilk := common.BytesToAddress(ethLog.Topics[1].Bytes()[:]) ilk := common.BytesToAddress(ethLog.Topics[1].Bytes())
src := common.BytesToAddress(ethLog.Topics[2].Bytes()[:]) src := common.BytesToAddress(ethLog.Topics[2].Bytes())
dst := common.BytesToAddress(ethLog.Topics[3].Bytes()[:]) dst := common.BytesToAddress(ethLog.Topics[3].Bytes())
radBytes := shared.GetDataBytesAtIndex(-1, ethLog.Data) radBytes := shared.GetDataBytesAtIndex(-1, ethLog.Data)
rad := big.NewInt(0).SetBytes(radBytes).String() rad := big.NewInt(0).SetBytes(radBytes).String()