cross_chain_manager

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: LGPL-3.0 Imports: 15 Imported by: 9

Documentation

Index

Constants

View Source
const (
	CREATE_CROSS_CHAIN_TX  = "createCrossChainTx"
	PROCESS_CROSS_CHAIN_TX = "processCrossChainTx"
	MAKE_FROM_ONT_PROOF    = "makeFromOntProof"
	VERIFY_TO_ONT_PROOF    = "verifyToOntProof"

	//key prefix
	DONE_TX        = "doneTx"
	REQUEST        = "request"
	CROSS_CHAIN_ID = "crossChainID"

	//ont chain id
	ONT_CHAIN_ID = 3
)

Variables

This section is empty.

Functions

func CreateCrossChainTx

func CreateCrossChainTx(native *native.NativeService) ([]byte, error)

func InitCrossChain

func InitCrossChain()

Init governance contract address

func MakeFromOntProof

func MakeFromOntProof(native *native.NativeService, params *CreateCrossChainTxParam) error

func ProcessCrossChainTx

func ProcessCrossChainTx(native *native.NativeService) ([]byte, error)

func RegisterCrossChainContract

func RegisterCrossChainContract(native *native.NativeService)

Register methods of governance contract

func VerifyToOntTx

func VerifyToOntTx(native *native.NativeService, proof []byte, fromChainid uint64, header *ccom.Header) (*ccom.ToMerkleValue, error)

Types

type CreateCrossChainTxParam

type CreateCrossChainTxParam struct {
	ToChainID         uint64
	ToContractAddress []byte
	Method            string
	Args              []byte
}

func (*CreateCrossChainTxParam) Deserialization

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

func (*CreateCrossChainTxParam) Serialization

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

type OngUnlockParam

type OngUnlockParam struct {
	FromChainID uint64
	Address     common.Address
	Amount      uint64
}

func (*OngUnlockParam) Deserialization

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

func (*OngUnlockParam) Serialization

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

type ProcessCrossChainTxParam

type ProcessCrossChainTxParam struct {
	Address     common.Address
	FromChainID uint64
	Height      uint32
	Proof       string
	Header      []byte
}

func (*ProcessCrossChainTxParam) Deserialization

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

func (*ProcessCrossChainTxParam) Serialization

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

Jump to

Keyboard shortcuts

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