Documentation ¶
Overview ¶
SPDX-License-Identifier: LGPL-3.0-or-later Copyright 2019 DNA Dev team
- Copyright (C) 2018 The ontology Authors
- This file is part of The ontology library. *
- The ontology is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version. *
- The ontology is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details. *
- You should have received a copy of the GNU Lesser General Public License
- along with The ontology. If not, see <http://www.gnu.org/licenses/>.
Some common define of DNA-go-sdk
Index ¶
- Constants
- Variables
- type BlockTxHashes
- type BlockTxHashesStr
- type GlobalParam
- type MemPoolTxCount
- type MemPoolTxState
- type MemPoolTxStateItem
- type MerkleProof
- type NotifyEventInfo
- type PreExecResult
- type ResultItem
- type SmartContactEvent
- type SmartContract
- type SmartContractEventLog
- type StateInfo
- type TransferFromInfo
Constants ¶
View Source
const ( WS_SUBSCRIBE_ACTION_BLOCK = "Block" WS_SUBSCRIBE_ACTION_EVENT_NOTIFY = "Notify" WS_SUBSCRIBE_ACTION_EVENT_LOG = "Log" WS_SUBSCRIBE_ACTION_BLOCK_TX_HASH = "BlockTxHash" )
Variables ¶
View Source
var (
VERSION_TRANSACTION = byte(0)
)
Functions ¶
This section is empty.
Types ¶
type BlockTxHashes ¶
type BlockTxHashesStr ¶
type GlobalParam ¶
type MemPoolTxCount ¶
type MemPoolTxState ¶
type MemPoolTxState struct {
State []*MemPoolTxStateItem
}
type MemPoolTxStateItem ¶
type MerkleProof ¶
type MerkleProof struct { Type string TransactionsRoot string BlockHeight uint32 CurBlockRoot string CurBlockHeight uint32 TargetHashes []string }
MerkleProof return struct
type NotifyEventInfo ¶
type NotifyEventInfo struct { ContractAddress string States interface{} }
func (*NotifyEventInfo) UnmarshalJSON ¶
func (this *NotifyEventInfo) UnmarshalJSON(data []byte) error
type PreExecResult ¶
type PreExecResult struct { State byte Gas uint64 Result *ResultItem }
func (*PreExecResult) UnmarshalJSON ¶
func (this *PreExecResult) UnmarshalJSON(data []byte) (err error)
type ResultItem ¶
type ResultItem struct {
// contains filtered or unexported fields
}
func (*ResultItem) ToArray ¶
func (this *ResultItem) ToArray() ([]*ResultItem, error)
func (ResultItem) ToBool ¶
func (this ResultItem) ToBool() (bool, error)
func (ResultItem) ToByteArray ¶
func (this ResultItem) ToByteArray() ([]byte, error)
func (ResultItem) ToString ¶
func (this ResultItem) ToString() (string, error)
type SmartContactEvent ¶
type SmartContactEvent struct { TxHash string State byte GasConsumed uint64 Notify []*NotifyEventInfo }
SmartContactEvent object for event of transaction
type SmartContract ¶
type SmartContract payload.DeployCode
type SmartContractEventLog ¶
Click to show internal directories.
Click to hide internal directories.