Documentation ¶
Index ¶
- Constants
- Variables
- func BuildKey(el enum.Element, baseKey []byte, extra ...[]byte) []byte
- func ContractAddressPrefix() []byte
- func GetTxTypeCodeForName(name string) int
- func Load()
- type BaseAssets
- type BaseAssetsData
- type Ledger
- func (l *Ledger) AddTx(req blockchainRequest.Entity) error
- func (l *Ledger) BalanceOf(address []byte) (balance *big.Int, err error)
- func (l *Ledger) DoQuery(req QueryRequest) (interface{}, error)
- func (l *Ledger) Execute(txList TransactionList, blk block.Entity) (result []byte, err error)
- func (l Ledger) GetTransactionsFromPool(blk block.Entity) (txList TransactionList, count uint32, txRoot []byte)
- func (l *Ledger) LoadGenesisAssets(owner []byte, assets BaseAssetsData) error
- func (l Ledger) PreExecute(txList TransactionList, blk block.Entity) (result []byte, err error)
- func (l *Ledger) SetChain(chain chainStructure.IChainInterface)
- type QueryRequest
- type StateData
- type Transaction
- type TransactionData
- type TransactionList
- type TransactionResult
Constants ¶
View Source
const ( CachedBlockGasKey = "blockGas" CachedContractReturnData = "contractReturnData" CachedContractCreationAddress = "contractCreationAddress" )
View Source
const ContractAddressLen = 24
Variables ¶
View Source
var Errors struct { Success enum.ErrorElement `code:"0"` DBError enum.ErrorElement InvalidTransactionType enum.ErrorElement InvalidTransferValue enum.ErrorElement InsufficientBalance enum.ErrorElement NegativeTransferValue enum.ErrorElement InvalidContractCreationAddress enum.ErrorElement ContractCreationFailed enum.ErrorElement ContractNotFound enum.ErrorElement ContractExecuteFailed enum.ErrorElement ContractExecuteRevert enum.ErrorElement InvalidQuery enum.ErrorElement InvalidParameter enum.ErrorElement }
View Source
var QueryParameterFields struct { Address enum.Element TxHash enum.Element Data enum.Element }
View Source
var QueryTypes struct { BaseAssets enum.Element Balance enum.Element Transaction enum.Element OffChainCall enum.Element }
Functions ¶
func ContractAddressPrefix ¶
func ContractAddressPrefix() []byte
func GetTxTypeCodeForName ¶
Types ¶
type BaseAssets ¶
type BaseAssets struct { BaseAssetsData IssuedSeal seal.Entity MetaSeal seal.Entity }
type BaseAssetsData ¶
type Ledger ¶
type Ledger struct { CryptoTools crypto.Tools Storage kvDatabase.IDriver // contains filtered or unexported fields }
func (*Ledger) DoQuery ¶
func (l *Ledger) DoQuery(req QueryRequest) (interface{}, error)
func (Ledger) GetTransactionsFromPool ¶
func (*Ledger) LoadGenesisAssets ¶
func (l *Ledger) LoadGenesisAssets(owner []byte, assets BaseAssetsData) error
func (Ledger) PreExecute ¶
func (*Ledger) SetChain ¶
func (l *Ledger) SetChain(chain chainStructure.IChainInterface)
type QueryRequest ¶
type Transaction ¶
type Transaction struct { TransactionData TransactionResult DataSeal seal.Entity }
type TransactionData ¶
type TransactionList ¶
type TransactionList struct {
Transactions []Transaction
}
Click to show internal directories.
Click to hide internal directories.