(VDB-298) Consume Pit contract storage diffs

- Continuously parse storage diffs CSV data to read Pit contract state
- Convert ilks in database to raw bytes32 value for use in generating
  storage keys dynamically
- Persist storage diffs with block number and hash for validation
This commit is contained in:
Rob Mulholand
2019-02-06 10:31:46 -06:00
parent c474933432
commit 867f92c431
85 changed files with 2143 additions and 79 deletions
+1 -2
View File
@@ -17,7 +17,6 @@
package bite
import (
"bytes"
"encoding/json"
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
@@ -64,7 +63,7 @@ func (converter BiteConverter) ToModels(entities []interface{}) ([]interface{},
return nil, fmt.Errorf("entity of type %T, not %T", entity, BiteEntity{})
}
ilk := string(bytes.Trim(biteEntity.Ilk[:], "\x00"))
ilk := common.Bytes2Hex(biteEntity.Ilk[:])
urn := common.BytesToAddress(biteEntity.Urn[:]).String()
ink := biteEntity.Ink
art := biteEntity.Art
+1 -1
View File
@@ -70,7 +70,7 @@ var _ = Describe("Bite Converter", func() {
emptyLog, err := json.Marshal(types.Log{})
Expect(err).NotTo(HaveOccurred())
expectedModel := bite.BiteModel{
Ilk: "",
Ilk: "0000000000000000000000000000000000000000000000000000000000000000",
Urn: "0x0000000000000000000000000000000000000000",
Ink: "",
Art: "",