Documentation ¶
Overview ¶
* Copyright (C) 2021 The poly network Authors * This file is part of The poly network library. * * The poly network 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 poly network 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 poly network. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- Variables
- type Handler
- type NativeService
- func (this *NativeService) AddNotify(notify *event.NotifyEventInfo)
- func (this *NativeService) CallingContext() common.Address
- func (this *NativeService) CheckWitness(address common.Address) bool
- func (this *NativeService) CurrentContext() common.Address
- func (this *NativeService) GetCacheDB() *storage.CacheDB
- func (this *NativeService) GetChainID() uint64
- func (this *NativeService) GetCrossHashes() []common.Uint256
- func (this *NativeService) GetHeight() uint32
- func (this *NativeService) GetInput() []byte
- func (this *NativeService) GetNotify() []*event.NotifyEventInfo
- func (this *NativeService) GetTx() *types.Transaction
- func (this *NativeService) Invoke() (interface{}, error)
- func (this *NativeService) NativeCall(address common.Address, method string, args []byte) (interface{}, error)
- func (this *NativeService) PopContext()
- func (this *NativeService) PushContext(address common.Address) error
- func (this *NativeService) PutMerkleVal(data []byte)
- func (this *NativeService) Register(methodName string, handler Handler)
- type RegisterService
Constants ¶
const (
MAX_CONTEXT_LEN = 1024
)
Variables ¶
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 (*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 (*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) 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/bsc
* 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/btc
* 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/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. |
cross_chain_manager/cosmos
* 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/eth
* 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/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) 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/neo3
* 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/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) 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. |
governance/side_chain_manager
* 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/bsc
* 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/eth
* 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/eth/rlp
Package rlp implements the RLP serialization format.
|
Package rlp implements the RLP serialization format. |
header_sync/heco
* 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/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) 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. |