native

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: LGPL-3.0 Imports: 8 Imported by: 0 modules, 0 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

* 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 (
	MAX_CONTEXT_LEN = 1024
)

Variables

View Source
var (
	Contracts = make(map[common.Address]RegisterService)
)

Functions

This section is empty.

Types

type Handler

type Handler func(native *NativeService) ([]byte, error)

type NativeService

type NativeService struct {
	// contains filtered or unexported fields
}

Native service struct Invoke a native smart contract, new a native service

func NewNativeService

func NewNativeService(cacheDB *storage.CacheDB, tx *types.Transaction,
	time, height uint32, blockHash common.Uint256, chainID uint64, input []byte, preExec bool) (*NativeService, error)

func (*NativeService) AddNotify

func (this *NativeService) AddNotify(notify *event.NotifyEventInfo)

func (*NativeService) CallingContext

func (this *NativeService) CallingContext() common.Address

func (*NativeService) CheckWitness

func (this *NativeService) CheckWitness(address common.Address) bool

CheckWitness check whether authorization correct

func (*NativeService) CurrentContext

func (this *NativeService) CurrentContext() common.Address

func (*NativeService) GetCacheDB

func (this *NativeService) GetCacheDB() *storage.CacheDB

func (*NativeService) GetChainID

func (this *NativeService) GetChainID() uint64

func (*NativeService) GetCrossHashes

func (this *NativeService) GetCrossHashes() []common.Uint256

func (*NativeService) GetHeight

func (this *NativeService) GetHeight() uint32

func (*NativeService) GetInput

func (this *NativeService) GetInput() []byte

func (*NativeService) GetNotify

func (this *NativeService) GetNotify() []*event.NotifyEventInfo

func (*NativeService) GetTx

func (this *NativeService) GetTx() *types.Transaction

func (*NativeService) Invoke

func (this *NativeService) Invoke() (interface{}, error)

func (*NativeService) NativeCall

func (this *NativeService) NativeCall(address common.Address, method string, args []byte) (interface{}, error)

func (*NativeService) PopContext

func (this *NativeService) PopContext()

func (*NativeService) PushContext

func (this *NativeService) PushContext(address common.Address) error

func (*NativeService) PutMerkleVal

func (this *NativeService) PutMerkleVal(data []byte)

func (*NativeService) Register

func (this *NativeService) Register(methodName string, handler Handler)

type RegisterService

type RegisterService func(native *NativeService)

Directories

Path Synopsis
cross_chain_manager
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/bsc
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/btc
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/common
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/cosmos
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/eth
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/msc
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/neo
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/neo3
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/okex
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/polygon
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
cross_chain_manager/quorum
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
governance/side_chain_manager
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
header_sync/bsc
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
header_sync/eth
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
header_sync/eth/rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
header_sync/heco
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
header_sync/msc
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/okex
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/okex/ethsecp256k1
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/polygon
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/polygon/types
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/polygon/types/common
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/polygon/types/secp256k1
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library.
header_sync/quorum
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.

Jump to

Keyboard shortcuts

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