common

package
v0.0.0-...-b94ffa6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2020 License: LGPL-3.0 Imports: 7 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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 BlockTxHashes struct {
	Hash         common.Uint256
	Height       uint32
	Transactions []common.Uint256
}

type BlockTxHashesStr

type BlockTxHashesStr struct {
	Hash         string
	Height       uint32
	Transactions []string
}

type GlobalParam

type GlobalParam struct {
	Key   string
	Value string
}

type MemPoolTxCount

type MemPoolTxCount struct {
	Verified uint32 //Tx count of verified
	Verifing uint32 //Tx count of verifing
}

type MemPoolTxState

type MemPoolTxState struct {
	State []*MemPoolTxStateItem
}

type MemPoolTxStateItem

type MemPoolTxStateItem struct {
	Height  uint32 // The height in which tx was verified
	Type    int    // The validator flag: stateless/stateful
	ErrCode int    // Verified result
}

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) ToInteger

func (this ResultItem) ToInteger() (*big.Int, 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

type SmartContractEventLog struct {
	TxHash          string
	ContractAddress string
	Message         string
}

type StateInfo

type StateInfo struct {
	From  string
	To    string
	Value uint64
}

type TransferFromInfo

type TransferFromInfo struct {
	Sender string
	From   string
	To     string
	Value  uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL