Documentation ¶
Index ¶
- func Builder(cfg juno.Config, codec *params.EncodingConfig) (db.Database, error)
- type Db
- func (db *Db) GetBlockHeightTimeDayAgo(now time.Time) (dbtypes.BlockRow, error)
- func (db *Db) GetBlockHeightTimeHourAgo(now time.Time) (dbtypes.BlockRow, error)
- func (db *Db) GetBlockHeightTimeMinuteAgo(now time.Time) (dbtypes.BlockRow, error)
- func (db *Db) GetGenesis() (*types.Genesis, error)
- func (db *Db) GetLastBlock() (*dbtypes.BlockRow, error)
- func (db *Db) GetLastBlockHeight() (int64, error)
- func (db *Db) IsStoreHistoricDataEnabled() bool
- func (db *Db) SaveAccount(account []types.Account) error
- func (db *Db) SaveAccountContract(accountContract []types.AccountContract, address string) error
- func (db *Db) SaveAccountNft(accountNft []types.NFT, address string) error
- func (db *Db) SaveAverageBlockTimeGenesis(blocktime types.BlockTime) error
- func (db *Db) SaveAverageBlockTimePerDay(blocktime types.BlockTime) error
- func (db *Db) SaveAverageBlockTimePerHour(blocktime types.BlockTime) error
- func (db *Db) SaveAverageBlockTimePerMin(blocktime types.BlockTime) error
- func (db *Db) SaveCurrentTable(currentTable types.CurrentTable) error
- func (db *Db) SaveGenesis(genesis *types.Genesis) error
- func (db *Db) SaveNodeTotalCommitment(nodeTotalCommitment []types.NodeTotalCommitment) error
- func (db *Db) SaveNodeTotalCommitmentWithoutDelegators(...) error
- func (db *Db) SaveNodeUnstakingTokens(nodeUnstakingTokens []types.NodeUnstakingTokens) error
- func (db *Db) SaveProposedTable(proposedTable types.ProposedTable) error
- func (db *Db) SaveSmartContractResult(smartContractResult []types.SmartContractResult, txHash string) error
- func (db *Db) SaveStakeRequirements(stakeRequirements []types.StakeRequirements) error
- func (db *Db) SaveStakingTable(stakingTable types.StakingTable) error
- func (db *Db) SaveSupply(supply uint64, height uint64) error
- func (db *Db) SaveToken(token []types.Token) error
- func (db *Db) SaveTokenBalance(tokenBalance []types.Token, address string) error
- func (db *Db) SaveTotalStake(totalStake types.TotalStake) error
- func (db *Db) SaveTotalStakeByType(totalStake []types.TotalStakeByType) error
- func (db *Db) SaveTxs(transaction types.Txs) error
- func (db *Db) SaveWeeklyPayout(weeklyPayout types.WeeklyPayout) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Db ¶
Db represents a PostgreSQL database with expanded features. so that it can properly store custom BigDipper-related data.
func (*Db) GetBlockHeightTimeDayAgo ¶
GetBlockHeightTimeDayAgo return block height and time that a block proposals about a day (24hour) ago from input date
func (*Db) GetBlockHeightTimeHourAgo ¶
GetBlockHeightTimeHourAgo return block height and time that a block proposals about a hour ago from input date
func (*Db) GetBlockHeightTimeMinuteAgo ¶
GetBlockHeightTimeMinuteAgo return block height and time that a block proposals about a minute ago from input date
func (*Db) GetGenesis ¶
GetGenesis returns the genesis information stored inside the database
func (*Db) GetLastBlock ¶
GetLastBlock returns the last block stored inside the database based on the heights
func (*Db) GetLastBlockHeight ¶
GetLastBlockHeight returns the last block height stored inside the database
func (*Db) IsStoreHistoricDataEnabled ¶
IsStoreHistoricDataEnabled tells whether or not the historical data should be stored inside the database
func (*Db) SaveAccountContract ¶
func (db *Db) SaveAccountContract(accountContract []types.AccountContract, address string) error
func (*Db) SaveAccountNft ¶
func (*Db) SaveAverageBlockTimeGenesis ¶
SaveAverageBlockTimeGenesis save the average block time in average_block_time_from_genesis table
func (*Db) SaveAverageBlockTimePerDay ¶
SaveAverageBlockTimePerDay save the average block time in average_block_time_per_day table
func (*Db) SaveAverageBlockTimePerHour ¶
SaveAverageBlockTimePerHour save the average block time in average_block_time_per_hour table
func (*Db) SaveAverageBlockTimePerMin ¶
SaveAverageBlockTimePerMin save the average block time in average_block_time_per_minute table
func (*Db) SaveCurrentTable ¶
func (db *Db) SaveCurrentTable(currentTable types.CurrentTable) error
func (*Db) SaveGenesis ¶
SaveGenesis save the given genesis data
func (*Db) SaveNodeTotalCommitment ¶
func (db *Db) SaveNodeTotalCommitment(nodeTotalCommitment []types.NodeTotalCommitment) error
func (*Db) SaveNodeTotalCommitmentWithoutDelegators ¶
func (db *Db) SaveNodeTotalCommitmentWithoutDelegators(nodeTotalCommitmentWithoutDelegators []types.NodeTotalCommitmentWithoutDelegators) error
func (*Db) SaveNodeUnstakingTokens ¶
func (db *Db) SaveNodeUnstakingTokens(nodeUnstakingTokens []types.NodeUnstakingTokens) error
func (*Db) SaveProposedTable ¶
func (db *Db) SaveProposedTable(proposedTable types.ProposedTable) error
func (*Db) SaveSmartContractResult ¶
func (db *Db) SaveSmartContractResult(smartContractResult []types.SmartContractResult, txHash string) error
func (*Db) SaveStakeRequirements ¶
func (db *Db) SaveStakeRequirements(stakeRequirements []types.StakeRequirements) error
SaveStakeRequirements save the stake requirement from cadence call
func (*Db) SaveStakingTable ¶
func (db *Db) SaveStakingTable(stakingTable types.StakingTable) error
func (*Db) SaveTokenBalance ¶
func (*Db) SaveTotalStake ¶
func (db *Db) SaveTotalStake(totalStake types.TotalStake) error
func (*Db) SaveTotalStakeByType ¶
func (db *Db) SaveTotalStakeByType(totalStake []types.TotalStakeByType) error
func (*Db) SaveWeeklyPayout ¶
func (db *Db) SaveWeeklyPayout(weeklyPayout types.WeeklyPayout) error