Documentation ¶
Index ¶
- Variables
- func AssertUrn(actual, expected UrnState)
- func CreateCatRecords(header core.Header, valuesMap map[string]string, ...)
- func CreateIlk(db *postgres.DB, header core.Header, valuesMap map[string]string, ...)
- func CreateJugRecords(header core.Header, valuesMap map[string]string, ...)
- func CreateUrn(setupData UrnSetupData, metadata UrnMetadata, vatRepo vat.VatStorageRepository, ...)
- func CreateVatRecords(header core.Header, valuesMap map[string]string, ...)
- func GetEmptyNullString() sql.NullString
- func GetExpectedRatio(ink, spot, art, rate int) float64
- func GetExpectedTimestamp(epoch int) string
- func GetIlkValues(seed int) map[string]string
- func GetRandomInt(min, max int) int
- func GetValidNullString(val string) sql.NullString
- type BiteEvent
- type FrobEvent
- type IlkFileEvent
- type IlkState
- type LogValue
- type SinQueueEvent
- type TestIlk
- type UrnMetadata
- type UrnSetupData
- type UrnState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FakeIlk = TestIlk{ Hex: "464b450000000000000000000000000000000000000000000000000000000000", Identifier: "FKE", } AnotherFakeIlk = TestIlk{ Hex: "464b453200000000000000000000000000000000000000000000000000000000", Identifier: "FKE2", } EmptyMetadatas []utils.StorageValueMetadata FakeIlkRateMetadata = utils.GetStorageValueMetadata(vat.IlkRate, map[utils.Key]string{constants.Ilk: FakeIlk.Hex}, utils.Uint256) FakeIlkArtMetadata = utils.GetStorageValueMetadata(vat.IlkArt, map[utils.Key]string{constants.Ilk: FakeIlk.Hex}, utils.Uint256) FakeIlkSpotMetadata = utils.GetStorageValueMetadata(vat.IlkSpot, map[utils.Key]string{constants.Ilk: FakeIlk.Hex}, utils.Uint256) FakeIlkLineMetadata = utils.GetStorageValueMetadata(vat.IlkLine, map[utils.Key]string{constants.Ilk: FakeIlk.Hex}, utils.Uint256) FakeIlkDustMetadata = utils.GetStorageValueMetadata(vat.IlkDust, map[utils.Key]string{constants.Ilk: FakeIlk.Hex}, utils.Uint256) FakeIlkVatMetadatas = []utils.StorageValueMetadata{ FakeIlkRateMetadata, FakeIlkArtMetadata, FakeIlkSpotMetadata, FakeIlkLineMetadata, FakeIlkDustMetadata, } FakeIlkCatMetadatas = []utils.StorageValueMetadata{ fakeIlkChopMetadata, fakeIlkLumpMetadata, fakeIlkFlipMetadata, } FakeIlkJugMetadatas = []utils.StorageValueMetadata{ fakeIlkRhoMetadata, fakeIlkTaxMetadata, } AnotherFakeIlkVatMetadatas = []utils.StorageValueMetadata{ anotherFakeIlkRateMetadata, anotherFakeIlkArtMetadata, anotherFakeIlkSpotMetadata, anotherFakeIlkLineMetadata, anotherFakeIlkDustMetadata, } AnotherFakeIlkCatMetadatas = []utils.StorageValueMetadata{ anotherFakeIlkChopMetadata, anotherFakeIlkLumpMetadata, anotherFakeIlkFlipMetadata, } AnotherFakeIlkJugMetadatas = []utils.StorageValueMetadata{ anotherFakeIlkRhoMetadata, anotherFakeIlkTaxMetadata, } )
Functions ¶
func CreateCatRecords ¶
func CreateCatRecords(header core.Header, valuesMap map[string]string, metadatas []utils.StorageValueMetadata, repository cat.CatStorageRepository)
func CreateJugRecords ¶
func CreateJugRecords(header core.Header, valuesMap map[string]string, metadatas []utils.StorageValueMetadata, repository jug.JugStorageRepository)
func CreateUrn ¶
func CreateUrn(setupData UrnSetupData, metadata UrnMetadata, vatRepo vat.VatStorageRepository, headerRepo repositories.HeaderRepository)
Creates urn by creating necessary state diffs and the corresponding header
func CreateVatRecords ¶
func CreateVatRecords(header core.Header, valuesMap map[string]string, metadatas []utils.StorageValueMetadata, repository vat.VatStorageRepository)
func GetEmptyNullString ¶ added in v0.2.4
func GetEmptyNullString() sql.NullString
func GetExpectedRatio ¶
func GetExpectedTimestamp ¶ added in v0.2.3
func GetIlkValues ¶
func GetRandomInt ¶ added in v0.2.4
func GetValidNullString ¶ added in v0.2.4
func GetValidNullString(val string) sql.NullString
Types ¶
type IlkFileEvent ¶ added in v0.2.4
type IlkFileEvent struct { IlkIdentifier sql.NullString `db:"ilk_identifier"` What string Data string }
type IlkState ¶
type SinQueueEvent ¶ added in v0.2.4
type UrnMetadata ¶
type UrnMetadata struct { UrnInk utils.StorageValueMetadata UrnArt utils.StorageValueMetadata IlkSpot utils.StorageValueMetadata IlkRate utils.StorageValueMetadata }
func GetUrnMetadata ¶
func GetUrnMetadata(ilk, urn string) UrnMetadata
type UrnSetupData ¶
func GetUrnSetupData ¶
func GetUrnSetupData(block, timestamp int) UrnSetupData
Does not return values computed by the query (ratio, safe, updated, created)
type UrnState ¶
type UrnState struct { UrnGuy string `db:"urn_guy"` IlkIdentifier string `db:"ilk_identifier"` BlockHeight int `db:"block_height"` Ink string Art string Ratio sql.NullString Safe bool Created sql.NullString Updated sql.NullString }
Click to show internal directories.
Click to hide internal directories.