update frob and bite converters and repository

This commit is contained in:
Taka Goto
2018-10-07 22:02:14 -05:00
parent 7e6302c662
commit 347a339687
11 changed files with 43 additions and 41 deletions
+3 -2
View File
@@ -19,6 +19,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"encoding/json"
"github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/geth"
)
@@ -56,8 +57,8 @@ func (FrobConverter) ToModels(entities []FrobEntity) ([]FrobModel, error) {
return nil, err
}
model := FrobModel{
Ilk: entity.Ilk[:],
Urn: entity.Urn[:],
Ilk: common.BytesToAddress(entity.Ilk[:common.AddressLength]).String(),
Urn: common.BytesToAddress(entity.Urn[:common.AddressLength]).String(),
Ink: entity.Ink.String(),
Art: entity.Art.String(),
Dink: entity.Dink.String(),
+2 -2
View File
@@ -15,8 +15,8 @@
package frob
type FrobModel struct {
Ilk []byte
Urn []byte
Ilk string
Urn string
Ink string
Art string
Dink string