forked from cerc-io/ipld-eth-server
(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:
@@ -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
|
||||
|
||||
@@ -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: "",
|
||||
|
||||
Reference in New Issue
Block a user