Documentation ¶
Index ¶
- func NewTransactionHandlerWithGasAndFee(txHandler data.TransactionHandler, gasUsed uint64, fee *big.Int) data.TransactionHandlerWithGasUsedAndFee
- func WrapTxsMap(txs map[string]data.TransactionHandler) map[string]data.TransactionHandlerWithGasUsedAndFee
- type AccountTokenData
- type AdditionalAccountData
- type AdditionalAccountTokenData
- type AlteredAccount
- type ArgsSaveBlockData
- type FeeInfo
- type HeaderGasConsumption
- type Pool
- type RoundInfo
- type TokenMetaData
- type TransactionHandlerWithGasAndFee
- func (t *TransactionHandlerWithGasAndFee) GetExecutionOrder() int
- func (t *TransactionHandlerWithGasAndFee) GetFee() *big.Int
- func (t *TransactionHandlerWithGasAndFee) GetGasUsed() uint64
- func (t *TransactionHandlerWithGasAndFee) GetInitialPaidFee() *big.Int
- func (t *TransactionHandlerWithGasAndFee) GetTxHandler() data.TransactionHandler
- func (t *TransactionHandlerWithGasAndFee) SetExecutionOrder(order int)
- func (t *TransactionHandlerWithGasAndFee) SetFee(fee *big.Int)
- func (t *TransactionHandlerWithGasAndFee) SetGasUsed(gasUsed uint64)
- func (t *TransactionHandlerWithGasAndFee) SetInitialPaidFee(fee *big.Int)
- type ValidatorRatingInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransactionHandlerWithGasAndFee ¶
func NewTransactionHandlerWithGasAndFee(txHandler data.TransactionHandler, gasUsed uint64, fee *big.Int) data.TransactionHandlerWithGasUsedAndFee
NewTransactionHandlerWithGasAndFee returns a new instance of transactionHandlerWithGasAndFee which matches the interface
func WrapTxsMap ¶
func WrapTxsMap(txs map[string]data.TransactionHandler) map[string]data.TransactionHandlerWithGasUsedAndFee
WrapTxsMap will wrap the provided transactions map in a map fo transactions with fee and gas used
Types ¶
type AccountTokenData ¶
type AccountTokenData struct { Nonce uint64 `json:"nonce"` Identifier string `json:"identifier"` Balance string `json:"balance"` Properties string `json:"properties"` MetaData *TokenMetaData `json:"metadata,omitempty"` AdditionalData *AdditionalAccountTokenData `json:"additionalData,omitempty"` }
AccountTokenData holds the data needed for indexing a token of an altered account
type AdditionalAccountData ¶
type AdditionalAccountData struct { IsSender bool `json:"isSender,omitempty"` BalanceChanged bool `json:"balanceChanged,omitempty"` CurrentOwner string `json:"currentOwner,omitempty"` UserName string `json:"userName,omitempty"` DeveloperRewards string `json:"developerRewards,omitempty"` }
AdditionalAccountData holds the additional data for an altered account
type AdditionalAccountTokenData ¶
type AdditionalAccountTokenData struct {
IsNFTCreate bool `json:"isNFTCreate,omitempty"`
}
AdditionalAccountTokenData holds the additional data for indexing a token of an altered account
type AlteredAccount ¶
type AlteredAccount struct { Nonce uint64 `json:"nonce"` Address string `json:"address"` Balance string `json:"balance,omitempty"` Tokens []*AccountTokenData `json:"tokens"` AdditionalData *AdditionalAccountData `json:"additionalData,omitempty"` }
AlteredAccount holds the data needed of an altered account in a block
type ArgsSaveBlockData ¶
type ArgsSaveBlockData struct { HeaderHash []byte Body data.BodyHandler Header data.HeaderHandler SignersIndexes []uint64 NotarizedHeadersHashes []string HeaderGasConsumption HeaderGasConsumption TransactionsPool *Pool AlteredAccounts map[string]*AlteredAccount NumberOfShards uint32 IsImportDB bool }
ArgsSaveBlockData will contain all information that are needed to save block data
type HeaderGasConsumption ¶
type HeaderGasConsumption struct { GasProvided uint64 GasRefunded uint64 GasPenalized uint64 MaxGasPerBlock uint64 }
HeaderGasConsumption holds the data needed to save the gas consumption of a header
type Pool ¶
type Pool struct { Txs map[string]data.TransactionHandlerWithGasUsedAndFee Scrs map[string]data.TransactionHandlerWithGasUsedAndFee Rewards map[string]data.TransactionHandlerWithGasUsedAndFee Invalid map[string]data.TransactionHandlerWithGasUsedAndFee Receipts map[string]data.TransactionHandlerWithGasUsedAndFee Logs []*data.LogData ScheduledExecutedSCRSHashesPrevBlock []string ScheduledExecutedInvalidTxsHashesPrevBlock []string }
Pool will hold all types of transaction
type RoundInfo ¶
type RoundInfo struct { Index uint64 SignersIndexes []uint64 BlockWasProposed bool ShardId uint32 Epoch uint32 Timestamp time.Duration }
RoundInfo is a structure containing block signers and shard id
type TokenMetaData ¶
type TokenMetaData struct { Nonce uint64 `json:"nonce"` Name string `json:"name"` Creator string `json:"creator"` Royalties uint32 `json:"royalties"` Hash []byte `json:"hash"` URIs [][]byte `json:"uris"` Attributes []byte `json:"attributes"` }
TokenMetaData is the api metaData struct for tokens
type TransactionHandlerWithGasAndFee ¶
type TransactionHandlerWithGasAndFee struct { data.TransactionHandler FeeInfo ExecutionOrder int }
TransactionHandlerWithGasAndFee holds a data.TransactionHandler and information about fee and gas used
func (*TransactionHandlerWithGasAndFee) GetExecutionOrder ¶
func (t *TransactionHandlerWithGasAndFee) GetExecutionOrder() int
GetExecutionOrder will return the execution order of the TransactionHandler
func (*TransactionHandlerWithGasAndFee) GetFee ¶
func (t *TransactionHandlerWithGasAndFee) GetFee() *big.Int
GetFee returns the fee of the transaction
func (*TransactionHandlerWithGasAndFee) GetGasUsed ¶
func (t *TransactionHandlerWithGasAndFee) GetGasUsed() uint64
GetGasUsed returns the used gas of the transaction
func (*TransactionHandlerWithGasAndFee) GetInitialPaidFee ¶
func (t *TransactionHandlerWithGasAndFee) GetInitialPaidFee() *big.Int
GetInitialPaidFee returns the initial paid fee of the transactions
func (*TransactionHandlerWithGasAndFee) GetTxHandler ¶
func (t *TransactionHandlerWithGasAndFee) GetTxHandler() data.TransactionHandler
GetTxHandler will return the TransactionHandler
func (*TransactionHandlerWithGasAndFee) SetExecutionOrder ¶
func (t *TransactionHandlerWithGasAndFee) SetExecutionOrder(order int)
SetExecutionOrder will set the execution order of the TransactionHandler
func (*TransactionHandlerWithGasAndFee) SetFee ¶
func (t *TransactionHandlerWithGasAndFee) SetFee(fee *big.Int)
SetFee sets the fee internally
func (*TransactionHandlerWithGasAndFee) SetGasUsed ¶
func (t *TransactionHandlerWithGasAndFee) SetGasUsed(gasUsed uint64)
SetGasUsed sets the used gas internally
func (*TransactionHandlerWithGasAndFee) SetInitialPaidFee ¶
func (t *TransactionHandlerWithGasAndFee) SetInitialPaidFee(fee *big.Int)
SetInitialPaidFee will set the initial paid fee
type ValidatorRatingInfo ¶
ValidatorRatingInfo is a structure containing validator rating information