vat

package
v1.0.1-kovan.rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Dai     = "dai"
	Gem     = "gem"
	IlkArt  = "Art"
	IlkDust = "dust"
	IlkLine = "line"
	IlkRate = "rate"
	IlkSpot = "spot"
	Sin     = "sin"
	UrnArt  = "art"
	UrnInk  = "ink"
	Debt    = "debt"
	Vice    = "vice"
	Line    = "Line"
	Live    = "live"
)
View Source
const (
	InsertIlkArtQuery  = `INSERT INTO maker.vat_ilk_art (diff_id, header_id, ilk_id, art) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
	InsertIlkDustQuery = `INSERT INTO maker.vat_ilk_dust (diff_id, header_id, ilk_id, dust) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
	InsertIlkLineQuery = `INSERT INTO maker.vat_ilk_line (diff_id, header_id, ilk_id, line) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
	InsertIlkRateQuery = `INSERT INTO maker.vat_ilk_rate (diff_id, header_id, ilk_id, rate) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
	InsertIlkSpotQuery = `INSERT INTO maker.vat_ilk_spot (diff_id, header_id, ilk_id, spot) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`

	InsertUrnArtQuery = `INSERT INTO maker.vat_urn_art (diff_id, header_id, urn_id, art) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
	InsertUrnInkQuery = `INSERT INTO maker.vat_urn_ink (diff_id, header_id, urn_id, ink) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
)

Variables

View Source
var (
	IlksMappingIndex = vdbStorage.IndexTwo
	UrnsMappingIndex = vdbStorage.IndexThree
	GemsMappingIndex = vdbStorage.IndexFour
	DaiMappingIndex  = vdbStorage.IndexFive
	SinMappingIndex  = vdbStorage.IndexSix

	DebtKey      = common.HexToHash(vdbStorage.IndexSeven)
	DebtMetadata = vdbStorage.ValueMetadata{
		Name: Debt,
		Keys: nil,
		Type: vdbStorage.Uint256,
	}

	ViceKey      = common.HexToHash(vdbStorage.IndexEight)
	ViceMetadata = vdbStorage.ValueMetadata{
		Name: Vice,
		Keys: nil,
		Type: vdbStorage.Uint256,
	}

	LineKey      = common.HexToHash(vdbStorage.IndexNine)
	LineMetadata = vdbStorage.ValueMetadata{
		Name: Line,
		Keys: nil,
		Type: vdbStorage.Uint256,
	}

	LiveKey      = common.HexToHash(vdbStorage.IndexTen)
	LiveMetadata = vdbStorage.ValueMetadata{
		Name: Live,
		Keys: nil,
		Type: vdbStorage.Uint256,
	}
)

Functions

func NewKeysLoader added in v0.2.15

func NewKeysLoader(storageRepository mcdStorage.IMakerStorageRepository) storage.KeysLoader

Types

type VatStorageRepository

type VatStorageRepository struct {
	// contains filtered or unexported fields
}

func (*VatStorageRepository) Create

func (repository *VatStorageRepository) Create(diffID, headerID int64, metadata storage.ValueMetadata, value interface{}) error

func (*VatStorageRepository) SetDB

func (repository *VatStorageRepository) SetDB(db *postgres.DB)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL