Documentation ¶
Index ¶
- Variables
- func BindFlagsLoadViper(cmd *cobra.Command, _ []string) error
- func ConvertValidatorAddressToBech32String(address types.Address) string
- func ConvertValidatorPubKeyToBech32String(pubKey tmcrypto.PubKey) (string, error)
- func DefaultConfigSetup(cfg Config, sdkConfig *sdk.Config)
- func GetConfigFilePath() string
- func Write(cfg Config, path string) error
- type Account
- type AccountContract
- type Action
- type Block
- type BlockTime
- type CobraCmdFunc
- type Collection
- type CommitSig
- type Config
- type ConfigParser
- type CosmosConfig
- type CurrentTable
- type DatabaseConfig
- type EncodingConfigBuilder
- type Event
- type Genesis
- type GrpcConfig
- type HeightQueue
- type LoggingConfig
- type NFT
- type NodeTotalCommitment
- type NodeTotalCommitmentWithoutDelegators
- type NodeUnstakingTokens
- type ParsingConfig
- type ProposedTable
- type PruningConfig
- type RPCConfig
- type SCResult
- type SdkConfigSetup
- type SmartContractResult
- type StakeRequirements
- type StakingTable
- type TelemetryConfig
- type Token
- type TokenBalance
- type TotalStake
- type TotalStakeByType
- type TransactionResult
- type Tx
- type Txs
- type Validator
- type WeeklyPayout
Constants ¶
This section is empty.
Variables ¶
var (
HomePath = ""
)
Functions ¶
func BindFlagsLoadViper ¶
BindFlagsLoadViper binds all flags and read the config into viper
func ConvertValidatorAddressToBech32String ¶
ConvertValidatorAddressToBech32String converts the given validator address to its Bech32 string representation
func ConvertValidatorPubKeyToBech32String ¶
ConvertValidatorPubKeyToBech32String converts the given pubKey to a Bech32 string
func DefaultConfigSetup ¶
DefaultConfigSetup represents a handy implementation of SdkConfigSetup that simply setups the prefix inside the configuration
func GetConfigFilePath ¶
func GetConfigFilePath() string
GetConfigFilePath returns the path to the configuration file given the executable name
Types ¶
type Account ¶
type Account struct { Address string `json:"address"` Balance string `json:"balance"` Nonce int `json:"nonce"` Shard int `json:"shard"` ScamInfo struct { } `json:"scamInfo"` Code string `json:"code"` CodeHash string `json:"codeHash"` RootHash string `json:"rootHash"` TxCount int `json:"txCount"` ScrCount int `json:"scrCount"` Username string `json:"username"` DeveloperReward string `json:"developerReward"` OwnerAddress string `json:"ownerAddress"` DeployedAt int `json:"deployedAt"` IsUpgradeable bool `json:"isUpgradeable"` IsReadable bool `json:"isReadable"` IsPayable bool `json:"isPayable"` IsPayableBySmartContract bool `json:"isPayableBySmartContract"` }
type AccountContract ¶
type Block ¶
type Block struct { Hash string Epoch int64 Nonce int64 PrevHash string Proposer int64 PubKeyBitmap string Round int64 Shard int64 Size int64 SizeTxs int64 StateRootHash string TimeStamp int64 TxCount int64 GasConsumed int64 GasRefunded int64 GasPenalized int64 MaxGasLimit int64 MiniBlocksHashes []string Validators []int64 NotarizedBlocksHashes []string }
Block contains the data of a single chain block
func NewBlock ¶
func NewBlock( hash string, epoch int64, nonce int64, prevHash string, proposer int64, pubKeyBitmap string, round int64, shard int64, size int64, sizeTxs int64, stateRootHash string, timeStamp int64, txCount int64, gasConsumed int64, gasRefunded int64, gasPenalized int64, maxGasLimit int64) Block
Block allows to build a new Block
type BlockTime ¶
func NewBlockTime ¶
BlockTime allows to build a new BlockTime
type CobraCmdFunc ¶
CobraCmdFunc represents a cobra command function
func ConcatCobraCmdFuncs ¶
func ConcatCobraCmdFuncs(fs ...CobraCmdFunc) CobraCmdFunc
ConcatCobraCmdFuncs returns a single function that calls each argument function in sequence RunE, PreRunE, PersistentPreRunE, etc. all have this same signature
type Collection ¶
func NewCollection ¶
func NewCollection( height uint64, id string, processed bool, transactionIds []flow.Identifier) Collection
Collection allows to build a new Collection
func (Collection) Equal ¶
func (v Collection) Equal(w Collection) bool
Equal tells whether v and w represent the same rows
type CommitSig ¶
type CommitSig struct { Height int64 ValidatorAddress string VotingPower int64 ProposerPriority int64 Timestamp time.Time }
CommitSig contains the data of a single validator commit signature
type Config ¶
type Config interface { GetRPCConfig() RPCConfig GetGrpcConfig() GrpcConfig GetCosmosConfig() CosmosConfig GetDatabaseConfig() DatabaseConfig GetLoggingConfig() LoggingConfig GetParsingConfig() ParsingConfig GetPruningConfig() PruningConfig GetTelemetryConfig() TelemetryConfig }
Config represents the configuration to run egldjuno
var ( // Cfg represents the configuration to be used during the execution Cfg Config )
func DefaultConfigParser ¶
DefaultConfigParser attempts to read and parse a egldjuno config from the given string bytes. An error reading or parsing the config results in a panic.
func NewConfig ¶
func NewConfig( rpcConfig RPCConfig, grpConfig GrpcConfig, cosmosConfig CosmosConfig, dbConfig DatabaseConfig, loggingConfig LoggingConfig, parsingConfig ParsingConfig, pruningConfig PruningConfig, telemetryConfig TelemetryConfig, ) Config
NewConfig builds a new Config instance
type ConfigParser ¶
ConfigParser represents a function that allows to parse a file contents as a Config object
type CosmosConfig ¶
CosmosConfig contains the data to configure the CosmosConfig SDK
func NewCosmosConfig ¶
func NewCosmosConfig(prefix string, modules []string, genesisHeight uint64) CosmosConfig
NewCosmosConfig returns a new CosmosConfig instance
type CurrentTable ¶
func NewCurrentTable ¶
func NewCurrentTable( height int64, table []string) CurrentTable
CurrentTable allows to build a new CurrentTable
type DatabaseConfig ¶
type DatabaseConfig interface { GetName() string GetHost() string GetPort() int64 GetUser() string GetPassword() string GetSSLMode() string GetSchema() string GetMaxOpenConnections() int GetMaxIdleConnections() int }
DatabaseConfig represents a generic database configuration
type EncodingConfigBuilder ¶
type EncodingConfigBuilder func() params.EncodingConfig
EncodingConfigBuilder represents a function that is used to return the proper encoding config.
type Event ¶
type Genesis ¶
Genesis contains the useful information about the genesis
func NewGenesis ¶
NewGenesis allows to build a new Genesis instance
type GrpcConfig ¶
GrpcConfig contains the configuration of the gRPC endpoint
func NewGrpcConfig ¶
func NewGrpcConfig(address string, insecure bool) GrpcConfig
NewGrpcConfig allows to build a new GrpcConfig instance
type HeightQueue ¶
type HeightQueue chan int64
HeightQueue is a simple type alias for a (buffered) channel of block heights.
func NewQueue ¶
func NewQueue(size int) HeightQueue
type LoggingConfig ¶
LoggingConfig represents the configuration for the logging part
func NewLoggingConfig ¶
func NewLoggingConfig(level, format string) LoggingConfig
NewLoggingConfig returns a new LoggingConfig instance
type NFT ¶
type NFT struct { Identifier string `json:"identifier"` Collection string `json:"collection"` Attributes string `json:"attributes"` Nonce int `json:"nonce"` Type string `json:"type"` Name string `json:"name"` Creator string `json:"creator"` Royalties int `json:"royalties"` Uris []string `json:"uris"` URL string `json:"url"` Media []struct { URL string `json:"url"` OriginalURL string `json:"originalUrl"` ThumbnailURL string `json:"thumbnailUrl"` FileType string `json:"fileType"` FileSize int `json:"fileSize"` } `json:"media"` IsWhitelistedStorage bool `json:"isWhitelistedStorage"` Metadata struct { } `json:"metadata"` ScamInfo struct { Type string `json:"type"` Info string `json:"info"` } `json:"scamInfo"` Balance string `json:"balance"` Ticker string `json:"ticker"` }
type NodeTotalCommitment ¶
func NewNodeTotalCommitment ¶
func NewNodeTotalCommitment( nodeId string, totalCommitment uint64, height int64) NodeTotalCommitment
NodeTotalCommitment allows to build a new NodeTotalCommitment
func (NodeTotalCommitment) Equal ¶
func (v NodeTotalCommitment) Equal(w NodeTotalCommitment) bool
Equal tells whether v and w represent the same rows
type NodeTotalCommitmentWithoutDelegators ¶
type NodeTotalCommitmentWithoutDelegators struct { NodeId string TotalCommitmentWithoutDelegators uint64 Height int64 }
func NewNodeTotalCommitmentWithoutDelegators ¶
func NewNodeTotalCommitmentWithoutDelegators( nodeId string, totalCommitmentWithoutDelegators uint64, height int64) NodeTotalCommitmentWithoutDelegators
NodeTotalCommitmentWithoutDelegators allows to build a new NodeTotalCommitmentWithoutDelegators
func (NodeTotalCommitmentWithoutDelegators) Equal ¶
func (v NodeTotalCommitmentWithoutDelegators) Equal(w NodeTotalCommitmentWithoutDelegators) bool
Equal tells whether v and w represent the same rows
type NodeUnstakingTokens ¶
func NewNodeUnstakingTokens ¶
func NewNodeUnstakingTokens( nodeId string, tokenUnstaking uint64, height int64) NodeUnstakingTokens
NodeUnstakingTokens allows to build a new NodeUnstakingTokens
func (NodeUnstakingTokens) Equal ¶
func (v NodeUnstakingTokens) Equal(w NodeUnstakingTokens) bool
Equal tells whether v and w represent the same rows
type ParsingConfig ¶
type ParsingConfig interface { GetWorkers() int64 ShouldParseNewBlocks() bool ShouldParseOldBlocks() bool ShouldParseGenesis() bool GetGenesisFilePath() string GetStartHeight() int64 UseFastSync() bool }
ParsingConfig represents the configuration of the parsing
func NewParsingConfig ¶
type ProposedTable ¶
func NewProposedTable ¶
func NewProposedTable( height int64, proposedTable []string) ProposedTable
ProposedTable allows to build a new ProposedTable
type PruningConfig ¶
PruningConfig contains the configuration of the pruning strategy
func NewPruningConfig ¶
func NewPruningConfig(keepRecent, keepEvery, interval int64) PruningConfig
NewPruningConfig returns a new PruningConfig
type RPCConfig ¶
RPCConfig contains the configuration of the RPC endpoint
func NewRPCConfig ¶
NewRPCConfig allows to build a new RPCConfig instance
type SCResult ¶
type SCResult struct { Hash string `json:"hash"` Timestamp int `json:"timestamp"` Nonce int `json:"nonce"` GasLimit int `json:"gasLimit"` GasPrice int `json:"gasPrice"` Value string `json:"value"` Sender string `json:"sender"` Receiver string `json:"receiver"` RelayedValue string `json:"relayedValue"` Data string `json:"data"` PrevTxHash string `json:"prevTxHash"` OriginalTxHash string `json:"originalTxHash"` CallType string `json:"callType"` Logs struct { Address string `json:"address"` Events []string `json:"events"` } `json:"logs"` ReturnMessage struct { } `json:"returnMessage"` }
type SdkConfigSetup ¶
SdkConfigSetup represents a method that allows to customize the given sdk.Config. This should be used to set custom Bech32 addresses prefixes and other app-related configurations.
type SmartContractResult ¶
type SmartContractResult struct { Hash string `json:"hash"` Timestamp int `json:"timestamp"` Nonce int `json:"nonce"` GasLimit int `json:"gasLimit"` GasPrice int `json:"gasPrice"` Value string `json:"value"` Sender string `json:"sender"` Receiver string `json:"receiver"` Data string `json:"data"` PrevTxHash string `json:"prevTxHash"` OriginalTxHash string `json:"originalTxHash"` CallType string `json:"callType"` RelayedValue *string `json:"relayedValue"` Logs []byte `json:"logs"` ReturnMessage []byte `json:"returnMessage"` }
func NewSmartContractResult ¶
func NewSmartContractResult( txHash string, hash string, timestamp int, nonce int, gasLimit int, gasPrice int, value string, sender string, receiver string, relayedValue string, data string, prevTxHash string, originalTxHash string, callType string, logs []byte, returnMessage []byte) SmartContractResult
SmartContractResult allows to build a new SmartContractResult
func (SmartContractResult) Equal ¶
func (v SmartContractResult) Equal(w SmartContractResult) bool
Equal tells whether v and w represent the same rows
type StakeRequirements ¶
func NewStakeRequirements ¶
func NewStakeRequirements( height int64, role uint8, requirement uint64) StakeRequirements
StakeRequirements allows to build a new StakeRequirements
func (StakeRequirements) Equal ¶
func (v StakeRequirements) Equal(w StakeRequirements) bool
Equal tells whether v and w represent the same rows
type StakingTable ¶
func NewStakingTable ¶
func NewStakingTable( height int64, stakingTable []string) StakingTable
StakingTable allows to build a new StakingTable
type TelemetryConfig ¶
PruningConfig contains the configuration of the pruning strategy
func NewTelemetryConfig ¶
func NewTelemetryConfig(enabled bool, port int64) TelemetryConfig
type Token ¶
type Token struct { Identifier string `json:"identifier"` Name string `json:"name"` Ticker string `json:"ticker"` Owner string `json:"owner"` Minted string `json:"minted"` Burnt string `json:"burnt"` Decimals int `json:"decimals"` IsPaused bool `json:"isPaused"` CanUpgrade bool `json:"canUpgrade"` CanMint bool `json:"canMint"` CanBurn bool `json:"canBurn"` CanChangeOwner bool `json:"canChangeOwner"` CanPause bool `json:"canPause"` CanFreeze bool `json:"canFreeze"` CanWipe bool `json:"canWipe"` Balance string `json:"balance"` }
type TokenBalance ¶
func NewTokenBalance ¶
func NewTokenBalance( address string, identifier string, balance string) TokenBalance
TokenBalance allows to build a new TokenBalance
func (TokenBalance) Equal ¶
func (v TokenBalance) Equal(w TokenBalance) bool
Equal tells whether v and w represent the same rows
type TotalStake ¶
func NewTotalStake ¶
func NewTotalStake( height int64, totalStake uint64) TotalStake
TotalStake allows to build a new TotalStake
func (TotalStake) Equal ¶
func (v TotalStake) Equal(w TotalStake) bool
Equal tells whether v and w represent the same rows
type TotalStakeByType ¶
func NewTotalStakeByType ¶
func NewTotalStakeByType( height int64, role int8, totalStake uint64) TotalStakeByType
TotalStake allows to build a new TotalStake
func (TotalStakeByType) Equal ¶
func (v TotalStakeByType) Equal(w TotalStakeByType) bool
Equal tells whether v and w represent the same rows
type TransactionResult ¶
func NewTransactionResult ¶
func NewTransactionResult( transactionId string, status string, error string) TransactionResult
TransactionResult allows to build a new TransactionResult
func (TransactionResult) Equal ¶
func (v TransactionResult) Equal(w TransactionResult) bool
Equal tells whether v and w represent the same rows
type Tx ¶
type Tx struct { TxHash string GasLimit int64 GasPrice int64 GasUsed int64 MiniBlockHash string Nonce int64 Receiver string ReceiverShard int64 Round int64 Sender string SenderShard int64 Signature string Status string Value string Fee string Timestamp int64 Data string SmartContractResult []SmartContractResult `json:"results"` }
func NewTx ¶
func NewTx( txHash string, gasLimit int64, gasPrice int64, gasUsed int64, miniBlockHash string, nonce int64, receiver string, receiverShard int64, round int64, sender string, senderShard int64, signature string, status string, value string, fee string, timestamp int64, data string) Tx
Transaction allows to build a new Transaction
func (Tx) Successful ¶
Successful tells whether this tx is successful or not
type Validator ¶
Validator contains the data of a single validator
func NewValidator ¶
NewValidator allows to build a new Validator instance
type WeeklyPayout ¶
func NewWeeklyPayout ¶
func NewWeeklyPayout( height int64, payout uint64) WeeklyPayout
WeeklyPayout allows to build a new WeeklyPayout
func (WeeklyPayout) Equal ¶
func (v WeeklyPayout) Equal(w WeeklyPayout) bool
Equal tells whether v and w represent the same rows