postgres

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginTransaction

func BeginTransaction(ctx context.Context, tx storage.Transactable) (models.Transaction, error)

func NewAddress

func NewAddress(db bun.IDB) storage.IAddress

NewAddress -

func NewApiKey added in v1.10.17

func NewApiKey(db bun.IDB) storage.IApiKey

NewApiKey -

func NewBlobLog added in v1.2.0

func NewBlobLog(db bun.IDB, export *Export) storage.IBlobLog

NewBlobLog -

func NewBlockSignature added in v1.4.0

func NewBlockSignature(db bun.IDB) storage.IBlockSignature

NewBlockSignature -

func NewBlockStats

func NewBlockStats(db bun.IDB) storage.IBlockStats

NewBlockStats -

func NewBlocks

func NewBlocks(db bun.IDB) storage.IBlock

NewBlocks -

func NewConstant

func NewConstant(db bun.IDB) storage.IConstant

NewConstant -

func NewDelegation added in v1.6.0

func NewDelegation(db bun.IDB) storage.IDelegation

NewDelegation -

func NewDenomMetadata

func NewDenomMetadata(db bun.IDB) storage.IDenomMetadata

NewDenomMetadata -

func NewEvent

func NewEvent(db bun.IDB) storage.IEvent

NewEvent -

func NewForwarding added in v1.18.13

func NewForwarding(db bun.IDB) storage.IForwarding

NewForwarding -

func NewGrant added in v1.7.0

func NewGrant(db bun.IDB) storage.IGrant

NewGrant -

func NewHLGasPayment added in v1.17.0

func NewHLGasPayment(db bun.IDB) storage.IHLGasPayment

func NewHLIGP added in v1.17.0

func NewHLIGP(db bun.IDB) storage.IHLIGP

func NewHLIGPConfig added in v1.17.0

func NewHLIGPConfig(db bun.IDB) storage.IHLIGPConfig

func NewHLMailbox added in v1.15.0

func NewHLMailbox(db bun.IDB) storage.IHLMailbox

func NewHLToken added in v1.15.0

func NewHLToken(db bun.IDB) storage.IHLToken

NewHLToken -

func NewHLTransfer added in v1.15.0

func NewHLTransfer(db bun.IDB) storage.IHLTransfer

NewHLTransfer -

func NewIbcChannel added in v1.13.0

func NewIbcChannel(db bun.IDB) storage.IIbcChannel

func NewIbcClient added in v1.13.0

func NewIbcClient(db bun.IDB) storage.IIbcClient

func NewIbcConnection added in v1.13.0

func NewIbcConnection(db bun.IDB) storage.IIbcConnection

func NewIbcTransfer added in v1.13.0

func NewIbcTransfer(db bun.IDB) storage.IIbcTransfer

func NewJail added in v1.6.0

func NewJail(db bun.IDB) storage.IJail

NewJail -

func NewMessage

func NewMessage(db bun.IDB) storage.IMessage

NewMessage -

func NewNamespace

func NewNamespace(db bun.IDB) storage.INamespace

NewNamespace -

func NewProposal added in v1.12.0

func NewProposal(db bun.IDB) storage.IProposal

NewProposal -

func NewRedelegation added in v1.6.0

func NewRedelegation(db bun.IDB) storage.IRedelegation

NewRedelegation -

func NewRollup added in v1.2.0

func NewRollup(db bun.IDB) storage.IRollup

NewRollup -

func NewRollupProvider added in v1.17.1

func NewRollupProvider(db bun.IDB) storage.IRollupProvider

func NewSearch added in v1.4.0

func NewSearch(db bun.IDB) storage.ISearch

NewSearch -

func NewSignalVersion added in v1.15.28

func NewSignalVersion(db bun.IDB) storage.ISignalVersion

NewSignalVersion -

func NewStakingLog added in v1.7.0

func NewStakingLog(db bun.IDB) storage.IStakingLog

NewStakingLog -

func NewState

func NewState(db bun.IDB) storage.IState

NewState -

func NewTx

func NewTx(db bun.IDB) storage.ITx

NewTx -

func NewTxRepos added in v1.20.0

func NewTxRepos(tx models.Transaction) models.TxRepos

func NewUndelegation added in v1.6.0

func NewUndelegation(db bun.IDB) storage.IUndelegation

NewUndelegation -

func NewUpgrade added in v1.15.28

func NewUpgrade(db bun.IDB) storage.IUpgrade

NewUpgrade -

func NewValidator

func NewValidator(db bun.IDB) storage.IValidator

NewValidator -

func NewValidatorBondUpdate added in v1.20.0

func NewValidatorBondUpdate(db bun.IDB) storage.IValidatorBondUpdate

NewValidatorBondUpdate -

func NewVestingAccount added in v1.7.0

func NewVestingAccount(db bun.IDB) storage.IVestingAccount

NewVestingAccount -

func NewVestingPeriod added in v1.7.0

func NewVestingPeriod(db bun.IDB) storage.IVestingPeriod

NewVestingPeriod -

func NewVote added in v1.12.0

func NewVote(db bun.IDB) storage.IVote

NewVote -

func NewZkISM added in v1.18.13

func NewZkISM(db bun.IDB) storage.IZkISM

Types

type Address

type Address struct {
	*postgres.Table[*storage.Address]
}

Address -

func (*Address) AddressByString added in v1.19.7

func (a *Address) AddressByString(ctx context.Context, readableHash string) (address storage.Address, err error)

AddressByString -

func (*Address) Balances added in v1.19.7

func (a *Address) Balances(ctx context.Context, addressId uint64, limit, offset int) (balances []storage.Balance, err error)

Balances -

func (*Address) ByHash

func (a *Address) ByHash(ctx context.Context, hash []byte) (address storage.Address, err error)

ByHash -

func (*Address) IdByAddress added in v1.10.1

func (a *Address) IdByAddress(ctx context.Context, address string, ids ...uint64) (id uint64, err error)

IdByAddress -

func (*Address) IdByHash added in v1.7.4

func (a *Address) IdByHash(ctx context.Context, hash ...[]byte) (id []uint64, err error)

IdByHash -

func (*Address) LastAddressAction added in v1.20.0

func (a *Address) LastAddressAction(ctx context.Context, address []byte) (uint64, error)

LastAddressAction -

func (*Address) ListWithBalance

func (a *Address) ListWithBalance(ctx context.Context, filters storage.AddressListFilter) (result []storage.Address, err error)

func (*Address) Series added in v1.7.4

func (a *Address) Series(ctx context.Context, addressId uint64, timeframe storage.Timeframe, column string, req storage.SeriesRequest) (items []storage.HistogramItem, err error)

type ApiKey added in v1.10.17

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

ApiKey -

func (*ApiKey) Get added in v1.10.17

func (ak *ApiKey) Get(ctx context.Context, key string) (apikey storage.ApiKey, err error)

type BlobLog added in v1.2.0

type BlobLog struct {
	*postgres.Table[*storage.BlobLog]
	// contains filtered or unexported fields
}

BlobLog -

func (*BlobLog) Blob added in v1.7.5

func (bl *BlobLog) Blob(ctx context.Context, height types.Level, nsId uint64, commitment string) (l storage.BlobLog, err error)

func (*BlobLog) ByHeight added in v1.3.2

func (bl *BlobLog) ByHeight(ctx context.Context, height types.Level, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)

func (*BlobLog) ByNamespace added in v1.2.0

func (bl *BlobLog) ByNamespace(ctx context.Context, nsId uint64, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)

func (*BlobLog) ByProviders added in v1.2.0

func (bl *BlobLog) ByProviders(ctx context.Context, providers []storage.RollupProvider, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)

func (*BlobLog) BySigner added in v1.2.0

func (bl *BlobLog) BySigner(ctx context.Context, signerId uint64, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)

func (*BlobLog) ByTxId added in v1.3.2

func (bl *BlobLog) ByTxId(ctx context.Context, txId uint64, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)

func (*BlobLog) CountByTxId added in v1.3.2

func (bl *BlobLog) CountByTxId(ctx context.Context, txId uint64) (int, error)

func (*BlobLog) ExportByProviders added in v1.7.0

func (bl *BlobLog) ExportByProviders(ctx context.Context, providers []storage.RollupProvider, from, to time.Time, stream io.Writer) (err error)

func (*BlobLog) ListBlobs added in v1.10.0

func (bl *BlobLog) ListBlobs(ctx context.Context, fltrs storage.ListBlobLogFilters) (logs []storage.BlobLog, err error)

type BlockSignature added in v1.4.0

type BlockSignature struct {
	*postgres.Table[*storage.BlockSignature]
}

BlockSignature -

func (*BlockSignature) LevelsByValidator added in v1.4.0

func (bs *BlockSignature) LevelsByValidator(ctx context.Context, validatorId uint64, startHeight types.Level) (levels []types.Level, err error)

type BlockStats

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

BlockStats -

func (*BlockStats) ByHeight

func (b *BlockStats) ByHeight(ctx context.Context, height pkgTypes.Level) (stats storage.BlockStats, err error)

ByHeight -

func (*BlockStats) LastFrom added in v1.1.0

func (b *BlockStats) LastFrom(ctx context.Context, head pkgTypes.Level, limit int) (stats []storage.BlockStats, err error)

type Blocks

type Blocks struct {
	*postgres.Table[*storage.Block]
}

Blocks -

func (*Blocks) ByHash

func (b *Blocks) ByHash(ctx context.Context, hash []byte) (block storage.Block, err error)

ByHash -

func (*Blocks) ByHeight

func (b *Blocks) ByHeight(ctx context.Context, height types.Level) (block storage.Block, err error)

ByHeight -

func (*Blocks) ByHeightWithStats

func (b *Blocks) ByHeightWithStats(ctx context.Context, height types.Level) (block storage.Block, err error)

ByHeightWithStats -

func (*Blocks) ByIdWithRelations

func (b *Blocks) ByIdWithRelations(ctx context.Context, id uint64) (block storage.Block, err error)

ByIdWithRelations -

func (*Blocks) ByProposer added in v1.4.0

func (b *Blocks) ByProposer(ctx context.Context, proposerId uint64, limit, offset int) (blocks []storage.Block, err error)

func (*Blocks) Last

func (b *Blocks) Last(ctx context.Context) (block storage.Block, err error)

Last -

func (*Blocks) ListWithStats

func (b *Blocks) ListWithStats(ctx context.Context, limit, offset uint64, order sdk.SortOrder) (blocks []*storage.Block, err error)

ListWithStats -

func (*Blocks) Time added in v1.5.0

func (b *Blocks) Time(ctx context.Context, height types.Level) (response time.Time, err error)

type Constant

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

Constant -

func (*Constant) All

func (constant *Constant) All(ctx context.Context) (c []storage.Constant, err error)

func (*Constant) ByModule

func (constant *Constant) ByModule(ctx context.Context, module types.ModuleName) (c []storage.Constant, err error)

func (*Constant) Get

func (constant *Constant) Get(ctx context.Context, module types.ModuleName, name string) (c storage.Constant, err error)

type Delegation added in v1.6.0

type Delegation struct {
	*postgres.Table[*storage.Delegation]
}

Delegation -

func (*Delegation) AddressDelegations added in v1.20.0

func (d *Delegation) AddressDelegations(ctx context.Context, addressIds ...uint64) (val []storage.Delegation, err error)

func (*Delegation) ByAddress added in v1.6.0

func (d *Delegation) ByAddress(ctx context.Context, addressId uint64, limit, offset int, showZero bool) (delegations []storage.Delegation, err error)

func (*Delegation) ByValidator added in v1.6.0

func (d *Delegation) ByValidator(ctx context.Context, validatorId uint64, limit, offset int, showZero bool) (delegations []storage.Delegation, err error)

type DenomMetadata

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

DenomMetadata -

func (*DenomMetadata) All

func (dm *DenomMetadata) All(ctx context.Context) (metadata []storage.DenomMetadata, err error)

type Event

type Event struct {
	*postgres.Table[*storage.Event]
}

Event -

func (*Event) ByBlock

func (e *Event) ByBlock(ctx context.Context, height pkgTypes.Level, fltrs storage.EventFilter) (events []storage.Event, err error)

ByBlock -

func (*Event) ByTxId

func (e *Event) ByTxId(ctx context.Context, txId uint64, fltrs storage.EventFilter) (events []storage.Event, err error)

ByTxId -

type Export added in v1.5.0

type Export struct {
	*database.Bun
}

func NewExport added in v1.5.0

func NewExport(db *database.Bun) *Export

func (*Export) ToCsv added in v1.5.0

func (e *Export) ToCsv(ctx context.Context, writer io.Writer, query *bun.SelectQuery) error

type Forwarding added in v1.18.13

type Forwarding struct {
	*postgres.Table[*storage.Forwarding]
}

Forwarding -

func (*Forwarding) ById added in v1.18.13

func (f *Forwarding) ById(ctx context.Context, id uint64) (forwarding storage.Forwarding, prevTime time.Time, err error)

func (*Forwarding) Filter added in v1.18.13

func (f *Forwarding) Filter(ctx context.Context, filters storage.ForwardingFilter) (forwardings []storage.Forwarding, err error)

func (*Forwarding) Inputs added in v1.18.13

func (f *Forwarding) Inputs(ctx context.Context, addressId uint64, from, to time.Time) (inputs []storage.ForwardingInput, err error)

type Grant added in v1.7.0

type Grant struct {
	*postgres.Table[*storage.Grant]
}

Grant -

func (*Grant) ByGrantee added in v1.7.0

func (g *Grant) ByGrantee(ctx context.Context, id uint64, limit, offset int) (grants []storage.Grant, err error)

func (*Grant) ByGranter added in v1.7.0

func (g *Grant) ByGranter(ctx context.Context, id uint64, limit, offset int) (grants []storage.Grant, err error)

type HLGasPayment added in v1.17.0

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

func (*HLGasPayment) List added in v1.17.0

func (hl *HLGasPayment) List(ctx context.Context, limit, offset int) (payments []storage.HLGasPayment, err error)

type HLIGP added in v1.17.0

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

func (*HLIGP) ByHash added in v1.17.0

func (hl *HLIGP) ByHash(ctx context.Context, hash []byte) (igp storage.HLIGP, err error)

func (*HLIGP) IdByHash added in v1.20.0

func (hl *HLIGP) IdByHash(ctx context.Context, hash []byte) (id uint64, err error)

IdByHash resolves an IGP id without loading its configs.

func (*HLIGP) List added in v1.17.0

func (hl *HLIGP) List(ctx context.Context, limit, offset int) (igp []storage.HLIGP, err error)

type HLIGPConfig added in v1.17.0

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

func (*HLIGPConfig) List added in v1.17.0

func (hl *HLIGPConfig) List(ctx context.Context, limit, offset int) (config []storage.HLIGPConfig, err error)

type HLMailbox added in v1.15.0

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

func (*HLMailbox) ByHash added in v1.15.0

func (hl *HLMailbox) ByHash(ctx context.Context, hash []byte) (mailbox storage.HLMailbox, err error)

func (*HLMailbox) ByInternalId added in v1.20.0

func (hl *HLMailbox) ByInternalId(ctx context.Context, internalId uint64) (mailbox storage.HLMailbox, err error)

func (*HLMailbox) List added in v1.15.0

func (hl *HLMailbox) List(ctx context.Context, limit, offset int) (mailbox []storage.HLMailbox, err error)

type HLToken added in v1.15.0

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

HLToken -

func (*HLToken) ByHash added in v1.15.0

func (t *HLToken) ByHash(ctx context.Context, id []byte) (token storage.HLToken, err error)

func (*HLToken) IdByTokenId added in v1.20.0

func (t *HLToken) IdByTokenId(ctx context.Context, tokenId []byte) (id uint64, err error)

func (*HLToken) List added in v1.15.0

func (t *HLToken) List(ctx context.Context, filters storage.ListHyperlaneTokens) (tokens []storage.HLToken, err error)

type HLTransfer added in v1.15.0

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

HLTransfer -

func (*HLTransfer) ById added in v1.15.22

func (t *HLTransfer) ById(ctx context.Context, id uint64) (transfer storage.HLTransfer, err error)

func (*HLTransfer) List added in v1.15.0

func (t *HLTransfer) List(ctx context.Context, filters storage.ListHyperlaneTransferFilters) (transfers []storage.HLTransfer, err error)

func (*HLTransfer) Series added in v1.15.23

func (t *HLTransfer) Series(ctx context.Context, domainId uint64, timeframe storage.Timeframe, column string, req storage.SeriesRequest) (items []storage.HistogramItem, err error)

func (*HLTransfer) StatsByDomain added in v1.15.23

func (t *HLTransfer) StatsByDomain(ctx context.Context, limit, offset int) (stats []storage.DomainStats, err error)

func (*HLTransfer) TotalSeries added in v1.15.25

func (t *HLTransfer) TotalSeries(ctx context.Context, timeframe storage.Timeframe, column string, req storage.SeriesRequest) (items []storage.HistogramItem, err error)

type IbcChannel added in v1.13.0

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

func (*IbcChannel) BusiestChannel1m added in v1.15.21

func (c *IbcChannel) BusiestChannel1m(ctx context.Context) (*storage.BusiestChannel, error)

func (*IbcChannel) ById added in v1.13.0

func (c *IbcChannel) ById(ctx context.Context, id string) (channel storage.IbcChannel, err error)

func (*IbcChannel) List added in v1.13.0

func (c *IbcChannel) List(ctx context.Context, fltrs storage.ListChannelFilters) (channels []storage.IbcChannel, err error)

func (*IbcChannel) StatsByChain added in v1.13.0

func (c *IbcChannel) StatsByChain(ctx context.Context, limit, offset int) (stats []storage.ChainStats, err error)

type IbcClient added in v1.13.0

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

func (*IbcClient) ByChainId added in v1.15.17

func (c *IbcClient) ByChainId(ctx context.Context, chainId string) (res []string, err error)

func (*IbcClient) ById added in v1.13.0

func (c *IbcClient) ById(ctx context.Context, id string) (client storage.IbcClient, err error)

func (*IbcClient) List added in v1.13.0

func (c *IbcClient) List(ctx context.Context, filters storage.ListIbcClientsFilters) (clients []storage.IbcClient, err error)

type IbcConnection added in v1.13.0

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

func (*IbcConnection) ById added in v1.13.0

func (c *IbcConnection) ById(ctx context.Context, id string) (conn storage.IbcConnection, err error)

func (*IbcConnection) ByIds added in v1.20.0

func (c *IbcConnection) ByIds(ctx context.Context, ids ...string) (result []storage.ConnIdAndClientId, err error)

func (*IbcConnection) IdsByClients added in v1.15.17

func (c *IbcConnection) IdsByClients(ctx context.Context, clientIds ...string) (res []string, err error)

func (*IbcConnection) List added in v1.13.0

type IbcTransfer added in v1.13.0

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

func (*IbcTransfer) ById added in v1.15.22

func (c *IbcTransfer) ById(ctx context.Context, id uint64) (transfer storage.IbcTransferWithSigner, err error)

func (*IbcTransfer) LargestTransfer24h added in v1.15.21

func (c *IbcTransfer) LargestTransfer24h(ctx context.Context) (*storage.IbcTransfer, error)

func (*IbcTransfer) List added in v1.13.0

func (*IbcTransfer) Series added in v1.13.0

func (c *IbcTransfer) Series(ctx context.Context, channelId string, timeframe storage.Timeframe, column string, req storage.SeriesRequest) (items []storage.HistogramItem, err error)

type Jail added in v1.6.0

type Jail struct {
	*postgres.Table[*storage.Jail]
}

Jail -

func (*Jail) ByValidator added in v1.6.0

func (j *Jail) ByValidator(ctx context.Context, id uint64, limit, offset int) (jails []storage.Jail, err error)

type Message

type Message struct {
	*postgres.Table[*storage.Message]
}

Message -

func (*Message) ByAddress added in v1.2.0

func (m *Message) ByAddress(ctx context.Context, addressId uint64, filters storage.AddressMsgsFilter) (msgs []storage.AddressMessageWithTx, err error)

func (*Message) ByTxId

func (m *Message) ByTxId(ctx context.Context, txId uint64, limit, offset int) (messages []storage.Message, err error)

ByTxId -

func (*Message) ListWithTx added in v1.0.4

func (m *Message) ListWithTx(ctx context.Context, filters storage.MessageListWithTxFilters) (msgs []storage.MessageWithTx, err error)

type Namespace

type Namespace struct {
	*postgres.Table[*storage.Namespace]
}

Namespace -

func (*Namespace) ByNamespaceId

func (n *Namespace) ByNamespaceId(ctx context.Context, namespaceId []byte) (namespace []storage.Namespace, err error)

ByNamespaceId -

func (*Namespace) ByNamespaceIdAndVersion

func (n *Namespace) ByNamespaceIdAndVersion(ctx context.Context, namespaceId []byte, version byte) (namespace storage.Namespace, err error)

ByNamespaceIdAndVersion -

func (*Namespace) GetByIds added in v1.2.0

func (n *Namespace) GetByIds(ctx context.Context, ids ...uint64) (ns []storage.Namespace, err error)

func (*Namespace) LastNamespaceMessage added in v1.20.0

func (n *Namespace) LastNamespaceMessage(ctx context.Context, nsId uint64) (msg storage.NamespaceMessage, err error)

func (*Namespace) ListWithSort added in v1.1.2

func (n *Namespace) ListWithSort(ctx context.Context, sortField string, sort sdk.SortOrder, limit, offset int) (ns []storage.Namespace, err error)

func (*Namespace) Messages

func (n *Namespace) Messages(ctx context.Context, id uint64, limit, offset int) (msgs []storage.NamespaceMessage, err error)

Messages -

type Notificator

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

func NewNotificator

func NewNotificator(pool *pgxpool.Pool) *Notificator

func (*Notificator) Close

func (n *Notificator) Close() error

func (*Notificator) Listen

func (n *Notificator) Listen() <-chan pgconn.Notification

func (*Notificator) Notify

func (n *Notificator) Notify(ctx context.Context, channel string, payload string) error

func (*Notificator) Subscribe

func (n *Notificator) Subscribe(ctx context.Context, channels ...string) error

type Proposal added in v1.12.0

type Proposal struct {
	*postgres.Table[*storage.Proposal]
}

Proposal -

func (*Proposal) Active added in v1.20.0

func (p *Proposal) Active(ctx context.Context) (proposals []storage.Proposal, err error)

func (*Proposal) ById added in v1.14.0

func (p *Proposal) ById(ctx context.Context, id uint64) (proposal storage.Proposal, err error)

func (*Proposal) ListWithFilters added in v1.12.0

func (p *Proposal) ListWithFilters(ctx context.Context, filters storage.ListProposalFilters) (proposals []storage.Proposal, err error)

type Redelegation added in v1.6.0

type Redelegation struct {
	*postgres.Table[*storage.Redelegation]
}

Redelegation -

func (*Redelegation) ByAddress added in v1.6.0

func (d *Redelegation) ByAddress(ctx context.Context, addressId uint64, limit, offset int) (redelegations []storage.Redelegation, err error)

type Rollup added in v1.2.0

type Rollup struct {
	*postgres.Table[*storage.Rollup]
}

Rollup -

func (*Rollup) AllSeries added in v1.9.10

func (r *Rollup) AllSeries(ctx context.Context, timeframe storage.Timeframe) (items []storage.RollupHistogramItem, err error)

func (*Rollup) ById added in v1.9.9

func (r *Rollup) ById(ctx context.Context, rollupId uint64) (rollup storage.RollupWithStats, err error)

func (*Rollup) BySlug added in v1.4.0

func (r *Rollup) BySlug(ctx context.Context, slug string) (rollup storage.RollupWithStats, err error)

func (*Rollup) Count added in v1.3.2

func (r *Rollup) Count(ctx context.Context) (int64, error)

func (*Rollup) Distribution added in v1.6.1

func (r *Rollup) Distribution(ctx context.Context, rollupId uint64, series string, groupBy storage.Timeframe) (items []storage.DistributionItem, err error)

func (*Rollup) Leaderboard added in v1.2.0

func (r *Rollup) Leaderboard(ctx context.Context, fltrs storage.LeaderboardFilters) (rollups []storage.RollupWithStats, err error)

func (*Rollup) LeaderboardDay added in v1.9.10

func (r *Rollup) LeaderboardDay(ctx context.Context, fltrs storage.LeaderboardFilters) (rollups []storage.RollupWithDayStats, err error)

func (*Rollup) Namespaces added in v1.2.0

func (r *Rollup) Namespaces(ctx context.Context, rollupId uint64, limit, offset int) (namespaceIds []uint64, err error)

func (*Rollup) Providers added in v1.2.0

func (r *Rollup) Providers(ctx context.Context, rollupId uint64) (providers []storage.RollupProvider, err error)

func (*Rollup) RollupStatsGrouping added in v1.10.8

func (r *Rollup) RollupStatsGrouping(ctx context.Context, fltrs storage.RollupGroupStatsFilters) (results []storage.RollupGroupedStats, err error)

func (*Rollup) RollupsByNamespace added in v1.5.0

func (r *Rollup) RollupsByNamespace(ctx context.Context, namespaceId uint64, limit, offset int) (rollups []storage.Rollup, err error)

func (*Rollup) Series added in v1.3.2

func (r *Rollup) Series(ctx context.Context, rollupId uint64, timeframe storage.Timeframe, column string, req storage.SeriesRequest) (items []storage.HistogramItem, err error)

func (*Rollup) Stats added in v1.2.0

func (r *Rollup) Stats(ctx context.Context, rollupId uint64) (stats storage.RollupStats, err error)

func (*Rollup) Tags added in v1.10.17

func (r *Rollup) Tags(ctx context.Context) (arr []string, err error)

func (*Rollup) Unverified added in v1.10.17

func (r *Rollup) Unverified(ctx context.Context) (rollups []storage.Rollup, err error)

type RollupProvider added in v1.17.1

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

func (*RollupProvider) ByRollupId added in v1.17.1

func (r *RollupProvider) ByRollupId(ctx context.Context, rollupId uint64) (providers []storage.RollupProvider, err error)
type Search struct {
	// contains filtered or unexported fields
}

Search -

func (*Search) Search added in v1.4.0

func (s *Search) Search(ctx context.Context, query []byte) (results []storage.SearchResult, err error)

func (*Search) SearchText added in v1.4.0

func (s *Search) SearchText(ctx context.Context, text string) (results []storage.SearchResult, err error)

type SentryHook added in v1.7.0

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

func NewSentryHook added in v1.7.0

func NewSentryHook(dbName string, tracer trace.Tracer, formatQueries bool) *SentryHook

func (*SentryHook) AfterQuery added in v1.7.0

func (h *SentryHook) AfterQuery(ctx context.Context, event *bun.QueryEvent)

func (*SentryHook) BeforeQuery added in v1.7.0

func (h *SentryHook) BeforeQuery(ctx context.Context, event *bun.QueryEvent) context.Context

func (*SentryHook) Init added in v1.7.0

func (h *SentryHook) Init(db *bun.DB)

type SignalVersion added in v1.15.28

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

SignalVersion -

func (*SignalVersion) Latest added in v1.20.0

func (t *SignalVersion) Latest(ctx context.Context) (signals []storage.SignalVersion, err error)

Latest returns the signals x/signal tallies; the indexer weighs them with the power it saw before the block.

func (*SignalVersion) List added in v1.15.28

func (t *SignalVersion) List(ctx context.Context, filters storage.ListSignalsFilter) (signals []storage.SignalVersion, err error)

type StakingLog added in v1.7.0

type StakingLog struct {
	*postgres.Table[*storage.StakingLog]
}

StakingLog -

type State

type State struct {
	*postgres.Table[*storage.State]
}

State -

func (*State) ByName

func (s *State) ByName(ctx context.Context, name string) (state storage.State, err error)

ByName -

type Stats

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

func NewStats

func NewStats(db bun.IDB) Stats

func (Stats) Change24hBlockStats added in v1.9.7

func (s Stats) Change24hBlockStats(ctx context.Context) (response storage.Change24hBlockStats, err error)

func (Stats) Count

func (s Stats) Count(ctx context.Context, req storage.CountRequest) (string, error)

func (Stats) CumulativeSeries added in v1.9.1

func (s Stats) CumulativeSeries(ctx context.Context, timeframe storage.Timeframe, name string, req storage.SeriesRequest) (response []storage.SeriesItem, err error)

func (Stats) MessagesCount24h added in v1.9.7

func (s Stats) MessagesCount24h(ctx context.Context) (response []storage.CountItem, err error)

func (Stats) NamespaceSeries added in v1.1.0

func (s Stats) NamespaceSeries(ctx context.Context, timeframe storage.Timeframe, name string, nsId uint64, req storage.SeriesRequest) (response []storage.SeriesItem, err error)

func (Stats) RollupStats24h added in v1.9.7

func (s Stats) RollupStats24h(ctx context.Context) (response []storage.RollupStats24h, err error)

func (Stats) Series added in v1.1.0

func (s Stats) Series(ctx context.Context, timeframe storage.Timeframe, name string, req storage.SeriesRequest) (response []storage.SeriesItem, err error)

func (Stats) SizeGroups added in v1.11.3

func (s Stats) SizeGroups(ctx context.Context, timeFilter *time.Time) (groups []storage.SizeGroup, err error)

func (Stats) SquareSize added in v1.9.6

func (s Stats) SquareSize(ctx context.Context, from, to *time.Time) (result map[int][]storage.SeriesItem, err error)

func (Stats) StakingDistribution added in v1.17.0

func (s Stats) StakingDistribution(ctx context.Context, req storage.SeriesRequest) (response []storage.StakingDistributionItem, err error)

func (Stats) StakingSeries added in v1.6.0

func (s Stats) StakingSeries(ctx context.Context, timeframe storage.Timeframe, name string, validatorId uint64, req storage.SeriesRequest) (response []storage.SeriesItem, err error)

func (Stats) Summary

func (s Stats) Summary(ctx context.Context, req storage.SummaryRequest) (string, error)

func (Stats) TPS added in v1.1.0

func (s Stats) TPS(ctx context.Context) (response storage.TPS, err error)

type Storage

type Storage struct {
	*postgres.Storage

	Blocks               models.IBlock
	BlockStats           models.IBlockStats
	BlockSignatures      models.IBlockSignature
	BlobLogs             models.IBlobLog
	Constants            models.IConstant
	DenomMetadata        models.IDenomMetadata
	Tx                   models.ITx
	Message              models.IMessage
	Event                models.IEvent
	Address              models.IAddress
	VestingAccounts      models.IVestingAccount
	VestingPeriods       models.IVestingPeriod
	Namespace            models.INamespace
	State                models.IState
	Stats                models.IStats
	Search               models.ISearch
	Validator            models.IValidator
	ValidatorBondUpdates models.IValidatorBondUpdate
	StakingLogs          models.IStakingLog
	Delegation           models.IDelegation
	Redelegation         models.IRedelegation
	Undelegation         models.IUndelegation
	Jails                models.IJail
	Rollup               models.IRollup
	RollupProvider       models.IRollupProvider
	Grants               models.IGrant
	ApiKeys              models.IApiKey
	Proposals            models.IProposal
	Votes                models.IVote
	IbcClients           models.IIbcClient
	IbcConnections       models.IIbcConnection
	IbcChannels          models.IIbcChannel
	IbcTransfers         models.IIbcTransfer
	HLMailbox            models.IHLMailbox
	HLTransfer           models.IHLTransfer
	HLToken              models.IHLToken
	HLIGP                models.IHLIGP
	HLIGPConfig          models.IHLIGPConfig
	HLGasPayment         models.IHLGasPayment
	SignalVersion        models.ISignalVersion
	Upgrade              models.IUpgrade
	Forwardings          models.IForwarding
	ZkISM                models.IZkISM
	Celestials           celestials.ICelestial
	CelestialState       celestials.ICelestialState
	Notificator          *Notificator
	// contains filtered or unexported fields
}

Storage -

func Create

func Create(ctx context.Context, cfg config.Database, scriptsDir string, withMigrations bool) (Storage, error)

Create -

func (Storage) Close added in v1.5.0

func (s Storage) Close() error

func (Storage) CreateListener

func (s Storage) CreateListener() models.Listener

type Transaction

type Transaction struct {
	storage.Transaction
}

func (Transaction) CancelUnbondings added in v1.6.0

func (tx Transaction) CancelUnbondings(ctx context.Context, cancellations ...*models.Undelegation) error

func (Transaction) DeleteBalances

func (tx Transaction) DeleteBalances(ctx context.Context, ids []uint64) error

func (Transaction) DeleteDelegationsByValidator added in v1.6.0

func (tx Transaction) DeleteDelegationsByValidator(ctx context.Context, ids ...uint64) error

func (Transaction) DeleteProviders added in v1.2.0

func (tx Transaction) DeleteProviders(ctx context.Context, rollupId uint64) error

func (Transaction) DeleteRollup added in v1.2.0

func (tx Transaction) DeleteRollup(ctx context.Context, rollupId uint64) error

func (Transaction) FixSignalsPower added in v1.20.0

func (tx Transaction) FixSignalsPower(ctx context.Context, powers map[uint64]storageTypes.Numeric) error

FixSignalsPower closes the open round: counted signals keep the power they contributed, the rest get 0. Updates go row by row: a round has at most one signal per validator.

func (Transaction) Insert added in v1.20.0

func (tx Transaction) Insert(ctx context.Context, data any) error

func (Transaction) Jail added in v1.6.0

func (tx Transaction) Jail(ctx context.Context, validators ...*models.Validator) error

func (Transaction) Proposal added in v1.12.0

func (tx Transaction) Proposal(ctx context.Context, id uint64) (proposal models.Proposal, err error)

func (Transaction) RecoverIbcClient added in v1.20.0

func (tx Transaction) RecoverIbcClient(ctx context.Context, subjectId, substituteId string, updatedAt time.Time) error

RecoverIbcClient mirrors ibc-go RecoverClient: the subject is unfrozen and takes the substitute's latest height, chain id and trusting period. Without a known substitute it is only unfrozen.

func (Transaction) RetentionBlockSignatures added in v1.4.0

func (tx Transaction) RetentionBlockSignatures(ctx context.Context, height types.Level) error

func (Transaction) RetentionCompletedRedelegations added in v1.6.0

func (tx Transaction) RetentionCompletedRedelegations(ctx context.Context, blockTime time.Time) error

func (Transaction) RetentionCompletedUnbondings added in v1.6.0

func (tx Transaction) RetentionCompletedUnbondings(ctx context.Context, blockTime time.Time) error

func (Transaction) RollbackAddresses

func (tx Transaction) RollbackAddresses(ctx context.Context, height types.Level) (address []models.Address, err error)

func (Transaction) RollbackBlockStats

func (tx Transaction) RollbackBlockStats(ctx context.Context, height types.Level) (stats models.BlockStats, err error)

func (Transaction) RollbackBondUpdates added in v1.20.0

func (tx Transaction) RollbackBondUpdates(ctx context.Context, height types.Level) (updates []models.ValidatorBondUpdate, err error)

func (Transaction) RollbackByHeight added in v1.20.0

func (tx Transaction) RollbackByHeight(ctx context.Context, height types.Level, models ...storage.Model) error

func (Transaction) RollbackEvents

func (tx Transaction) RollbackEvents(ctx context.Context, height types.Level) (events []models.Event, err error)

func (Transaction) RollbackGrants added in v1.7.0

func (tx Transaction) RollbackGrants(ctx context.Context, height types.Level) (err error)

func (Transaction) RollbackIbcChannels added in v1.13.0

func (tx Transaction) RollbackIbcChannels(ctx context.Context, height types.Level) (int64, error)

func (Transaction) RollbackIbcClients added in v1.13.0

func (tx Transaction) RollbackIbcClients(ctx context.Context, height types.Level) (int64, error)

func (Transaction) RollbackIbcConnections added in v1.13.0

func (tx Transaction) RollbackIbcConnections(ctx context.Context, height types.Level) (int64, error)

func (Transaction) RollbackJails added in v1.6.0

func (tx Transaction) RollbackJails(ctx context.Context, height types.Level) (jails []models.Jail, err error)

func (Transaction) RollbackMessageAddresses

func (tx Transaction) RollbackMessageAddresses(ctx context.Context, msgIds []uint64) (err error)

func (Transaction) RollbackMessages

func (tx Transaction) RollbackMessages(ctx context.Context, height types.Level) (msgs []models.Message, err error)

func (Transaction) RollbackNamespaceMessages

func (tx Transaction) RollbackNamespaceMessages(ctx context.Context, height types.Level) (msgs []models.NamespaceMessage, err error)

func (Transaction) RollbackNamespaces

func (tx Transaction) RollbackNamespaces(ctx context.Context, height types.Level) (ns []models.Namespace, err error)

func (Transaction) RollbackSigners

func (tx Transaction) RollbackSigners(ctx context.Context, txIds []uint64) (err error)

func (Transaction) RollbackStakingLogs added in v1.6.0

func (tx Transaction) RollbackStakingLogs(ctx context.Context, height types.Level) (logs []models.StakingLog, err error)

func (Transaction) RollbackTxs

func (tx Transaction) RollbackTxs(ctx context.Context, height types.Level) (txs []models.Tx, err error)

func (Transaction) RollbackUpgrades added in v1.16.0

func (tx Transaction) RollbackUpgrades(ctx context.Context, height pkgTypes.Level) error

RollbackUpgrades reverts what a block wrote over existing upgrades and signals. It must run before the block's signals and upgrades are deleted by height.

func (Transaction) RollbackValidators

func (tx Transaction) RollbackValidators(ctx context.Context, height types.Level) (validators []models.Validator, err error)

func (Transaction) SaveAddresses

func (tx Transaction) SaveAddresses(ctx context.Context, addresses ...*models.Address) (int64, error)

func (Transaction) SaveBalances

func (tx Transaction) SaveBalances(ctx context.Context, balances ...models.Balance) error

func (Transaction) SaveBlobLogs added in v1.2.0

func (tx Transaction) SaveBlobLogs(ctx context.Context, logs ...*models.BlobLog) error

func (Transaction) SaveConstants

func (tx Transaction) SaveConstants(ctx context.Context, constants ...models.Constant) error

func (Transaction) SaveDelegations added in v1.6.0

func (tx Transaction) SaveDelegations(ctx context.Context, delegations ...models.Delegation) error

func (Transaction) SaveEvents

func (tx Transaction) SaveEvents(ctx context.Context, events ...models.Event) error

func (Transaction) SaveGrants added in v1.7.0

func (tx Transaction) SaveGrants(ctx context.Context, grants ...*models.Grant) error

func (Transaction) SaveHyperlaneIgpConfigs added in v1.17.0

func (tx Transaction) SaveHyperlaneIgpConfigs(ctx context.Context, configs ...models.HLIGPConfig) error

func (Transaction) SaveHyperlaneIgps added in v1.17.0

func (tx Transaction) SaveHyperlaneIgps(ctx context.Context, igps ...*models.HLIGP) error

func (Transaction) SaveHyperlaneMailbox added in v1.15.0

func (tx Transaction) SaveHyperlaneMailbox(ctx context.Context, mailbox ...*models.HLMailbox) error

func (Transaction) SaveHyperlaneTokens added in v1.15.0

func (tx Transaction) SaveHyperlaneTokens(ctx context.Context, tokens ...*models.HLToken) error

func (Transaction) SaveHyperlaneTransfers added in v1.15.0

func (tx Transaction) SaveHyperlaneTransfers(ctx context.Context, transfers ...*models.HLTransfer) error

func (Transaction) SaveIbcChannels added in v1.13.0

func (tx Transaction) SaveIbcChannels(ctx context.Context, channels ...*models.IbcChannel) error

func (Transaction) SaveIbcClients added in v1.13.0

func (tx Transaction) SaveIbcClients(ctx context.Context, clients ...*models.IbcClient) (int64, error)

func (Transaction) SaveIbcConnections added in v1.13.0

func (tx Transaction) SaveIbcConnections(ctx context.Context, conns ...*models.IbcConnection) error

func (Transaction) SaveMessages

func (tx Transaction) SaveMessages(ctx context.Context, msgs ...*models.Message) error

func (Transaction) SaveMsgAddresses

func (tx Transaction) SaveMsgAddresses(ctx context.Context, addresses ...*models.MsgAddress) error

func (Transaction) SaveNamespaces

func (tx Transaction) SaveNamespaces(ctx context.Context, namespaces ...*models.Namespace) (int64, error)

func (Transaction) SaveProposals added in v1.12.0

func (tx Transaction) SaveProposals(ctx context.Context, proposals ...*models.Proposal) (int64, error)

func (Transaction) SaveStakingLogs added in v1.6.0

func (tx Transaction) SaveStakingLogs(ctx context.Context, logs ...models.StakingLog) error

func (Transaction) SaveTransactions

func (tx Transaction) SaveTransactions(ctx context.Context, txs ...models.Tx) error

func (Transaction) SaveUpgrades added in v1.15.28

func (tx Transaction) SaveUpgrades(ctx context.Context, upgrades ...*models.Upgrade) error

func (Transaction) SaveValidators

func (tx Transaction) SaveValidators(ctx context.Context, validators ...*models.Validator) (int, error)

func (Transaction) SaveVestingAccounts added in v1.7.0

func (tx Transaction) SaveVestingAccounts(ctx context.Context, accs ...*models.VestingAccount) error

func (Transaction) SaveVotes added in v1.12.0

func (tx Transaction) SaveVotes(ctx context.Context, votes ...*models.Vote) (map[uint64]*models.VotesCount, error)

SaveVotes expects each (proposal, voter) pair to carry the rows of a single vote: as in x/gov, a new vote replaces all previous rows of the voter.

func (Transaction) SaveZkISMs added in v1.18.13

func (tx Transaction) SaveZkISMs(ctx context.Context, items ...*models.ZkISM) error

func (Transaction) SkipUnfinishedUpgrades added in v1.20.0

func (tx Transaction) SkipUnfinishedUpgrades(ctx context.Context, version uint64) error

func (Transaction) UpdateRollup added in v1.2.0

func (tx Transaction) UpdateRollup(ctx context.Context, rollup *models.Rollup) error

func (Transaction) UpdateSlashedDelegations added in v1.6.0

func (tx Transaction) UpdateSlashedDelegations(ctx context.Context, validatorId uint64, burned storageTypes.Numeric) (balances []models.Balance, err error)

func (Transaction) UpdateUpgradeTally added in v1.20.0

func (tx Transaction) UpdateUpgradeTally(ctx context.Context, version uint64, votingPower, votedPower storageTypes.Numeric, status storageTypes.UpgradeStatus) error

UpdateUpgradeTally writes a recounted tally; unlike SaveUpgrades it stores zero power and lowers the status back.

func (Transaction) UpdateValidators added in v1.6.0

func (tx Transaction) UpdateValidators(ctx context.Context, validators ...*models.Validator) error

type Tx

type Tx struct {
	*postgres.Table[*storage.Tx]
}

Tx -

func (*Tx) ByAddress

func (tx *Tx) ByAddress(ctx context.Context, addressId uint64, fltrs storage.TxFilter) (txs []storage.Tx, err error)

func (*Tx) ByHash

func (tx *Tx) ByHash(ctx context.Context, hash []byte) (transaction storage.Tx, err error)

func (*Tx) ByIdWithRelations

func (tx *Tx) ByIdWithRelations(ctx context.Context, id uint64) (transaction storage.Tx, err error)

func (*Tx) Filter

func (tx *Tx) Filter(ctx context.Context, fltrs storage.TxFilter) (txs []storage.Tx, err error)

func (*Tx) Gas added in v1.1.0

func (tx *Tx) Gas(ctx context.Context, height types.Level, ts time.Time) (response []storage.Gas, err error)

func (*Tx) Genesis

func (tx *Tx) Genesis(ctx context.Context, limit, offset int, sortOrder sdk.SortOrder) (txs []storage.Tx, err error)

func (*Tx) IdAndTimeByHash added in v1.10.6

func (tx *Tx) IdAndTimeByHash(ctx context.Context, hash []byte) (id uint64, t time.Time, err error)

type Undelegation added in v1.6.0

type Undelegation struct {
	*postgres.Table[*storage.Undelegation]
}

Undelegation -

func (*Undelegation) ByAddress added in v1.6.0

func (d *Undelegation) ByAddress(ctx context.Context, addressId uint64, limit, offset int) (undelegations []storage.Undelegation, err error)

type Upgrade added in v1.15.28

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

Upgrade -

func (*Upgrade) ByVersion added in v1.17.2

func (t *Upgrade) ByVersion(ctx context.Context, version uint64) (upgrade storage.Upgrade, err error)

func (*Upgrade) List added in v1.15.28

func (t *Upgrade) List(ctx context.Context, filters storage.ListUpgradesFilter) (upgrades []storage.Upgrade, err error)

func (*Upgrade) PendingVersions added in v1.20.0

func (t *Upgrade) PendingVersions(ctx context.Context, currentVersion uint64) (versions []uint64, err error)

PendingVersions returns versions whose tally can still change: above the current version, not applied and not locked by MsgTryUpgrade.

type Validator

type Validator struct {
	*postgres.Table[*storage.Validator]
}

Validator -

func (*Validator) BondedValidators added in v1.20.0

func (v *Validator) BondedValidators(ctx context.Context) (validators []storage.Validator, err error)

func (*Validator) ByAddress

func (v *Validator) ByAddress(ctx context.Context, address string) (validator storage.Validator, err error)

func (*Validator) ByConsAddress added in v1.20.0

func (v *Validator) ByConsAddress(ctx context.Context, address string) (validator storage.Validator, err error)

func (*Validator) CountByStatus added in v1.20.0

func (v *Validator) CountByStatus(ctx context.Context) (response storage.CountByStatus, err error)

func (*Validator) FibreHosts added in v1.20.1

func (v *Validator) FibreHosts(ctx context.Context) (hosts []string, err error)

func (*Validator) ListByPower added in v1.6.0

func (v *Validator) ListByPower(ctx context.Context, fltrs storage.ValidatorFilters) (validators []storage.Validator, err error)

func (*Validator) Messages added in v1.16.0

func (*Validator) Metrics added in v1.17.1

func (v *Validator) Metrics(ctx context.Context, id uint64) (metrics storage.ValidatorMetrics, err error)

func (*Validator) TopNMetrics added in v1.17.1

func (v *Validator) TopNMetrics(ctx context.Context, n int) (metrics storage.ValidatorMetrics, err error)

func (*Validator) TotalVotingPower added in v1.6.0

func (v *Validator) TotalVotingPower(ctx context.Context) (storageTypes.Numeric, error)

type ValidatorBondUpdate added in v1.20.0

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

ValidatorBondUpdate -

func (*ValidatorBondUpdate) LastBondUpdate added in v1.20.0

func (bu *ValidatorBondUpdate) LastBondUpdate(ctx context.Context, validatorId uint64) (update storage.ValidatorBondUpdate, err error)

LastBondUpdate -

func (*ValidatorBondUpdate) ListByValidator added in v1.20.0

func (bu *ValidatorBondUpdate) ListByValidator(
	ctx context.Context, validatorId uint64, filters storage.FilterBondUpdatesListByValidator,
) (updates []storage.ValidatorBondUpdate, err error)

ListByValidator -

type VestingAccount added in v1.7.0

type VestingAccount struct {
	*postgres.Table[*storage.VestingAccount]
}

VestingAccount -

func (*VestingAccount) ByAddress added in v1.7.0

func (v *VestingAccount) ByAddress(ctx context.Context, addressId uint64, limit, offset int, showEnded bool) (accs []storage.VestingAccount, err error)

type VestingPeriod added in v1.7.0

type VestingPeriod struct {
	*postgres.Table[*storage.VestingPeriod]
}

VestingPeriod -

func (*VestingPeriod) ByVesting added in v1.7.0

func (v *VestingPeriod) ByVesting(ctx context.Context, id uint64, limit, offset int) (periods []storage.VestingPeriod, err error)

type Vote added in v1.12.0

type Vote struct {
	*postgres.Table[*storage.Vote]
}

Vote -

func (*Vote) ByProposalId added in v1.12.0

func (v *Vote) ByProposalId(ctx context.Context, proposalId uint64, fltrs storage.VoteFilters) (votes []storage.Vote, err error)

ByProposalId -

func (*Vote) ByValidatorId added in v1.12.0

func (v *Vote) ByValidatorId(ctx context.Context, validatorId uint64, fltrs storage.VoteFilters) (votes []storage.Vote, err error)

ByValidatorId -

func (*Vote) ByVoterId added in v1.12.0

func (v *Vote) ByVoterId(ctx context.Context, voterId uint64, fltrs storage.VoteFilters) (votes []storage.Vote, err error)

ByVoterId -

func (*Vote) ListByProposal added in v1.20.0

func (v *Vote) ListByProposal(ctx context.Context, proposalId uint64, limit, offset int) (votes []storage.Vote, err error)

type ZkISM added in v1.18.13

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

func (*ZkISM) ByExternalId added in v1.20.0

func (z *ZkISM) ByExternalId(ctx context.Context, externalId []byte) (item storage.ZkISM, err error)

func (*ZkISM) ById added in v1.18.13

func (z *ZkISM) ById(ctx context.Context, id uint64) (item storage.ZkISM, err error)

func (*ZkISM) List added in v1.18.13

func (z *ZkISM) List(ctx context.Context, filter storage.ZkISMFilter) (items []storage.ZkISM, err error)

func (*ZkISM) Messages added in v1.18.13

func (z *ZkISM) Messages(ctx context.Context, id uint64, filter storage.ZkISMUpdatesFilter) (items []storage.ZkISMMessage, err error)

func (*ZkISM) Updates added in v1.18.13

func (z *ZkISM) Updates(ctx context.Context, id uint64, filter storage.ZkISMUpdatesFilter) (items []storage.ZkISMUpdate, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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