cdp_manager

package
v1.1.2-mainnet.rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Vat      = "vat"
	Cdpi     = "cdpi"
	Urns     = "urns"
	ListPrev = "prev"
	ListNext = "next"
	Owns     = "owns"
	Ilks     = "ilks"
	First    = "first"
	Last     = "last"
	Count    = "count"
)
View Source
const (
	InsertCdpiQuery = `INSERT INTO maker.cdp_manager_cdpi (diff_id, header_id, cdpi) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING`

	InsertOwnsQuery = `INSERT INTO maker.cdp_manager_owns (diff_id, header_id, cdpi, owner) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING`
)

Variables

View Source
var (
	VatKey      = common.HexToHash(vdbStorage.IndexZero)
	VatMetadata = types.ValueMetadata{
		Name: Vat,
		Keys: nil,
		Type: types.Address,
	}

	CdpiKey      = common.HexToHash(vdbStorage.IndexOne)
	CdpiMetadata = types.ValueMetadata{
		Name: Cdpi,
		Keys: nil,
		Type: types.Uint256,
	}

	UrnsMappingIndex  = vdbStorage.IndexTwo
	ListMappingIndex  = vdbStorage.IndexThree
	OwnsMappingIndex  = vdbStorage.IndexFour
	IlksMappingIndex  = vdbStorage.IndexFive
	FirstMappingIndex = vdbStorage.IndexSix
	LastMappingIndex  = vdbStorage.IndexSeven
	CountMappingIndex = vdbStorage.IndexEight
)

Functions

func NewKeysLoader

func NewKeysLoader(storageRepository mcdStorage.IMakerStorageRepository) storage.KeysLoader

Types

type StorageRepository

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

func (*StorageRepository) Create

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

func (*StorageRepository) SetDB

func (repository *StorageRepository) 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