executor

package
v1.65.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClaim

func AddClaim(prophecy *x2eTy.ReceiptEthProphecy, validator string, claim string)

AddClaim adds a given claim to this prophecy

func CreateOracleClaimFromEthClaim

func CreateOracleClaimFromEthClaim(ethClaim x2eTy.Eth2Chain33) (x2eTy.OracleClaim, error)

CreateOracleClaimFromEthClaim 通过ethchain33结构构造一个OracleClaim结构,包括生成唯一的ID

func CreateOracleClaimFromOracleString

func CreateOracleClaimFromOracleString(oracleClaimString string) (x2eTy.OracleClaimContent, error)

CreateOracleClaimFromOracleString --

func FindHighestClaim

func FindHighestClaim(prophecy *x2eTy.ReceiptEthProphecy, validators map[string]int64) (string, int64, int64)

FindHighestClaim 遍历该prophecy所有claim,找出获得最多票数的claim

func GetName

func GetName() string

GetName get driver name

func Init

func Init(name string, cfg *types.Chain33Config, sub []byte)

Init register dapp

func InitExecType

func InitExecType()

InitExecType Init Exec Type

func NewClaim

func NewClaim(id string, validatorAddress string, content string) x2eTy.OracleClaim

NewClaim ...

func NewOracleClaimContent

func NewOracleClaimContent(chain33Receiver string, amount string, claimType, decimals int64) x2eTy.OracleClaimContent

NewOracleClaimContent ...

func NewProphecy

func NewProphecy(id string) *x2eTy.ReceiptEthProphecy

NewProphecy ...

Types

type Oracle

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

Oracle ...

func NewOracle

func NewOracle(db dbm.KV, consensusThreshold int64) *Oracle

NewOracle ...

func (*Oracle) GetConsensusThreshold

func (o *Oracle) GetConsensusThreshold() int64

GetConsensusThreshold ...

func (*Oracle) GetLastTotalPower

func (o *Oracle) GetLastTotalPower() (int64, error)

GetLastTotalPower Load the last total validator power.

func (*Oracle) GetProphecy

func (o *Oracle) GetProphecy(id string) (*x2eTy.ReceiptEthProphecy, error)

GetProphecy ...

func (*Oracle) GetValidatorArray

func (o *Oracle) GetValidatorArray() (*x2eTy.ValidatorList, error)

GetValidatorArray ...

func (*Oracle) ProcessAddValidator

func (o *Oracle) ProcessAddValidator(address string, power int64) (*types.Receipt, error)

ProcessAddValidator ... 对于相同的地址该如何处理? 现有方案是相同地址就报错

func (*Oracle) ProcessBurn

func (o *Oracle) ProcessBurn(address, amount string, accDB *account.DB) (*types.Receipt, error)

ProcessBurn processes the burn of bridged coins from the given sender

func (*Oracle) ProcessClaim

func (o *Oracle) ProcessClaim(claim x2eTy.Eth2Chain33) (*x2eTy.ProphecyStatus, error)

ProcessClaim 处理接收到的ethchain33请求

func (*Oracle) ProcessLock

func (o *Oracle) ProcessLock(address, to, execAddr, amount string, accDB *account.DB) (*types.Receipt, error)

ProcessLock processes the lockup of cosmos coins from the given sender accDB = mavl-coins-bty-addr

func (*Oracle) ProcessModifyValidator

func (o *Oracle) ProcessModifyValidator(address string, power int64) (*types.Receipt, error)

ProcessModifyValidator 这里的power指的是修改后的power

func (*Oracle) ProcessRemoveValidator

func (o *Oracle) ProcessRemoveValidator(address string) (*types.Receipt, error)

ProcessRemoveValidator ...

func (*Oracle) ProcessSetConsensusNeeded

func (o *Oracle) ProcessSetConsensusNeeded(ConsensusThreshold int64) (int64, int64, error)

ProcessSetConsensusNeeded ...

func (*Oracle) ProcessSuccessfulClaimForBurn

func (o *Oracle) ProcessSuccessfulClaimForBurn(claim, execAddr, tokenSymbol string, accDB *account.DB) (*types.Receipt, error)

ProcessSuccessfulClaimForBurn 处理经过审核的关于Burn的claim

func (*Oracle) ProcessSuccessfulClaimForLock

func (o *Oracle) ProcessSuccessfulClaimForLock(claim, execAddr string, accDB *account.DB) (*types.Receipt, error)

ProcessSuccessfulClaimForLock 处理经过审核的关于Lock的claim

func (*Oracle) SetConsensusThreshold

func (o *Oracle) SetConsensusThreshold(ConsensusThreshold int64)

SetConsensusThreshold ...

func (*Oracle) SetLastTotalPower

func (o *Oracle) SetLastTotalPower() error

SetLastTotalPower Set the last total validator power.

Jump to

Keyboard shortcuts

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