Documentation ¶
Index ¶
- Constants
- type Account
- type BandDB
- func (b *BandDB) AddBlock(height int64, timestamp time.Time, proposer common.HexBytes, blockHash []byte) error
- func (b *BandDB) AddDataSource(id int64, name, description string, owner sdk.AccAddress, fee sdk.Coins, ...) error
- func (b *BandDB) AddDelegation(delegatorAddress sdk.AccAddress, operatorAddress sdk.ValAddress, Coin sdk.Coin) error
- func (b *BandDB) AddOracleScript(id int64, name, description string, owner sdk.AccAddress, code []byte, ...) error
- func (b *BandDB) AddRawDataRequests(requestID int64, externalID int64, dataSourceID int64, calldata []byte) error
- func (b *BandDB) AddRequest(id int64, oracleScriptID int64, calldata []byte, ...) error
- func (b *BandDB) AddRequestedValidator(requestID int64, validatorAddress string) error
- func (b *BandDB) AddTransaction(txHash []byte, timestamp time.Time, gasUsed int64, gasLimit uint64, ...) error
- func (b *BandDB) AddValidatorUpTime(rawConsensusAddress common.HexBytes, height int64, voted bool) error
- func (b *BandDB) BeginTransaction()
- func (b *BandDB) ClearOldVotes(currentHeight int64) error
- func (b *BandDB) Commit()
- func (b *BandDB) DecreaseAccountBalance(address sdk.AccAddress, balance sdk.Coins, blockHeight int64) error
- func (b *BandDB) GetInvolvedAccountsFromTransferEvents(logs sdk.ABCIMessageLogs) []sdk.AccAddress
- func (b *BandDB) GetInvolvedAccountsFromTx(tx auth.StdTx) []sdk.AccAddress
- func (b *BandDB) GetLastProcessedHeight() (int64, error)
- func (b *BandDB) GetMetadataValue(key string) (string, error)
- func (b *BandDB) GetMetadataValueInt64(key string) (int64, error)
- func (b *BandDB) GetUptimeLookBackDuration() (int64, error)
- func (b *BandDB) GetValidator(validator sdk.ValAddress) (Validator, bool)
- func (b *BandDB) HandleMessage(txHash []byte, msg sdk.Msg, events map[string]string) (map[string]interface{}, error)
- func (b *BandDB) HandleTransaction(tx auth.StdTx, txHash []byte, logs sdk.ABCIMessageLogs)
- func (b *BandDB) RollBack()
- func (b *BandDB) SaveChainID(chainID string) error
- func (b *BandDB) SetAccountBalance(address sdk.AccAddress, balance sdk.Coins, blockHeight int64) error
- func (b *BandDB) SetContext(ctx sdk.Context)
- func (b *BandDB) SetLastProcessedHeight(height int64) error
- func (b *BandDB) SetMetadataValue(key, value string) error
- func (b *BandDB) SetMetadataValueInt64(key string, value int64) error
- func (b *BandDB) SetUptimeLookBackDuration(duration int64) error
- func (b *BandDB) UpdateTransaction(txHash []byte, messages []map[string]interface{}) error
- func (b *BandDB) ValidateChainID(chainID string) error
- type Block
- type DataSource
- type DataSourceRevision
- type Metadata
- type OracleScript
- type OracleScriptCode
- type OracleScriptRevision
- type RawDataRequests
- type RelatedDataSources
- type Report
- type ReportDetail
- type Request
- type RequestedValidator
- type Transaction
- type Validator
- type ValidatorVote
Constants ¶
View Source
const ( KeyChainID = "chain_id" KeyLastProcessedHeight = "last_processed_height" KeyUptimeLookBackDuration = "uptime_look_back_duration" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BandDB ¶
func (*BandDB) AddDataSource ¶
func (*BandDB) AddDelegation ¶
func (b *BandDB) AddDelegation( delegatorAddress sdk.AccAddress, operatorAddress sdk.ValAddress, Coin sdk.Coin, ) error
func (*BandDB) AddOracleScript ¶
func (*BandDB) AddRawDataRequests ¶
func (*BandDB) AddRequest ¶
func (*BandDB) AddRequestedValidator ¶
func (*BandDB) AddTransaction ¶
func (*BandDB) AddValidatorUpTime ¶
func (*BandDB) BeginTransaction ¶
func (b *BandDB) BeginTransaction()
func (*BandDB) ClearOldVotes ¶
func (*BandDB) DecreaseAccountBalance ¶
func (*BandDB) GetInvolvedAccountsFromTransferEvents ¶
func (b *BandDB) GetInvolvedAccountsFromTransferEvents(logs sdk.ABCIMessageLogs) []sdk.AccAddress
func (*BandDB) GetInvolvedAccountsFromTx ¶
func (b *BandDB) GetInvolvedAccountsFromTx(tx auth.StdTx) []sdk.AccAddress
func (*BandDB) GetLastProcessedHeight ¶
func (*BandDB) GetMetadataValueInt64 ¶
func (*BandDB) GetUptimeLookBackDuration ¶
func (*BandDB) GetValidator ¶
func (b *BandDB) GetValidator(validator sdk.ValAddress) (Validator, bool)
func (*BandDB) HandleMessage ¶
func (*BandDB) HandleTransaction ¶
func (*BandDB) SaveChainID ¶
func (*BandDB) SetAccountBalance ¶
func (*BandDB) SetContext ¶
func (*BandDB) SetLastProcessedHeight ¶
func (*BandDB) SetMetadataValue ¶
func (*BandDB) SetMetadataValueInt64 ¶
func (*BandDB) SetUptimeLookBackDuration ¶
func (*BandDB) UpdateTransaction ¶
func (*BandDB) ValidateChainID ¶
type DataSource ¶
type DataSourceRevision ¶
type OracleScript ¶
type OracleScriptCode ¶
type OracleScriptCode struct { CodeHash []byte `gorm:"primary_key"` CodeText sql.NullString `sql:"default:null"` Schema sql.NullString `sql:"default:null"` }
type OracleScriptRevision ¶
type RawDataRequests ¶
type RelatedDataSources ¶
type ReportDetail ¶
type Request ¶
type Request struct { ID int64 `gorm:"primary_key;auto_increment:false"` OracleScriptID int64 `gorm:"not null"` Calldata []byte `gorm:"not null"` SufficientValidatorCount int64 `gorm:"not null"` ExpirationHeight int64 `gorm:"not null"` ResolveStatus string `gorm:"not null"` Requester string `gorm:"not null"` TxHash []byte `gorm:"not null"` Result []byte `sql:"default:null"` }
type RequestedValidator ¶
type Transaction ¶
type Transaction struct { TxHash []byte `gorm:"primary_key"` Timestamp int64 `gorm:"not null"` GasUsed int64 `gorm:"not null"` GasLimit uint64 `gorm:"not null"` GasFee string `gorm:"not null"` Sender string `gorm:"not null"` Success bool `gorm:"not null"` BlockHeight int64 `gorm:"not null"` Messages json.RawMessage `sql:"json;not null"` }
type Validator ¶
type Validator struct { OperatorAddress string `gorm:"primary_key"` ConsensusAddress string `gorm:"unique;not null"` ElectedCount uint `gorm:"not null"` VotedCount uint `gorm:"not null"` MissedCount uint `gorm:"not null"` Moniker string `gorm:"not null"` Identity string `gorm:"not null"` Website string `gorm:"not null"` Details string `gorm:"not null"` CommissionRate string `gorm:"not null"` CommissionMaxRate string `gorm:"not null"` CommissionMaxChange string `gorm:"not null"` MinSelfDelegation string `gorm:"not null"` SelfDelegation string `gorm:"not null"` }
type ValidatorVote ¶
Click to show internal directories.
Click to hide internal directories.