Documentation
¶
Index ¶
- func NewBaseCacheController(expirationChecker func(expirationAnchor, valueToCompare any) bool) *baseCacheController
- func NewStakingValidatorsCache(tmClient client.Client, stakingQueryClient stakingtypes.QueryClient, ...) *stakingValidatorsCache
- func NewTendermintValidatorsCache(tmClient client.Client) *tendermintValidatorsCache
- type Backend
- func (m *Backend) GetAccount(accountAddressStr string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetAccountBalances(accountAddressStr string, denom *string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetBankDenomsMetadata(coins sdk.Coins) map[string]banktypes.Metadata
- func (m *Backend) GetBlockByNumber(height int64) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetChainInfo() (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetClientContext() client.Context
- func (m *Backend) GetConfig() config.BeJsonRpcConfig
- func (m *Backend) GetContext() context.Context
- func (m *Backend) GetDenomMetadata(base string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetDenomsMetadata(pageNo int) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetExternalServices() berpctypes.ExternalServices
- func (m *Backend) GetGovProposal(proposalId uint64) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetGovProposals(pageNo int) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetLatestBlockNumber() (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetLogger() log.Logger
- func (m *Backend) GetModuleParams(moduleName string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetQueryClient() *berpctypes.QueryClient
- func (m *Backend) GetRecentBlocks(pageNo, pageSize int) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetStakingInfo(delegatorAddr string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetTotalSupply(pageNo int) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetTransactionByHash(hashStr string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetTransactionsInBlockRange(fromHeightIncluded, toHeightIncluded int64) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetValidatorAccount(consOrValAddr string) (berpctypes.GenericBackendResponse, error)
- func (m *Backend) GetValidators() (berpctypes.GenericBackendResponse, error)
- func (m *Backend) WithInterceptor(interceptor RequestInterceptor) *Backend
- type BackendI
- type RequestInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBaseCacheController ¶
func NewStakingValidatorsCache ¶ added in v1.1.4
func NewStakingValidatorsCache(tmClient client.Client, stakingQueryClient stakingtypes.QueryClient, codec codec.Codec) *stakingValidatorsCache
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements the BackendI interface
func NewBackend ¶
func NewBackend( ctx *server.Context, logger log.Logger, clientCtx client.Context, messageParsers map[string]berpctypes.MessageParser, messageInvolversExtractors map[string]berpctypes.MessageInvolversExtractor, externalServices berpctypes.ExternalServices, ) *Backend
NewBackend creates a new Backend instance for RollApp Block Explorer
func (*Backend) GetAccount ¶
func (m *Backend) GetAccount(accountAddressStr string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetAccountBalances ¶
func (m *Backend) GetAccountBalances(accountAddressStr string, denom *string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetBankDenomsMetadata ¶ added in v1.2.4
func (*Backend) GetBlockByNumber ¶
func (m *Backend) GetBlockByNumber(height int64) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetChainInfo ¶
func (m *Backend) GetChainInfo() (berpctypes.GenericBackendResponse, error)
func (*Backend) GetClientContext ¶
func (*Backend) GetConfig ¶
func (m *Backend) GetConfig() config.BeJsonRpcConfig
func (*Backend) GetContext ¶
func (*Backend) GetDenomMetadata ¶
func (m *Backend) GetDenomMetadata(base string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetDenomsMetadata ¶
func (m *Backend) GetDenomsMetadata(pageNo int) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetExternalServices ¶
func (m *Backend) GetExternalServices() berpctypes.ExternalServices
func (*Backend) GetGovProposal ¶
func (m *Backend) GetGovProposal(proposalId uint64) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetGovProposals ¶
func (m *Backend) GetGovProposals(pageNo int) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetLatestBlockNumber ¶ added in v1.0.3
func (m *Backend) GetLatestBlockNumber() (berpctypes.GenericBackendResponse, error)
func (*Backend) GetModuleParams ¶
func (m *Backend) GetModuleParams(moduleName string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetQueryClient ¶
func (m *Backend) GetQueryClient() *berpctypes.QueryClient
func (*Backend) GetRecentBlocks ¶ added in v1.2.0
func (m *Backend) GetRecentBlocks(pageNo, pageSize int) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetStakingInfo ¶
func (m *Backend) GetStakingInfo(delegatorAddr string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetTotalSupply ¶
func (m *Backend) GetTotalSupply(pageNo int) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetTransactionByHash ¶
func (m *Backend) GetTransactionByHash(hashStr string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetTransactionsInBlockRange ¶
func (m *Backend) GetTransactionsInBlockRange(fromHeightIncluded, toHeightIncluded int64) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetValidatorAccount ¶
func (m *Backend) GetValidatorAccount(consOrValAddr string) (berpctypes.GenericBackendResponse, error)
func (*Backend) GetValidators ¶
func (m *Backend) GetValidators() (berpctypes.GenericBackendResponse, error)
func (*Backend) WithInterceptor ¶
func (m *Backend) WithInterceptor(interceptor RequestInterceptor) *Backend
type BackendI ¶
type BackendI interface { // GetChainInfo returns the chain information. GetChainInfo() (berpctypes.GenericBackendResponse, error) // GetModuleParams returns the module parameters by module name. GetModuleParams(moduleName string) (berpctypes.GenericBackendResponse, error) GetAccountBalances(accountAddressStr string, denom *string) (berpctypes.GenericBackendResponse, error) GetAccount(accountAddressStr string) (berpctypes.GenericBackendResponse, error) GetValidatorAccount(consOrValAddr string) (berpctypes.GenericBackendResponse, error) // GetLatestBlockNumber returns the latest block number, along with the epoch UTC seconds. GetLatestBlockNumber() (berpctypes.GenericBackendResponse, error) // GetRecentBlocks returns the recent blocks, paginated. GetRecentBlocks(pageNo, pageSize int) (berpctypes.GenericBackendResponse, error) // GetBlockByNumber returns a block by its height. GetBlockByNumber(height int64) (berpctypes.GenericBackendResponse, error) // GetTransactionsInBlockRange returns the list transaction info within a block range. // The range is inclusive, specified clearly. GetTransactionsInBlockRange(fromHeightIncluded, toHeightIncluded int64) (berpctypes.GenericBackendResponse, error) // GetTransactionByHash returns a transaction by its hash. GetTransactionByHash(hash string) (berpctypes.GenericBackendResponse, error) // GetStakingInfo returns the staking information, includes: // - Delegator's staking information // - Validator's commission & outstanding rewards GetStakingInfo(delegatorAddr string) (berpctypes.GenericBackendResponse, error) GetValidators() (berpctypes.GenericBackendResponse, error) GetGovProposal(proposalId uint64) (berpctypes.GenericBackendResponse, error) GetGovProposals(pageNo int) (berpctypes.GenericBackendResponse, error) GetDenomMetadata(base string) (berpctypes.GenericBackendResponse, error) GetDenomsMetadata(pageNo int) (berpctypes.GenericBackendResponse, error) GetTotalSupply(pageNo int) (berpctypes.GenericBackendResponse, error) GetBankDenomsMetadata(coins sdk.Coins) map[string]banktypes.Metadata GetContext() context.Context GetClientContext() client.Context GetQueryClient() *berpctypes.QueryClient GetLogger() log.Logger GetConfig() config.BeJsonRpcConfig GetExternalServices() berpctypes.ExternalServices }
type RequestInterceptor ¶
type RequestInterceptor interface { GetTransactionByHash(hashStr string) (intercepted bool, response berpctypes.GenericBackendResponse, err error) GetDenomsInformation() (intercepted, append bool, denoms map[string]string, err error) GetModuleParams(moduleName string) (intercepted bool, params berpctypes.GenericBackendResponse, err error) GetAccount(accountAddressStr string) (intercepted, append bool, response berpctypes.GenericBackendResponse, err error) }
RequestInterceptor is the interface for the request interceptor. It is used to intercept the request and return the response.
- If the intercepted is true, the response from this interceptor must be respected.
- If the intercepted is false, the response from this interceptor must be ignored and processed as usual.
Click to show internal directories.
Click to hide internal directories.