Documentation ¶
Index ¶
- Constants
- Variables
- func FromGethAddreses(gethAddresses []gethcmn.Address) [][20]byte
- func FromGethHashes(gethHashes []gethcmn.Hash) [][32]byte
- func GetAccountKey(addr common.Address) []byte
- func GetBytecodeKey(addr common.Address) []byte
- func GetCreationCounterKey(lsb uint8) []byte
- func GetStandbyTxKey(num uint64) []byte
- func GetValueKey(seq uint64, key string) []byte
- func ToGethHashes(rawHashes [][32]byte) []gethcmn.Hash
- func ToGethLog(log Log) *gethtypes.Log
- func ToGethLogs(logs []Log) []*gethtypes.Log
- type AccountInfo
- func (info *AccountInfo) Balance() *uint256.Int
- func (info *AccountInfo) BalanceSlice() []byte
- func (info *AccountInfo) Bytes() []byte
- func (info *AccountInfo) Nonce() uint64
- func (info *AccountInfo) NonceSlice() []byte
- func (info *AccountInfo) Sequence() uint64
- func (info *AccountInfo) SequenceSlice() []byte
- func (info *AccountInfo) UpdateBalance(newBalance *uint256.Int)
- func (info *AccountInfo) UpdateNonce(newNonce uint64)
- func (info *AccountInfo) UpdateSequence(newSeq uint64)
- type AccountRWOp
- type BasicTx
- type Block
- func (z *Block) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Block) EncodeMsg(en *msgp.Writer) (err error)
- func (blk *Block) FillBasicInfo(bz []byte)
- func (z *Block) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Block) Msgsize() (s int)
- func (blk *Block) SerializeBasicInfo() []byte
- func (z *Block) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BlockHashOp
- type BlockInfo
- type BondStatus
- type BytecodeInfo
- type BytecodeRWOp
- func (z *BytecodeRWOp) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *BytecodeRWOp) EncodeMsg(en *msgp.Writer) (err error)
- func (z *BytecodeRWOp) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BytecodeRWOp) Msgsize() (s int)
- func (z *BytecodeRWOp) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ChainEvent
- type Context
- func (c *Context) BasicQueryLogs(address common.Address, topics []common.Hash, ...) (logs []Log, err error)
- func (c *Context) CheckNonce(sender common.Address, nonce uint64) (*AccountInfo, error)
- func (c *Context) Close(dirty bool)
- func (c *Context) CreateDynamicArray(seq uint64, arrSlot string, contents [][]byte)
- func (c *Context) DeleteDynamicArray(seq uint64, arrSlot string)
- func (c *Context) DeleteStorageAt(seq uint64, key string)
- func (c *Context) DeleteValueAtMapKey(seq uint64, mapSlot string, mapKey string)
- func (c *Context) GetAccount(address common.Address) *AccountInfo
- func (c *Context) GetAndDeleteValueAtMapKey(seq uint64, mapSlot string, mapKey string) []byte
- func (c *Context) GetBalance(owner common.Address) (*uint256.Int, error)
- func (c *Context) GetBlockByHash(hash common.Hash) (blk *Block, err error)
- func (c *Context) GetBlockByHeight(height uint64) (*Block, error)
- func (c *Context) GetBlockHashByHeight(height uint64) [32]byte
- func (c *Context) GetCode(contract common.Address) *BytecodeInfo
- func (c *Context) GetCurrBlockBasicInfo() *Block
- func (c *Context) GetDynamicArray(seq uint64, arrSlot string) (res [][]byte)
- func (c *Context) GetFromAddressCount(addr common.Address) int64
- func (c *Context) GetLatestHeight() int64
- func (c *Context) GetSep20FromAddressCount(contract common.Address, addr common.Address) int64
- func (c *Context) GetSep20ToAddressCount(contract common.Address, addr common.Address) int64
- func (c *Context) GetStorageAt(seq uint64, key string) []byte
- func (c *Context) GetToAddressCount(addr common.Address) int64
- func (c *Context) GetTxByBlkHtAndTxIndex(height uint64, index uint64) *Transaction
- func (c *Context) GetTxByHash(txHash common.Hash) (tx *Transaction, sig [65]byte, err error)
- func (c *Context) GetTxListByHeight(height uint32) (txs []*Transaction, sigs [][65]byte, err error)
- func (c *Context) GetTxListByHeightWithRange(height uint32, start, end int) (txs []*Transaction, sigs [][65]byte, err error)
- func (c *Context) GetValueAtMapKey(seq uint64, mapSlot string, mapKey string) []byte
- func (c *Context) IsShaGateFork() bool
- func (c *Context) IsStakingFork() bool
- func (c *Context) IsSymbolSbchFork() bool
- func (c *Context) IsXHedgeFork() bool
- func (c *Context) QueryLogs(addresses []common.Address, topics [][]common.Hash, ...) (logs []Log, err error)
- func (c *Context) QueryTxByAddr(addr common.Address, startHeight, endHeight, limit uint32) (txs []*Transaction, sigs [][65]byte, err error)
- func (c *Context) QueryTxByDst(addr common.Address, startHeight, endHeight, limit uint32) (txs []*Transaction, sigs [][65]byte, err error)
- func (c *Context) QueryTxBySrc(addr common.Address, startHeight, endHeight, limit uint32) (txs []*Transaction, sigs [][65]byte, err error)
- func (c *Context) SetAccount(address common.Address, acc *AccountInfo)
- func (c *Context) SetCurrBlockBasicInfo(blk *Block)
- func (c *Context) SetCurrentHeight(height int64)
- func (c *Context) SetShaGateForkBlock(shaGateForkBlock int64)
- func (c *Context) SetStakingForkBlock(stakingForkBlock int64)
- func (c *Context) SetStorageAt(seq uint64, key string, val []byte)
- func (c *Context) SetSymbolSbchBlock(symbolSbchForkBlock int64)
- func (c *Context) SetType(t uint8)
- func (c *Context) SetValueAtMapKey(seq uint64, mapSlot string, mapKey string, val []byte)
- func (c *Context) SetXHedgeForkBlock(xHedgeForkBlock int64)
- func (c *Context) StoreBlock(blk *modbtypes.Block, txid2sigMap map[[32]byte][65]byte)
- func (c *Context) WithDb(db modbtypes.DB) *Context
- func (c *Context) WithRbt(rabbitStore *rabbit.RabbitStore) *Context
- func (c *Context) WithRbtCopy() *Context
- type CreationCounterRWOp
- func (z *CreationCounterRWOp) DecodeMsg(dc *msgp.Reader) (err error)
- func (z CreationCounterRWOp) EncodeMsg(en *msgp.Writer) (err error)
- func (z CreationCounterRWOp) MarshalMsg(b []byte) (o []byte, err error)
- func (z CreationCounterRWOp) Msgsize() (s int)
- func (z *CreationCounterRWOp) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Description
- type EvmLog
- type FilterFunc
- type Header
- type InternalTxCall
- func (z *InternalTxCall) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *InternalTxCall) EncodeMsg(en *msgp.Writer) (err error)
- func (z *InternalTxCall) MarshalMsg(b []byte) (o []byte, err error)
- func (z *InternalTxCall) Msgsize() (s int)
- func (z *InternalTxCall) UnmarshalMsg(bts []byte) (o []byte, err error)
- type InternalTxReturn
- func (z *InternalTxReturn) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *InternalTxReturn) EncodeMsg(en *msgp.Writer) (err error)
- func (z *InternalTxReturn) MarshalMsg(b []byte) (o []byte, err error)
- func (z *InternalTxReturn) Msgsize() (s int)
- func (z *InternalTxReturn) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Log
- type ReadWriteLists
- func (z *ReadWriteLists) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ReadWriteLists) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ReadWriteLists) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ReadWriteLists) Msgsize() (s int)
- func (z *ReadWriteLists) UnmarshalMsg(bts []byte) (o []byte, err error)
- type StorageRWOp
- type SystemContractExecutor
- type Transaction
- type TxToRun
- type ValAddress
- type Validator
- type Validators
Constants ¶
const ( CheckTxType = 1 RpcType = 2 RunTxType = 3 HistoryOnlyType = 4 )
const ( // ReceiptStatusFailed is the status code of a transaction if execution failed. ReceiptStatusFailed = uint64(0) // ReceiptStatusSuccessful is the status code of a transaction if execution succeeded. ReceiptStatusSuccessful = uint64(1) )
const ( BondStatusUnbonded = "Unbonded" BondStatusBonded = "Bonded" )
const ACCOUNT_KEY byte = 23
const ACCOUNT_NOT_EXIST int = 1026
const BYTECODE_KEY byte = 25
const CREATION_COUNTER_KEY byte = 21
const CURR_BLOCK_KEY byte = 29
const FAILED_TO_COMMIT int = 1025
const IGNORE_TOO_OLD_TX int = 1024
const TOO_OLD_THRESHOLD uint64 = 10
const TX_NONCE_TOO_LARGE int = 1029
const TX_NONCE_TOO_SMALL int = 1027
const VALUE_KEY byte = 27
Variables ¶
var ( ErrAccountNotExist = errors.New("account does not exist") ErrNonceTooSmall = errors.New("tx nonce is smaller than the account nonce") ErrSameNonceAlredyInBlock = errors.New("tx with same nonce already in block") ErrNonceTooLarge = errors.New("tx nonce is larger than the account nonce") ErrTooManyEntries = errors.New("too many candidicate entries to be returned, please limit the difference between startHeight and endHeight") )
var ( ErrAccNotFound = errors.New("account not found") ErrCodeNotFound = errors.New("code not found") ErrBadAccData = errors.New("bad account data") ErrBadNonce = errors.New("bad nonce") ErrBadGasPrice = errors.New("bad gas price") ErrInsufficientBalance = errors.New("insufficient balance") ErrBlockNotFound = errors.New("block not found") ErrTxNotFound = errors.New("tx not found") ErrNoFromAddr = errors.New("missing from address") ErrInvalidHeight = errors.New("invalid height") )
var StandbyTxQueueKey [8]byte = [8]byte{255, 255, 255, 255, 255, 255, 255, 0}
Functions ¶
func FromGethAddreses ¶
func FromGethHashes ¶
func GetAccountKey ¶
func GetBytecodeKey ¶
func GetCreationCounterKey ¶
func GetStandbyTxKey ¶
func GetValueKey ¶
func ToGethHashes ¶
func ToGethLogs ¶
Types ¶
type AccountInfo ¶
type AccountInfo struct {
// contains filtered or unexported fields
}
func NewAccountInfo ¶
func NewAccountInfo(data []byte) *AccountInfo
func ZeroAccountInfo ¶
func ZeroAccountInfo() *AccountInfo
func (*AccountInfo) Balance ¶
func (info *AccountInfo) Balance() *uint256.Int
func (*AccountInfo) BalanceSlice ¶
func (info *AccountInfo) BalanceSlice() []byte
func (*AccountInfo) Bytes ¶
func (info *AccountInfo) Bytes() []byte
func (*AccountInfo) Nonce ¶
func (info *AccountInfo) Nonce() uint64
func (*AccountInfo) NonceSlice ¶
func (info *AccountInfo) NonceSlice() []byte
func (*AccountInfo) Sequence ¶
func (info *AccountInfo) Sequence() uint64
func (*AccountInfo) SequenceSlice ¶
func (info *AccountInfo) SequenceSlice() []byte
func (*AccountInfo) UpdateBalance ¶
func (info *AccountInfo) UpdateBalance(newBalance *uint256.Int)
func (*AccountInfo) UpdateNonce ¶
func (info *AccountInfo) UpdateNonce(newNonce uint64)
func (*AccountInfo) UpdateSequence ¶
func (info *AccountInfo) UpdateSequence(newSeq uint64)
type AccountRWOp ¶ added in v0.4.0
func (*AccountRWOp) DecodeMsg ¶ added in v0.4.0
func (z *AccountRWOp) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*AccountRWOp) EncodeMsg ¶ added in v0.4.0
func (z *AccountRWOp) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*AccountRWOp) MarshalMsg ¶ added in v0.4.0
func (z *AccountRWOp) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*AccountRWOp) Msgsize ¶ added in v0.4.0
func (z *AccountRWOp) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AccountRWOp) UnmarshalMsg ¶ added in v0.4.0
func (z *AccountRWOp) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Block ¶
type Block struct { Number int64 `msg:"num"` //the block number. Null when the returned block is the pending block. Hash [32]byte `msg:"hash"` //32 Bytes - hash of the block. Null when the returned block is the pending block. ParentHash [32]byte `msg:"parent"` //32 Bytes - hash of the parent block. LogsBloom [256]byte `msg:"bloom"` // 256 Bytes - the bloom filter for the logs of the block. Null when the returned block is the pending block. TransactionsRoot [32]byte `msg:"troot"` // 32 Bytes - the root of the transaction trie of the block. StateRoot [32]byte `msg:"sroot"` //32 Bytes - the root of the final state trie of the block. Miner [20]byte `msg:"miner"` //20 Bytes - the address of the beneficiary to whom the mining rewards were given. Size int64 `msg:"size"` //integer the size of this block in bytes. GasUsed uint64 `msg:"gasused"` //the total used gas by all transactions in this block. Timestamp int64 `msg:"time"` //the unix timestamp for when the block was collated. Transactions [][32]byte `msg:"txs"` //Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. }
BLOCK - A block object, or null when no block was found
func (*Block) FillBasicInfo ¶
func (*Block) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Block) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Block) SerializeBasicInfo ¶
type BlockHashOp ¶ added in v0.4.0
func (*BlockHashOp) DecodeMsg ¶ added in v0.4.0
func (z *BlockHashOp) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BlockHashOp) EncodeMsg ¶ added in v0.4.0
func (z *BlockHashOp) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BlockHashOp) MarshalMsg ¶ added in v0.4.0
func (z *BlockHashOp) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BlockHashOp) Msgsize ¶ added in v0.4.0
func (z *BlockHashOp) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*BlockHashOp) UnmarshalMsg ¶ added in v0.4.0
func (z *BlockHashOp) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BondStatus ¶
type BondStatus uint64
BondStatus is the status of a validator
func (BondStatus) String ¶
func (b BondStatus) String() string
String implements the Stringer interface for BondStatus.
type BytecodeInfo ¶
type BytecodeInfo struct {
// contains filtered or unexported fields
}
func NewBytecodeInfo ¶
func NewBytecodeInfo(data []byte) *BytecodeInfo
func (*BytecodeInfo) BytecodeSlice ¶
func (info *BytecodeInfo) BytecodeSlice() []byte
func (*BytecodeInfo) Bytes ¶
func (info *BytecodeInfo) Bytes() []byte
func (*BytecodeInfo) CodeHashSlice ¶
func (info *BytecodeInfo) CodeHashSlice() []byte
type BytecodeRWOp ¶ added in v0.4.0
func (*BytecodeRWOp) DecodeMsg ¶ added in v0.4.0
func (z *BytecodeRWOp) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BytecodeRWOp) EncodeMsg ¶ added in v0.4.0
func (z *BytecodeRWOp) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BytecodeRWOp) MarshalMsg ¶ added in v0.4.0
func (z *BytecodeRWOp) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BytecodeRWOp) Msgsize ¶ added in v0.4.0
func (z *BytecodeRWOp) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*BytecodeRWOp) UnmarshalMsg ¶ added in v0.4.0
func (z *BytecodeRWOp) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ChainEvent ¶
type ChainEvent struct { BlockHeader *Header Block *modbtypes.Block Hash gethcmn.Hash Logs []*gethtypes.Log }
type ChainEvent struct { Block *types.Block Hash common.Hash Logs []*types.Log }
func BlockToChainEvent ¶ added in v0.3.0
func BlockToChainEvent(mdbBlock *modbtypes.Block) ChainEvent
type Context ¶
type Context struct { Rbt *rabbit.RabbitStore Db modbtypes.DB Height int64 XHedgeForkBlock int64 SymbolSbchForkBlock int64 StakingForkBlock int64 ShaGateForkBlock int64 Type uint8 }
update WithRbtCopy when fields change in Context
func NewContext ¶
func NewContext(rbt *rabbit.RabbitStore, db modbtypes.DB) *Context
func (*Context) BasicQueryLogs ¶
func (*Context) CheckNonce ¶
func (*Context) CreateDynamicArray ¶ added in v0.4.0
func (*Context) DeleteDynamicArray ¶ added in v0.3.1
func (*Context) DeleteStorageAt ¶ added in v0.3.1
func (*Context) DeleteValueAtMapKey ¶ added in v0.3.1
func (*Context) GetAccount ¶
func (c *Context) GetAccount(address common.Address) *AccountInfo
func (*Context) GetAndDeleteValueAtMapKey ¶ added in v0.3.1
func (*Context) GetBalance ¶
func (*Context) GetBlockByHash ¶
func (*Context) GetBlockByHeight ¶
func (*Context) GetBlockHashByHeight ¶ added in v0.1.1
func (*Context) GetCurrBlockBasicInfo ¶
func (*Context) GetDynamicArray ¶ added in v0.3.1
func (*Context) GetFromAddressCount ¶ added in v0.1.4
return the times addr acts as the from-address of a transaction
func (*Context) GetLatestHeight ¶
func (*Context) GetSep20FromAddressCount ¶ added in v0.1.1
return the times addr acts as a from-address of a SEP20 Transfer event at some contract
func (*Context) GetSep20ToAddressCount ¶ added in v0.1.1
return the times addr acts as the to-address of a SEP20 Transfer event at some contract
func (*Context) GetToAddressCount ¶ added in v0.1.1
return the times addr acts as the to-address of a transaction
func (*Context) GetTxByBlkHtAndTxIndex ¶
func (c *Context) GetTxByBlkHtAndTxIndex(height uint64, index uint64) *Transaction
func (*Context) GetTxByHash ¶
func (*Context) GetTxListByHeight ¶
func (c *Context) GetTxListByHeight(height uint32) (txs []*Transaction, sigs [][65]byte, err error)
func (*Context) GetTxListByHeightWithRange ¶ added in v0.2.0
func (*Context) GetValueAtMapKey ¶ added in v0.3.1
func (*Context) IsShaGateFork ¶ added in v0.4.0
func (*Context) IsStakingFork ¶ added in v0.4.3
func (*Context) IsSymbolSbchFork ¶ added in v0.4.5
func (*Context) IsXHedgeFork ¶ added in v0.4.0
func (*Context) QueryTxByAddr ¶
func (*Context) QueryTxByDst ¶
func (*Context) QueryTxBySrc ¶
func (*Context) SetAccount ¶
func (c *Context) SetAccount(address common.Address, acc *AccountInfo)
func (*Context) SetCurrBlockBasicInfo ¶
func (*Context) SetCurrentHeight ¶ added in v0.4.0
func (*Context) SetShaGateForkBlock ¶ added in v0.4.0
func (*Context) SetStakingForkBlock ¶ added in v0.4.3
func (*Context) SetSymbolSbchBlock ¶ added in v0.4.5
func (*Context) SetValueAtMapKey ¶ added in v0.4.0
func (*Context) SetXHedgeForkBlock ¶ added in v0.4.0
func (*Context) StoreBlock ¶
func (*Context) WithRbtCopy ¶
new empty rbt with same parent store as the old one
type CreationCounterRWOp ¶ added in v0.4.0
func (*CreationCounterRWOp) DecodeMsg ¶ added in v0.4.0
func (z *CreationCounterRWOp) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (CreationCounterRWOp) EncodeMsg ¶ added in v0.4.0
func (z CreationCounterRWOp) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (CreationCounterRWOp) MarshalMsg ¶ added in v0.4.0
func (z CreationCounterRWOp) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (CreationCounterRWOp) Msgsize ¶ added in v0.4.0
func (z CreationCounterRWOp) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CreationCounterRWOp) UnmarshalMsg ¶ added in v0.4.0
func (z *CreationCounterRWOp) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Description ¶
type Description struct { Moniker string `json:"moniker" yaml:"moniker"` // name Identity string `json:"identity" yaml:"identity"` // optional identity signature (ex. UPort or Keybase) Website string `json:"website" yaml:"website"` // optional website link SecurityContact string `json:"security_contact" yaml:"security_contact"` // optional security contact info Details string `json:"details" yaml:"details"` // optional details }
Description - description fields for a validator
func NewDescription ¶
func NewDescription(moniker, identity, website, securityContact, details string) Description
NewDescription returns a new Description with the provided values.
type FilterFunc ¶ added in v0.2.0
type Header ¶
type Header struct { Number hexutil.Uint64 `json:"number"` BlockHash gethcmn.Hash `json:"hash"` ParentHash gethcmn.Hash `json:"parentHash"` Bloom gethcore.Bloom `json:"logsBloom"` TxRoot gethcmn.Hash `json:"transactionsRoot"` StateRoot gethcmn.Hash `json:"stateRoot"` Miner gethcmn.Address `json:"miner"` GasUsed hexutil.Uint64 `json:"gasUsed"` Timestamp hexutil.Uint64 `json:"timestamp"` }
type InternalTxCall ¶ added in v0.3.3
type InternalTxCall struct { /** The kind of the call. For zero-depth calls ::EVMC_CALL SHOULD be used. */ Kind int `msg:"kind"` /** * Additional flags modifying the call execution behavior. * In the current version the only valid values are ::EVMC_STATIC or 0. */ Flags uint32 `msg:"flags"` /** The call depth. */ Depth int32 `msg:"depth"` /** The amount of gas for message execution. */ Gas int64 /** The callee of the transaction. */ Destination [20]byte `msg:"destination"` /** The caller of the transaction. */ Sender [20]byte `msg:"sender"` /** the input data. */ Input []byte `msg:"input"` /** * The amount of BCH transferred with the message. */ Value [32]byte `msg:"value"` }
func (*InternalTxCall) DecodeMsg ¶ added in v0.3.3
func (z *InternalTxCall) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*InternalTxCall) EncodeMsg ¶ added in v0.3.3
func (z *InternalTxCall) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*InternalTxCall) MarshalMsg ¶ added in v0.3.3
func (z *InternalTxCall) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*InternalTxCall) Msgsize ¶ added in v0.3.3
func (z *InternalTxCall) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*InternalTxCall) UnmarshalMsg ¶ added in v0.3.3
func (z *InternalTxCall) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type InternalTxReturn ¶ added in v0.3.3
type InternalTxReturn struct { /** The execution status code. */ StatusCode int `msg:"statusCode"` /** * The amount of gas left after the execution. * If StatusCode is neither ::EVMC_SUCCESS nor ::EVMC_REVERT * the value MUST be 0. */ GasLeft int64 `msg:"gasLeft"` /** the output data. */ Output []byte `msg:"output"` /** * The address of the contract created by create instructions. * * This field has valid value only if: * - it is a result of the Host method evmc_host_interface::call * - and the result describes successful contract creation * (StatusCode is ::EVMC_SUCCESS). * In all other cases the address MUST be null bytes. */ CreateAddress [20]byte `msg:"createAddress"` }
func (*InternalTxReturn) DecodeMsg ¶ added in v0.3.3
func (z *InternalTxReturn) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*InternalTxReturn) EncodeMsg ¶ added in v0.3.3
func (z *InternalTxReturn) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*InternalTxReturn) MarshalMsg ¶ added in v0.3.3
func (z *InternalTxReturn) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*InternalTxReturn) Msgsize ¶ added in v0.3.3
func (z *InternalTxReturn) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*InternalTxReturn) UnmarshalMsg ¶ added in v0.3.3
func (z *InternalTxReturn) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Log ¶
type Log struct { // Consensus fields: // address of the contract that generated the event Address [20]byte `msg:"address"` // list of topics provided by the contract. Topics [][32]byte `msg:"topics"` // supplied by the contract, usually ABI-encoded Data []byte `msg:"data"` // Derived fields. These fields are filled in by the node // but not secured by consensus. // block in which the transaction was included BlockNumber uint64 `msg:"blockNumber"` // hash of the transaction TxHash [32]byte `msg:"transactionHash"` // index of the transaction in the block TxIndex uint `msg:"transactionIndex"` // hash of the block in which the transaction was included BlockHash [32]byte `msg:"blockHash"` // index of the log in the block Index uint `msg:"logIndex"` // The Removed field is true if this log was reverted due to a chain reorganisation. // You must pay attention to this field if you receive logs through a filter query. Removed bool `msg:"removed"` }
func (*Log) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type ReadWriteLists ¶ added in v0.4.0
type ReadWriteLists struct { CreationCounterRList []CreationCounterRWOp `msg:"creationcounter_rlist"` CreationCounterWList []CreationCounterRWOp `msg:"creationcounter_wlist"` AccountRList []AccountRWOp `msg:"account_rlist"` AccountWList []AccountRWOp `msg:"account_wlist"` BytecodeRList []BytecodeRWOp `msg:"bytecode_rlist"` BytecodeWList []BytecodeRWOp `msg:"bytecode_wlist"` StorageRList []StorageRWOp `msg:"storage_rlist"` StorageWList []StorageRWOp `msg:"storage_wlist"` BlockHashList []BlockHashOp `msg:"blockhash_list"` }
func (*ReadWriteLists) DecodeMsg ¶ added in v0.4.0
func (z *ReadWriteLists) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ReadWriteLists) EncodeMsg ¶ added in v0.4.0
func (z *ReadWriteLists) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ReadWriteLists) MarshalMsg ¶ added in v0.4.0
func (z *ReadWriteLists) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ReadWriteLists) Msgsize ¶ added in v0.4.0
func (z *ReadWriteLists) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ReadWriteLists) UnmarshalMsg ¶ added in v0.4.0
func (z *ReadWriteLists) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type StorageRWOp ¶ added in v0.4.0
type StorageRWOp struct { Seq uint64 `msg:"seq"` Key string `msg:"key"` Value []byte `msg:"value"` }
func (*StorageRWOp) DecodeMsg ¶ added in v0.4.0
func (z *StorageRWOp) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*StorageRWOp) EncodeMsg ¶ added in v0.4.0
func (z *StorageRWOp) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*StorageRWOp) MarshalMsg ¶ added in v0.4.0
func (z *StorageRWOp) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*StorageRWOp) Msgsize ¶ added in v0.4.0
func (z *StorageRWOp) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*StorageRWOp) UnmarshalMsg ¶ added in v0.4.0
func (z *StorageRWOp) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type SystemContractExecutor ¶
type Transaction ¶
type Transaction struct { Hash [32]byte `msg:"hash"` //32 Bytes - hash of the transaction. TransactionIndex int64 `msg:"index"` //integer of the transactions index position in the block. null when its pending. Nonce uint64 `msg:"nonce"` //the number of transactions made by the sender prior to this one. BlockHash [32]byte `msg:"block"` //32 Bytes - hash of the block where this transaction was in. null when its pending. BlockNumber int64 `msg:"height"` //block number where this transaction was in. null when its pending. From [20]byte `msg:"from"` //20 Bytes - address of the sender. To [20]byte `msg:"to"` //20 Bytes - address of the receiver. null when its a contract creation transaction. Value [32]byte `msg:"value"` //value transferred in Wei. GasPrice [32]byte `msg:"gasprice"` //gas price provided by the sender in Wei. Gas uint64 `msg:"gas"` //gas provided by the sender. Input []byte `msg:"input"` //the data send along with the transaction. CumulativeGasUsed uint64 `msg:"cgasused"` // the total amount of gas used when this transaction was executed in the block. GasUsed uint64 `msg:"gasused"` //the amount of gas used by this specific transaction alone. ContractAddress [20]byte `msg:"contractaddr"` //20 Bytes - the contract address created, if the transaction was a contract creation, otherwise - null. Logs []Log `msg:"logs"` //Array - Array of log objects, which this transaction generated. LogsBloom [256]byte `msg:"bloom"` //256 Bytes - Bloom filter for light clients to quickly retrieve related logs. Status uint64 `msg:"status"` //tx execute result: ReceiptStatusFailed or ReceiptStatusSuccessful StatusStr string `msg:"statusstr"` //tx execute result explained OutData []byte `msg:"outdata"` //the output data from the transaction InternalTxCalls []InternalTxCall `msg:"itxcalls"` InternalTxReturns []InternalTxReturn `msg:"itxreturns"` RwLists *ReadWriteLists `msg:"rwlist"` }
TRANSACTION - A transaction object, or null when no transaction was found
func (*Transaction) DecodeMsg ¶
func (z *Transaction) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*Transaction) EncodeMsg ¶
func (z *Transaction) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*Transaction) MarshalMsg ¶
func (z *Transaction) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*Transaction) Msgsize ¶
func (z *Transaction) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Transaction) UnmarshalMsg ¶
func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type TxToRun ¶
func (*TxToRun) FromGethTx ¶
type ValAddress ¶
type ValAddress []byte
type Validator ¶
type Validator struct { OperatorAddress ValAddress `json:"operator_address" yaml:"operator_address"` // address of the validator's operator; bech encoded in JSON ConsPubKey crypto.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` // the consensus public key of the validator; bech encoded in JSON //Jailed bool `json:"jailed" yaml:"jailed"` // has the validator been jailed from bonded status? Status BondStatus `json:"status" yaml:"status"` // validator status (bonded/unbonded) Tokens *big.Int `json:"tokens" yaml:"tokens"` // delegated tokens Description Description `json:"description" yaml:"description"` // description terms for the validator }
func (Validator) MarshalJSON ¶
func (*Validator) UnmarshalJSON ¶
UnmarshalJSON unmarshals the validator from JSON using Bech32
type Validators ¶
type Validators []Validator
Validators is a collection of Validator
func (Validators) Sort ¶
func (v Validators) Sort()
Sort Validators sorts validator array in ascending operator address order
func (Validators) String ¶
func (v Validators) String() (out string)