common

package
v0.3.0-layer2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: LGPL-3.0 Imports: 12 Imported by: 1

Documentation

Overview

* 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/>.

* 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/>.

Index

Constants

View Source
const (
	CURR_HEADER_VERSION = 0
)

Variables

This section is empty.

Functions

func CrossChainNeoVMCall

func CrossChainNeoVMCall(this *native.NativeService, address common.Address, method string, args []byte,
	fromContractAddress []byte, fromChainID uint64) (interface{}, error)

Types

type Header struct {
	Version          uint32
	ChainID          uint64
	PrevBlockHash    common.Uint256
	TransactionsRoot common.Uint256
	CrossStateRoot   common.Uint256
	BlockRoot        common.Uint256
	Timestamp        uint32
	Height           uint32
	ConsensusData    uint64
	ConsensusPayload []byte
	NextBookkeeper   common.Address

	Bookkeepers []keypair.PublicKey
	SigData     [][]byte
	// contains filtered or unexported fields
}

func HeaderFromRawBytes

func HeaderFromRawBytes(raw []byte) (*Header, error)

func (*Header) Deserialization

func (bd *Header) Deserialization(source *common.ZeroCopySource) error

func (*Header) Hash

func (bd *Header) Hash() common.Uint256

func (*Header) Serialization

func (bd *Header) Serialization(sink *common.ZeroCopySink)

type MakeTxParam

type MakeTxParam struct {
	TxHash              []byte
	CrossChainID        []byte
	FromContractAddress []byte
	ToChainID           uint64
	ToContractAddress   []byte
	Method              string
	Args                []byte
}

func (*MakeTxParam) Deserialization

func (this *MakeTxParam) Deserialization(source *common.ZeroCopySource) error

func (*MakeTxParam) Serialization

func (this *MakeTxParam) Serialization(sink *common.ZeroCopySink)

type ToMerkleValue

type ToMerkleValue struct {
	TxHash      []byte
	FromChainID uint64
	MakeTxParam *MakeTxParam
}

func (*ToMerkleValue) Deserialization

func (this *ToMerkleValue) Deserialization(source *common.ZeroCopySource) error

Jump to

Keyboard shortcuts

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