Revert "Update Mappings interface to take a diff as an argument to Lookup"
This reverts commit cda646b78ceb6714b132891ea4489a8ff4fc95e9.
This commit is contained in:
parent
8111f4ec5e
commit
f574407bb6
@ -42,7 +42,7 @@ func (transformer Transformer) ContractAddress() common.Address {
|
||||
}
|
||||
|
||||
func (transformer Transformer) Execute(diff utils.StorageDiff) error {
|
||||
metadata, lookupErr := transformer.Mappings.Lookup(diff)
|
||||
metadata, lookupErr := transformer.Mappings.Lookup(diff.StorageKey)
|
||||
if lookupErr != nil {
|
||||
return lookupErr
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
)
|
||||
@ -27,7 +29,7 @@ type MockMappings struct {
|
||||
LookupErr error
|
||||
}
|
||||
|
||||
func (mappings *MockMappings) Lookup(diff utils.StorageDiff) (utils.StorageValueMetadata, error) {
|
||||
func (mappings *MockMappings) Lookup(key common.Hash) (utils.StorageValueMetadata, error) {
|
||||
mappings.LookupCalled = true
|
||||
return mappings.Metadata, mappings.LookupErr
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
type Mappings interface {
|
||||
Lookup(diff utils.StorageDiff) (utils.StorageValueMetadata, error)
|
||||
Lookup(key common.Hash) (utils.StorageValueMetadata, error)
|
||||
SetDB(db *postgres.DB)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user