bridge

package
v0.0.0-...-7ece11e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 33 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LegacyTxType = iota
	AccessListTxType
	DynamicFeeTxType
)

Variables

This section is empty.

Functions

func ExtractIssueEVMDataFromReceipt

func ExtractIssueEVMDataFromReceipt(
	txReceipt *types.Receipt,
	contractAddress string, prefix string,
	expectedIncAddrStr string,
) (*big.Int, string, []byte, error)

func FindExternalTokenID

func FindExternalTokenID(stateDB *statedb.StateDB, incTokenID common.Hash, prefix string) ([]byte, error)

func GetEVMInfoByMetadataType

func GetEVMInfoByMetadataType(metadataType int, networkID uint) ([]string, string, int, bool, error)

func GetNetworkTypeByNetworkID

func GetNetworkTypeByNetworkID(networkID uint8) (uint, error)

func GetShardIDFromPaymentAddress

func GetShardIDFromPaymentAddress(paymentAddress key.PaymentAddress) (byte, error)

func GetShardIDFromPaymentAddressStr

func GetShardIDFromPaymentAddressStr(addressStr string) (byte, error)

func GetWasmInfoByMetadataType

func GetWasmInfoByMetadataType(metadataType int) ([]string, string, int, string, error)

func IsBridgeAggMetaType

func IsBridgeAggMetaType(metaType int) bool

func IsBridgeTxHashUsedInBlock

func IsBridgeTxHashUsedInBlock(uniqTx []byte, uniqTxsUsed [][]byte) bool

func IsBurningConfirmMetaType

func IsBurningConfirmMetaType(metaType int) bool

func MarshalActionDataForShieldEVMReq

func MarshalActionDataForShieldEVMReq(txReceipt *types.Receipt) ([]byte, error)

func ParseEVMLogDataByEventName

func ParseEVMLogDataByEventName(log *types.Log, ethContractAddressStr string, name string) (map[string]interface{}, error)

func PickAndParseLogMapFromReceiptByContractAddr

func PickAndParseLogMapFromReceiptByContractAddr(
	constructedReceipt *types.Receipt,
	ethContractAddressStr string,
	eventName string) (map[string]interface{}, error)

func TrimNetworkPrefix

func TrimNetworkPrefix(fullTokenID []byte, prefix string) ([]byte, error)

TrimNetworkPrefix is a helper that removes the 3-byte network prefix from the full 23-byte external address (for burning confirm etc.); within the bridgeagg vault we only use prefixed addresses

func UnmarshalActionDataForShieldEVMReq

func UnmarshalActionDataForShieldEVMReq(data []byte) (*types.Receipt, error)

func VerifyProofAndParseAuroraReceipt

func VerifyProofAndParseAuroraReceipt(
	txHash common.Hash,
	auroraHosts []string,
	nearHosts []string,
	minEVMConfirmationBlocks int,
	networkPrefix string,
) (*types.Receipt, error)

func VerifyProofAndParseEVMReceipt

func VerifyProofAndParseEVMReceipt(
	blockHash rCommon.Hash,
	txIndex uint,
	proofStrs []string,
	hosts []string,
	minEVMConfirmationBlocks int,
	networkPrefix string,
	checkEVMHarkFork bool,
) (*types.Receipt, error)

func VerifyTokenPair

func VerifyTokenPair(
	stateDBs map[int]*statedb.StateDB,
	ac *metadataCommon.AccumulatedValues,
	incTokenID common.Hash,
	token []byte,
) error

func VerifyWasmData

func VerifyWasmData(
	stateDB *statedb.StateDB, listTxUsed [][]byte,
	isTxHashIssued func(stateDB *statedb.StateDB, uniqueEthTx []byte) (bool, error),
	externalShieldTx string, incognitoAddress string,
) (byte, error)

func VerifyWasmShieldTxId

func VerifyWasmShieldTxId(
	txHash string,
	hosts []string,
	minWasmConfirmationBlocks int,
	contractId string,
) (string, string, uint64, string, error)

Types

type AcceptedConvertTokenToUnifiedToken

type AcceptedConvertTokenToUnifiedToken struct {
	UnifiedTokenID        common.Hash         `json:"UnifiedTokenID"`
	TokenID               common.Hash         `json:"TokenID"`
	Receiver              privacy.OTAReceiver `json:"Receiver"`
	ConvertPUnifiedAmount uint64              `json:"ConvertPUnifiedAmount"`
	ConvertPTokenAmount   uint64              `json:"ConvertPTokenAmount"`
	Reward                uint64              `json:"Reward"`
	TxReqID               common.Hash         `json:"TxReqID"`
}

type AcceptedInstShieldRequest

type AcceptedInstShieldRequest struct {
	Receiver       privacy.PaymentAddress      `json:"Receiver"`
	UnifiedTokenID common.Hash                 `json:"UnifiedTokenID"`
	TxReqID        common.Hash                 `json:"TxReqID"`
	Data           []AcceptedShieldRequestData `json:"Data"`
}

func ParseShieldReqInstAcceptedContent

func ParseShieldReqInstAcceptedContent(instAcceptedContentStr string) (*AcceptedInstShieldRequest, error)

type AcceptedReshieldRequest

type AcceptedReshieldRequest struct {
	UnifiedTokenID *common.Hash              `json:"UnifiedTokenID"`
	Receiver       privacy.OTAReceiver       `json:"Receiver"`
	TxReqID        common.Hash               `json:"TxReqID"`
	ReshieldData   AcceptedShieldRequestData `json:"ReshieldData"`
}

type AcceptedShieldRequestData

type AcceptedShieldRequestData struct {
	ShieldAmount    uint64      `json:"ShieldAmount"`
	Reward          uint64      `json:"Reward"`
	UniqTx          []byte      `json:"UniqTx"`
	ExternalTokenID []byte      `json:"ExternalTokenID"`
	NetworkID       uint8       `json:"NetworkID"`
	IncTokenID      common.Hash `json:"IncTokenID"`
}

type AcceptedUnshieldRequestInst

type AcceptedUnshieldRequestInst struct {
	UnifiedTokenID     common.Hash                          `json:"UnifiedTokenID"`
	IsDepositToSC      bool                                 `json:"IsDepositToSC"`
	WaitingUnshieldReq *statedb.BridgeAggWaitingUnshieldReq `json:"WaitingUnshieldReq"`
}

type AddToken

type AddToken struct {
	NewListTokens map[common.Hash]map[common.Hash]config.Vault `json:"NewListTokens"`
}

func (*AddToken) FromStringSlice

func (a *AddToken) FromStringSlice(source []string) error

func (*AddToken) StringSlice

func (a *AddToken) StringSlice() ([]string, error)

type BurnForCallRequest

type BurnForCallRequest struct {
	BurnTokenID common.Hash              `json:"BurnTokenID"`
	Data        []BurnForCallRequestData `json:"Data"`
	metadataCommon.MetadataBase
}

func (*BurnForCallRequest) BuildReqActions

func (request *BurnForCallRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*BurnForCallRequest) CalculateSize

func (bReq *BurnForCallRequest) CalculateSize() uint64

func (*BurnForCallRequest) GetOTADeclarations

func (bReq *BurnForCallRequest) GetOTADeclarations() []metadataCommon.OTADeclaration

func (BurnForCallRequest) Hash

func (bReq BurnForCallRequest) Hash() *common.Hash

func (BurnForCallRequest) TotalBurningAmount

func (bReq BurnForCallRequest) TotalBurningAmount() (uint64, error)

func (BurnForCallRequest) ValidateMetadataByItself

func (bReq BurnForCallRequest) ValidateMetadataByItself() bool

func (BurnForCallRequest) ValidateSanityData

func (bReq BurnForCallRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (BurnForCallRequest) ValidateTxWithBlockChain

func (bReq BurnForCallRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type BurnForCallRequestData

type BurnForCallRequestData struct {
	BurningAmount       uint64              `json:"BurningAmount"`
	ExternalNetworkID   uint8               `json:"ExternalNetworkID"`
	IncTokenID          common.Hash         `json:"IncTokenID"`
	ExternalCalldata    string              `json:"ExternalCalldata"`
	ExternalCallAddress string              `json:"ExternalCallAddress"`
	ReceiveToken        string              `json:"ReceiveToken"`
	RedepositReceiver   privacy.OTAReceiver `json:"RedepositReceiver"`
	WithdrawAddress     string              `json:"WithdrawAddress"`
}

type BurnForCallResponse

type BurnForCallResponse struct {
	UnshieldResponse
}

func NewBurnForCallResponseWithValue

func NewBurnForCallResponseWithValue(
	status string, requestedTxID common.Hash,
) *BurnForCallResponse

func (*BurnForCallResponse) ValidateMetadataByItself

func (response *BurnForCallResponse) ValidateMetadataByItself() bool

func (*BurnForCallResponse) VerifyMinerCreatedTxBeforeGettingInBlock

func (response *BurnForCallResponse) VerifyMinerCreatedTxBeforeGettingInBlock(
	mintData *metadataCommon.MintData,
	shardID byte,
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	ac *metadataCommon.AccumulatedValues,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
) (bool, error)

type BurningPRVRequest

type BurningPRVRequest struct {
	BurnerAddress     privacy.PaymentAddress // unused
	BurningAmount     uint64                 // must be equal to vout value
	TokenID           common.Hash
	TokenName         string // unused
	RemoteAddress     string
	RedepositReceiver *privacy.OTAReceiver `json:"RedepositReceiver,omitempty"`
	metadataCommon.MetadataBase
}

func NewBurningPRVRequest

func NewBurningPRVRequest(
	burnerAddress privacy.PaymentAddress,
	burningAmount uint64,
	tokenID common.Hash,
	tokenName string,
	remoteAddress string,
	redepositReceiver privacy.OTAReceiver,
	metaType int,
) (*BurningPRVRequest, error)

func (*BurningPRVRequest) BuildReqActions

func (bReq *BurningPRVRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*BurningPRVRequest) CalculateSize

func (bReq *BurningPRVRequest) CalculateSize() uint64

func (*BurningPRVRequest) GetOTADeclarations

func (bReq *BurningPRVRequest) GetOTADeclarations() []metadataCommon.OTADeclaration

func (BurningPRVRequest) Hash

func (bReq BurningPRVRequest) Hash() *common.Hash

func (BurningPRVRequest) ValidateMetadataByItself

func (bReq BurningPRVRequest) ValidateMetadataByItself() bool

func (BurningPRVRequest) ValidateSanityData

func (bReq BurningPRVRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (BurningPRVRequest) ValidateTxWithBlockChain

func (bReq BurningPRVRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type BurningRequest

type BurningRequest struct {
	BurnerAddress privacy.PaymentAddress // unused
	BurningAmount uint64                 // must be equal to vout value
	TokenID       common.Hash
	TokenName     string // unused
	RemoteAddress string
	metadataCommon.MetadataBase
}

whoever can send this type of tx

func NewBurningRequest

func NewBurningRequest(
	burnerAddress privacy.PaymentAddress,
	burningAmount uint64,
	tokenID common.Hash,
	tokenName string,
	remoteAddress string,
	metaType int,
) (*BurningRequest, error)

func (*BurningRequest) BuildReqActions

func (bReq *BurningRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*BurningRequest) CalculateSize

func (bReq *BurningRequest) CalculateSize() uint64

func (BurningRequest) Hash

func (bReq BurningRequest) Hash() *common.Hash

func (BurningRequest) HashWithoutSig

func (bReq BurningRequest) HashWithoutSig() *common.Hash

func (BurningRequest) ValidateMetadataByItself

func (bReq BurningRequest) ValidateMetadataByItself() bool

func (BurningRequest) ValidateSanityData

func (bReq BurningRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (BurningRequest) ValidateTxWithBlockChain

func (bReq BurningRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type ConvertTokenToUnifiedTokenRequest

type ConvertTokenToUnifiedTokenRequest struct {
	TokenID        common.Hash         `json:"TokenID"`
	UnifiedTokenID common.Hash         `json:"UnifiedTokenID"`
	Amount         uint64              `json:"Amount"`
	Receiver       privacy.OTAReceiver `json:"Receiver"`
	metadataCommon.MetadataBase
}

func NewConvertTokenToUnifiedTokenRequest

func NewConvertTokenToUnifiedTokenRequest() *ConvertTokenToUnifiedTokenRequest

func NewConvertTokenToUnifiedTokenRequestWithValue

func NewConvertTokenToUnifiedTokenRequestWithValue(
	tokenID, unifiedTokenID common.Hash, amount uint64, receiver privacy.OTAReceiver,
) *ConvertTokenToUnifiedTokenRequest

func (*ConvertTokenToUnifiedTokenRequest) BuildReqActions

func (request *ConvertTokenToUnifiedTokenRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*ConvertTokenToUnifiedTokenRequest) CalculateSize

func (request *ConvertTokenToUnifiedTokenRequest) CalculateSize() uint64

func (*ConvertTokenToUnifiedTokenRequest) GetOTADeclarations

func (request *ConvertTokenToUnifiedTokenRequest) GetOTADeclarations() []metadataCommon.OTADeclaration

func (*ConvertTokenToUnifiedTokenRequest) Hash

func (*ConvertTokenToUnifiedTokenRequest) ValidateMetadataByItself

func (request *ConvertTokenToUnifiedTokenRequest) ValidateMetadataByItself() bool

func (*ConvertTokenToUnifiedTokenRequest) ValidateSanityData

func (request *ConvertTokenToUnifiedTokenRequest) ValidateSanityData(
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	beaconHeight uint64,
	tx metadataCommon.Transaction,
) (bool, bool, error)

func (*ConvertTokenToUnifiedTokenRequest) ValidateTxWithBlockChain

func (request *ConvertTokenToUnifiedTokenRequest) ValidateTxWithBlockChain(
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	shardID byte,
	transactionStateDB *statedb.StateDB,
) (bool, error)

type ConvertTokenToUnifiedTokenResponse

type ConvertTokenToUnifiedTokenResponse struct {
	metadataCommon.MetadataBase
	ConvertAmount uint64      `json:"ConvertAmount"`
	Reward        uint64      `json:"Reward"`
	Status        string      `json:"Status"`
	TxReqID       common.Hash `json:"TxReqID"`
}

func NewBridgeAggConvertTokenToUnifiedTokenResponseWithValue

func NewBridgeAggConvertTokenToUnifiedTokenResponseWithValue(
	status string, txReqID common.Hash, convertAmount uint64, reward uint64,
) *ConvertTokenToUnifiedTokenResponse

func NewConvertTokenToUnifiedTokenResponse

func NewConvertTokenToUnifiedTokenResponse() *ConvertTokenToUnifiedTokenResponse

func (*ConvertTokenToUnifiedTokenResponse) CalculateSize

func (response *ConvertTokenToUnifiedTokenResponse) CalculateSize() uint64

func (*ConvertTokenToUnifiedTokenResponse) CheckTransactionFee

func (response *ConvertTokenToUnifiedTokenResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool

func (*ConvertTokenToUnifiedTokenResponse) Hash

func (*ConvertTokenToUnifiedTokenResponse) ValidateMetadataByItself

func (response *ConvertTokenToUnifiedTokenResponse) ValidateMetadataByItself() bool

func (*ConvertTokenToUnifiedTokenResponse) ValidateSanityData

func (response *ConvertTokenToUnifiedTokenResponse) ValidateSanityData(
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	beaconHeight uint64,
	tx metadataCommon.Transaction,
) (bool, bool, error)

func (*ConvertTokenToUnifiedTokenResponse) ValidateTxWithBlockChain

func (response *ConvertTokenToUnifiedTokenResponse) ValidateTxWithBlockChain(
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	shardID byte,
	transactionStateDB *statedb.StateDB,
) (bool, error)

func (*ConvertTokenToUnifiedTokenResponse) VerifyMinerCreatedTxBeforeGettingInBlock

func (response *ConvertTokenToUnifiedTokenResponse) VerifyMinerCreatedTxBeforeGettingInBlock(
	mintData *metadataCommon.MintData,
	shardID byte,
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	ac *metadataCommon.AccumulatedValues,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
) (bool, error)

type DepositEventData

type DepositEventData struct {
	Amount          *big.Int
	ReceiverStr     string
	ExternalTokenID []byte
	IncTxID         []byte
	ShardID         byte
	IsOneTime       bool
}

func ExtractRedepositEVMDataFromReceipt

func ExtractRedepositEVMDataFromReceipt(
	txReceipt *types.Receipt,
	contractAddress string, prefix string,
) ([]DepositEventData, error)

type EVMInfo

type EVMInfo struct {
	ContractAddress   string
	Prefix            string
	IsTxHashIssued    func(stateDB *statedb.StateDB, uniqTx []byte) (bool, error)
	ListTxUsedInBlock [][]byte
}

func GetEVMInfoByNetworkID

func GetEVMInfoByNetworkID(networkID uint8, ac *metadataCommon.AccumulatedValues) (*EVMInfo, error)

type EVMProof

type EVMProof struct {
	BlockHash rCommon.Hash `json:"BlockHash"`
	TxIndex   uint         `json:"TxIndex"`
	Proof     []string     `json:"Proof"`
}

type GetEVMBlockNumRes

type GetEVMBlockNumRes struct {
	rpccaller.RPCBaseRes
	Result string `json:"result"`
}

type GetEVMHeaderByHashRes

type GetEVMHeaderByHashRes struct {
	rpccaller.RPCBaseRes
	Result *types.Header `json:"result"`
}

type GetEVMHeaderByNumberRes

type GetEVMHeaderByNumberRes struct {
	rpccaller.RPCBaseRes
	Result *types.Header `json:"result"`
}

type GetWasmBlockNumRes

type GetWasmBlockNumRes struct {
	rpccaller.RPCBaseRes
	Result string `json:"result"`
}

type GetWasmHeaderByHashRes

type GetWasmHeaderByHashRes struct {
	rpccaller.RPCBaseRes
	Result *types.Header `json:"result"`
}

type GetWasmHeaderByNumberRes

type GetWasmHeaderByNumberRes struct {
	rpccaller.RPCBaseRes
	Result *types.Header `json:"result"`
}

type IssuingEVMAcceptedInst

type IssuingEVMAcceptedInst struct {
	ShardID         byte        `json:"shardId"`
	IssuingAmount   uint64      `json:"issuingAmount"`
	ReceiverAddrStr string      `json:"receiverAddrStr"`
	IncTokenID      common.Hash `json:"incTokenId"`
	TxReqID         common.Hash `json:"txReqId"`
	UniqTx          []byte      `json:"uniqETHTx"` // don't update the jsontag to make it compatible with the old shielding eth tx
	ExternalTokenID []byte      `json:"externalTokenId"`
}

func ParseEVMIssuingInstAcceptedContent

func ParseEVMIssuingInstAcceptedContent(instAcceptedContentStr string) (*IssuingEVMAcceptedInst, error)

type IssuingEVMAuroraRequest

type IssuingEVMAuroraRequest struct {
	TxHash     common.Hash
	IncTokenID common.Hash
	NetworkID  uint `json:"NetworkID,omitempty"`
	metadataCommon.MetadataBase
}

func NewIssuingEVMAuroraRequest

func NewIssuingEVMAuroraRequest(
	txHash common.Hash,
	incTokenId common.Hash,
	networkID uint,
	metaType int,
) (*IssuingEVMAuroraRequest, error)

func NewIssuingEVMAuroraRequestFromMap

func NewIssuingEVMAuroraRequestFromMap(
	data map[string]interface{},
	networkID uint,
	metatype int,
) (*IssuingEVMAuroraRequest, error)

func (*IssuingEVMAuroraRequest) BuildReqActions

func (iReq *IssuingEVMAuroraRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*IssuingEVMAuroraRequest) CalculateSize

func (iReq *IssuingEVMAuroraRequest) CalculateSize() uint64

func (IssuingEVMAuroraRequest) Hash

func (iReq IssuingEVMAuroraRequest) Hash() *common.Hash

func (IssuingEVMAuroraRequest) ValidateMetadataByItself

func (iReq IssuingEVMAuroraRequest) ValidateMetadataByItself() bool

func (IssuingEVMAuroraRequest) ValidateSanityData

func (iReq IssuingEVMAuroraRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (IssuingEVMAuroraRequest) ValidateTxWithBlockChain

func (iReq IssuingEVMAuroraRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type IssuingEVMReqAction

type IssuingEVMReqAction struct {
	Meta       IssuingEVMRequest `json:"meta"`
	TxReqID    common.Hash       `json:"txReqId"`
	EVMReceipt *types.Receipt    `json:"ethReceipt"` // don't update the jsontag to make it compatible with the old shielding eth tx
}

func ParseEVMIssuingInstContent

func ParseEVMIssuingInstContent(instContentStr string) (*IssuingEVMReqAction, error)

type IssuingEVMRequest

type IssuingEVMRequest struct {
	BlockHash  rCommon.Hash
	TxIndex    uint
	ProofStrs  []string
	IncTokenID common.Hash
	NetworkID  uint `json:"NetworkID,omitempty"`
	metadataCommon.MetadataBase
}

func NewIssuingEVMRequest

func NewIssuingEVMRequest(
	blockHash rCommon.Hash,
	txIndex uint,
	proofStrs []string,
	incTokenID common.Hash,
	networkID uint,
	metaType int,
) (*IssuingEVMRequest, error)

func NewIssuingEVMRequestFromMap

func NewIssuingEVMRequestFromMap(
	data map[string]interface{},
	networkID uint,
	metatype int,
) (*IssuingEVMRequest, error)

func NewIssuingEVMRequestFromProofData

func NewIssuingEVMRequestFromProofData(proofData EVMProof, networkID uint, incTokenID common.Hash) (*IssuingEVMRequest, error)

func (*IssuingEVMRequest) BuildReqActions

func (iReq *IssuingEVMRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*IssuingEVMRequest) CalculateSize

func (iReq *IssuingEVMRequest) CalculateSize() uint64

func (IssuingEVMRequest) Hash

func (iReq IssuingEVMRequest) Hash() *common.Hash

func (IssuingEVMRequest) ValidateMetadataByItself

func (iReq IssuingEVMRequest) ValidateMetadataByItself() bool

func (IssuingEVMRequest) ValidateSanityData

func (iReq IssuingEVMRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (IssuingEVMRequest) ValidateTxWithBlockChain

func (iReq IssuingEVMRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type IssuingEVMResAction

type IssuingEVMResAction struct {
	Meta       *IssuingEVMResponse `json:"meta"`
	IncTokenID *common.Hash        `json:"incTokenID"`
}

type IssuingEVMResponse

type IssuingEVMResponse struct {
	metadataCommon.MetadataBase
	RequestedTxID   common.Hash `json:"RequestedTxID"`
	UniqTx          []byte      `json:"UniqETHTx"`
	ExternalTokenID []byte      `json:"ExternalTokenID"`
	SharedRandom    []byte      `json:"SharedRandom,omitempty"`
}

func NewIssuingEVMResponse

func NewIssuingEVMResponse(
	requestedTxID common.Hash,
	uniqTx []byte,
	externalTokenID []byte,
	metaType int,
) *IssuingEVMResponse

func (*IssuingEVMResponse) CalculateSize

func (iRes *IssuingEVMResponse) CalculateSize() uint64

func (IssuingEVMResponse) CheckTransactionFee

func (iRes IssuingEVMResponse) CheckTransactionFee(tr metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool

func (IssuingEVMResponse) Hash

func (iRes IssuingEVMResponse) Hash() *common.Hash

func (*IssuingEVMResponse) SetSharedRandom

func (iRes *IssuingEVMResponse) SetSharedRandom(r []byte)

func (IssuingEVMResponse) ValidateMetadataByItself

func (iRes IssuingEVMResponse) ValidateMetadataByItself() bool

func (IssuingEVMResponse) ValidateSanityData

func (iRes IssuingEVMResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (IssuingEVMResponse) ValidateTxWithBlockChain

func (iRes IssuingEVMResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

func (IssuingEVMResponse) VerifyMinerCreatedTxBeforeGettingInBlock

func (iRes IssuingEVMResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever) (bool, error)

type IssuingReshieldResponse

type IssuingReshieldResponse struct {
	metadataCommon.MetadataBase
	RequestedTxID   common.Hash `json:"RequestedTxID"`
	UniqTx          []byte      `json:"UniqETHTx"`
	ExternalTokenID []byte      `json:"ExternalTokenID"`
}

func NewIssuingReshieldResponse

func NewIssuingReshieldResponse(
	requestedTxID common.Hash,
	uniqTx []byte,
	externalTokenID []byte,
	metaType int,
) *IssuingReshieldResponse

func (*IssuingReshieldResponse) CalculateSize

func (iRes *IssuingReshieldResponse) CalculateSize() uint64

func (IssuingReshieldResponse) CheckTransactionFee

func (iRes IssuingReshieldResponse) CheckTransactionFee(tr metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool

func (IssuingReshieldResponse) Hash

func (iRes IssuingReshieldResponse) Hash() *common.Hash

func (IssuingReshieldResponse) ValidateMetadataByItself

func (iRes IssuingReshieldResponse) ValidateMetadataByItself() bool

func (IssuingReshieldResponse) ValidateSanityData

func (iRes IssuingReshieldResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (IssuingReshieldResponse) ValidateTxWithBlockChain

func (iRes IssuingReshieldResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

func (IssuingReshieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock

func (iRes IssuingReshieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever) (bool, error)

type IssuingWasmAcceptedInst

type IssuingWasmAcceptedInst struct {
	ShardID         byte        `json:"shardId"`
	IssuingAmount   uint64      `json:"issuingAmount"`
	ReceiverAddrStr string      `json:"receiverAddrStr"`
	IncTokenID      common.Hash `json:"incTokenId"`
	TxReqID         common.Hash `json:"txReqId"`
	UniqTx          []byte      `json:"uniqWasmTx"` // don't update the jsontag to make it compatible with the old shielding Wasm tx
	ExternalTokenID []byte      `json:"externalTokenId"`
}

func ParseWasmIssuingInstAcceptedContent

func ParseWasmIssuingInstAcceptedContent(instAcceptedContentStr string) (*IssuingWasmAcceptedInst, error)

type IssuingWasmReqAction

type IssuingWasmReqAction struct {
	Meta          IssuingWasmRequest `json:"meta"`
	TxReqID       common.Hash        `json:"txReqId"`
	TokenId       string             `json:"tokenId"`
	IncognitoAddr string             `json:"incognitoAddr"`
	Amount        uint64             `json:"amount"`
	ContractId    string             `json:"contractId"`
}

func ParseWasmIssuingInstContent

func ParseWasmIssuingInstContent(instContentStr string) (*IssuingWasmReqAction, error)

type IssuingWasmRequest

type IssuingWasmRequest struct {
	TxHash     string
	IncTokenID common.Hash
	metadataCommon.MetadataBase
}

func NewIssuingWasmRequest

func NewIssuingWasmRequest(
	txHash string,
	incTokenID common.Hash,
	metaType int,
) (*IssuingWasmRequest, error)

func NewIssuingWasmRequestFromMap

func NewIssuingWasmRequestFromMap(
	data map[string]interface{},
	metatype int,
) (*IssuingWasmRequest, error)

func (*IssuingWasmRequest) BuildReqActions

func (iReq *IssuingWasmRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*IssuingWasmRequest) CalculateSize

func (iReq *IssuingWasmRequest) CalculateSize() uint64

func (IssuingWasmRequest) Hash

func (iReq IssuingWasmRequest) Hash() *common.Hash

func (IssuingWasmRequest) ValidateMetadataByItself

func (iReq IssuingWasmRequest) ValidateMetadataByItself() bool

func (IssuingWasmRequest) ValidateSanityData

func (iReq IssuingWasmRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (IssuingWasmRequest) ValidateTxWithBlockChain

func (iReq IssuingWasmRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type ModifyBridgeAggParamContentInst

type ModifyBridgeAggParamContentInst struct {
	PercentFeeWithDec uint64      `json:"PercentFeeWithDec"`
	TxReqID           common.Hash `json:"TxReqID"`
}

type ModifyBridgeAggParamReq

type ModifyBridgeAggParamReq struct {
	metadataCommon.MetadataBaseWithSignature
	PercentFeeWithDec uint64 `json:"PercentFeeWithDec"`
}

func NewModifyBridgeAggParamReq

func NewModifyBridgeAggParamReq() *ModifyBridgeAggParamReq

func NewModifyBridgeAggParamReqWithValue

func NewModifyBridgeAggParamReqWithValue(percentFeeWithDec uint64) *ModifyBridgeAggParamReq

func (*ModifyBridgeAggParamReq) BuildReqActions

func (request *ModifyBridgeAggParamReq) BuildReqActions(
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	shardID byte,
	shardHeight uint64,
) ([][]string, error)

func (*ModifyBridgeAggParamReq) CalculateSize

func (request *ModifyBridgeAggParamReq) CalculateSize() uint64

func (*ModifyBridgeAggParamReq) Hash

func (request *ModifyBridgeAggParamReq) Hash() *common.Hash

func (*ModifyBridgeAggParamReq) HashWithoutSig

func (request *ModifyBridgeAggParamReq) HashWithoutSig() *common.Hash

func (*ModifyBridgeAggParamReq) ValidateMetadataByItself

func (request *ModifyBridgeAggParamReq) ValidateMetadataByItself() bool

func (*ModifyBridgeAggParamReq) ValidateSanityData

func (request *ModifyBridgeAggParamReq) ValidateSanityData(
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	beaconHeight uint64,
	tx metadataCommon.Transaction,
) (bool, bool, error)

func (*ModifyBridgeAggParamReq) ValidateTxWithBlockChain

func (request *ModifyBridgeAggParamReq) ValidateTxWithBlockChain(
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	shardID byte,
	transactionStateDB *statedb.StateDB,
) (bool, error)

type NormalResult

type NormalResult struct {
	Result interface{} `json:"result"`
}

type Proof

type Proof interface {
}

type RejectedBurnForCallRequest

type RejectedBurnForCallRequest struct {
	BurnTokenID common.Hash         `json:"BurnTokenID"`
	Amount      uint64              `json:"Amount"`
	Receiver    privacy.OTAReceiver `json:"Receiver"`
}

type RejectedConvertTokenToUnifiedToken

type RejectedConvertTokenToUnifiedToken struct {
	TokenID  common.Hash         `json:"TokenID"`
	Amount   uint64              `json:"Amount"`
	Receiver privacy.OTAReceiver `json:"Receiver"`
}

type RejectedUnshieldRequest

type RejectedUnshieldRequest struct {
	UnifiedTokenID common.Hash         `json:"UnifiedTokenID"`
	Amount         uint64              `json:"Amount"`
	Receiver       privacy.OTAReceiver `json:"Receiver"`
}

type ShieldRequest

type ShieldRequest struct {
	Data           []ShieldRequestData `json:"Data"`
	UnifiedTokenID common.Hash         `json:"UnifiedTokenID"`
	metadataCommon.MetadataBase
}

func NewShieldRequest

func NewShieldRequest() *ShieldRequest

func NewShieldRequestWithValue

func NewShieldRequestWithValue(
	data []ShieldRequestData, unifiedTokenID common.Hash,
) *ShieldRequest

func (*ShieldRequest) BuildReqActions

func (request *ShieldRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*ShieldRequest) CalculateSize

func (request *ShieldRequest) CalculateSize() uint64

func (*ShieldRequest) Hash

func (request *ShieldRequest) Hash() *common.Hash

func (*ShieldRequest) ValidateMetadataByItself

func (request *ShieldRequest) ValidateMetadataByItself() bool

func (*ShieldRequest) ValidateSanityData

func (request *ShieldRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (*ShieldRequest) ValidateTxWithBlockChain

func (request *ShieldRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type ShieldRequestData

type ShieldRequestData struct {
	Proof      []byte      `json:"Proof"`
	NetworkID  uint8       `json:"NetworkID"`
	IncTokenID common.Hash `json:"IncTokenID"`
}

type ShieldResponse

type ShieldResponse struct {
	metadataCommon.MetadataBase
	RequestedTxID common.Hash          `json:"RequestedTxID"`
	ShieldAmount  uint64               `json:"ShieldAmount"`
	Reward        uint64               `json:"Reward"`
	Data          []ShieldResponseData `json:"Data"`
	SharedRandom  []byte               `json:"SharedRandom,omitempty"`
}

func NewShieldResponse

func NewShieldResponse(metaType int) *ShieldResponse

func NewShieldResponseWithValue

func NewShieldResponseWithValue(
	metaType int, shieldAmount, reward uint64, data []ShieldResponseData, requestedTxID common.Hash, sharedRandom []byte,
) *ShieldResponse

func (*ShieldResponse) CalculateSize

func (response *ShieldResponse) CalculateSize() uint64

func (*ShieldResponse) Hash

func (response *ShieldResponse) Hash() *common.Hash

func (*ShieldResponse) SetSharedRandom

func (response *ShieldResponse) SetSharedRandom(r []byte)

func (*ShieldResponse) ValidateMetadataByItself

func (response *ShieldResponse) ValidateMetadataByItself() bool

func (*ShieldResponse) ValidateSanityData

func (response *ShieldResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (*ShieldResponse) ValidateTxWithBlockChain

func (response *ShieldResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

func (ShieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock

func (response ShieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever) (bool, error)

type ShieldResponseData

type ShieldResponseData struct {
	ExternalTokenID []byte      `json:"ExternalTokenID"`
	UniqTx          []byte      `json:"UniqTx"`
	IncTokenID      common.Hash `json:"IncTokenID"`
}

type UnshieldRequest

type UnshieldRequest struct {
	UnifiedTokenID common.Hash           `json:"UnifiedTokenID"`
	Data           []UnshieldRequestData `json:"Data"`
	Receiver       privacy.OTAReceiver   `json:"Receiver"`
	IsDepositToSC  bool                  `json:"IsDepositToSC"`
	metadataCommon.MetadataBase
}

func NewUnshieldRequest

func NewUnshieldRequest() *UnshieldRequest

func NewUnshieldRequestWithValue

func NewUnshieldRequestWithValue(
	unifiedTokenID common.Hash, data []UnshieldRequestData, receiver privacy.OTAReceiver, isDepositToSC bool,
) *UnshieldRequest

func (*UnshieldRequest) BuildReqActions

func (request *UnshieldRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, shardHeight uint64) ([][]string, error)

func (*UnshieldRequest) CalculateSize

func (request *UnshieldRequest) CalculateSize() uint64

func (*UnshieldRequest) GetOTADeclarations

func (request *UnshieldRequest) GetOTADeclarations() []metadataCommon.OTADeclaration

func (*UnshieldRequest) Hash

func (request *UnshieldRequest) Hash() *common.Hash

func (*UnshieldRequest) ValidateMetadataByItself

func (request *UnshieldRequest) ValidateMetadataByItself() bool

func (*UnshieldRequest) ValidateSanityData

func (request *UnshieldRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)

func (*UnshieldRequest) ValidateTxWithBlockChain

func (request *UnshieldRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)

type UnshieldRequestData

type UnshieldRequestData struct {
	IncTokenID        common.Hash `json:"IncTokenID"`
	BurningAmount     uint64      `json:"BurningAmount"`
	MinExpectedAmount uint64      `json:"MinExpectedAmount"`
	RemoteAddress     string      `json:"RemoteAddress"`
}

type UnshieldResponse

type UnshieldResponse struct {
	metadataCommon.MetadataBase
	Status        string      `json:"Status"`
	RequestedTxID common.Hash `json:"RequestedTxID"`
}

func NewUnshieldResponse

func NewUnshieldResponse() *UnshieldResponse

func NewUnshieldResponseWithValue

func NewUnshieldResponseWithValue(
	status string, requestedTxID common.Hash,
) *UnshieldResponse

func (*UnshieldResponse) CalculateSize

func (response *UnshieldResponse) CalculateSize() uint64

func (*UnshieldResponse) CheckTransactionFee

func (response *UnshieldResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool

func (*UnshieldResponse) Hash

func (response *UnshieldResponse) Hash() *common.Hash

func (*UnshieldResponse) ValidateMetadataByItself

func (response *UnshieldResponse) ValidateMetadataByItself() bool

func (*UnshieldResponse) ValidateSanityData

func (response *UnshieldResponse) ValidateSanityData(
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	beaconHeight uint64,
	tx metadataCommon.Transaction,
) (bool, bool, error)

func (*UnshieldResponse) ValidateTxWithBlockChain

func (response *UnshieldResponse) ValidateTxWithBlockChain(
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
	shardID byte,
	transactionStateDB *statedb.StateDB,
) (bool, error)

func (*UnshieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock

func (response *UnshieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock(
	mintData *metadataCommon.MintData,
	shardID byte,
	tx metadataCommon.Transaction,
	chainRetriever metadataCommon.ChainRetriever,
	ac *metadataCommon.AccumulatedValues,
	shardViewRetriever metadataCommon.ShardViewRetriever,
	beaconViewRetriever metadataCommon.BeaconViewRetriever,
) (bool, error)

Jump to

Keyboard shortcuts

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