Convert drip_file_ilk tax field to ray (#117)

This commit is contained in:
Elizabeth
2018-11-29 14:10:12 -06:00
committed by GitHub
parent ecf854c7c4
commit 8ce901d1af
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
)
@@ -38,7 +39,7 @@ func (DripFileIlkConverter) ToModels(ethLogs []types.Log) ([]interface{}, error)
ilk := string(bytes.Trim(ethLog.Topics[2].Bytes(), "\x00"))
vow := string(bytes.Trim(ethLog.Topics[3].Bytes(), "\x00"))
taxBytes := ethLog.Data[len(ethLog.Data)-constants.DataItemLength:]
tax := big.NewInt(0).SetBytes(taxBytes).String()
tax := shared.ConvertToRay(big.NewInt(0).SetBytes(taxBytes).String())
raw, err := json.Marshal(ethLog)
if err != nil {
return nil, err