cdp_manager

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: AGPL-3.0 Imports: 8 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 (block_number, block_hash, cdpi) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING`

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

Variables

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

	CdpiKey      = common.HexToHash(utils.IndexOne)
	CdpiMetadata = utils.StorageValueMetadata{
		Name: Cdpi,
		Keys: nil,
		Type: utils.Uint256,
	}

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

Functions

func NewKeysLoader added in v0.2.13

func NewKeysLoader(storageRepository mcdStorage.IMakerStorageRepository) storage.KeysLoader

Types

type CdpManagerStorageRepository

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

func (CdpManagerStorageRepository) Create

func (repository CdpManagerStorageRepository) Create(blockNumber int, blockHash string, metadata utils.StorageValueMetadata, value interface{}) error

func (*CdpManagerStorageRepository) SetDB

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