Add Cat storage transformer

This commit is contained in:
Edvard
2019-02-20 14:37:46 +01:00
parent 6e0f033078
commit cd6611d2ec
8 changed files with 415 additions and 3 deletions
@@ -3,6 +3,7 @@ package test_helpers
import (
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/storage_diffs/maker"
"math/big"
)
type MockMakerStorageRepository struct {
@@ -14,11 +15,14 @@ type MockMakerStorageRepository struct {
GetGemKeysError error
GetIlksCalled bool
GetIlksError error
GetMaxFlipCalled bool
GetMaxFlipError error
GetSinKeysCalled bool
GetSinKeysError error
GetUrnsCalled bool
GetUrnsError error
Ilks []string
MaxFlip *big.Int
SinKeys []string
Urns []maker.Urn
}
@@ -38,6 +42,11 @@ func (repository *MockMakerStorageRepository) GetIlks() ([]string, error) {
return repository.Ilks, repository.GetIlksError
}
func (repository *MockMakerStorageRepository) GetMaxFlip() (*big.Int, error) {
repository.GetMaxFlipCalled = true
return repository.MaxFlip, repository.GetMaxFlipError
}
func (repository *MockMakerStorageRepository) GetSinKeys() ([]string, error) {
repository.GetSinKeysCalled = true
return repository.SinKeys, repository.GetSinKeysError