Documentation
¶
Index ¶
- Constants
- func ExtractIssueEVMDataFromReceipt(txReceipt *types.Receipt, contractAddress string, prefix string, ...) (*big.Int, string, []byte, error)
- func FindExternalTokenID(stateDB *statedb.StateDB, incTokenID common.Hash, prefix string) ([]byte, error)
- func GetEVMInfoByMetadataType(metadataType int, networkID uint) ([]string, string, int, bool, error)
- func GetNetworkTypeByNetworkID(networkID uint8) (uint, error)
- func GetShardIDFromPaymentAddress(paymentAddress key.PaymentAddress) (byte, error)
- func GetShardIDFromPaymentAddressStr(addressStr string) (byte, error)
- func GetWasmInfoByMetadataType(metadataType int) ([]string, string, int, string, error)
- func IsBridgeAggMetaType(metaType int) bool
- func IsBridgeTxHashUsedInBlock(uniqTx []byte, uniqTxsUsed [][]byte) bool
- func IsBurningConfirmMetaType(metaType int) bool
- func MarshalActionDataForShieldEVMReq(txReceipt *types.Receipt) ([]byte, error)
- func ParseEVMLogDataByEventName(log *types.Log, ethContractAddressStr string, name string) (map[string]interface{}, error)
- func PickAndParseLogMapFromReceiptByContractAddr(constructedReceipt *types.Receipt, ethContractAddressStr string, ...) (map[string]interface{}, error)
- func TrimNetworkPrefix(fullTokenID []byte, prefix string) ([]byte, error)
- func UnmarshalActionDataForShieldEVMReq(data []byte) (*types.Receipt, error)
- func VerifyProofAndParseAuroraReceipt(txHash common.Hash, auroraHosts []string, nearHosts []string, ...) (*types.Receipt, error)
- func VerifyProofAndParseEVMReceipt(blockHash rCommon.Hash, txIndex uint, proofStrs []string, hosts []string, ...) (*types.Receipt, error)
- func VerifyTokenPair(stateDBs map[int]*statedb.StateDB, ac *metadataCommon.AccumulatedValues, ...) error
- func VerifyWasmData(stateDB *statedb.StateDB, listTxUsed [][]byte, ...) (byte, error)
- func VerifyWasmShieldTxId(txHash string, hosts []string, minWasmConfirmationBlocks int, ...) (string, string, uint64, string, error)
- type AcceptedConvertTokenToUnifiedToken
- type AcceptedInstShieldRequest
- type AcceptedReshieldRequest
- type AcceptedShieldRequestData
- type AcceptedUnshieldRequestInst
- type AddToken
- type BurnForCallRequest
- func (request *BurnForCallRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (bReq *BurnForCallRequest) CalculateSize() uint64
- func (bReq *BurnForCallRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (bReq BurnForCallRequest) Hash() *common.Hash
- func (bReq BurnForCallRequest) TotalBurningAmount() (uint64, error)
- func (bReq BurnForCallRequest) ValidateMetadataByItself() bool
- func (bReq BurnForCallRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (bReq BurnForCallRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type BurnForCallRequestData
- type BurnForCallResponse
- type BurningPRVRequest
- func (bReq *BurningPRVRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (bReq *BurningPRVRequest) CalculateSize() uint64
- func (bReq *BurningPRVRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (bReq BurningPRVRequest) Hash() *common.Hash
- func (bReq BurningPRVRequest) ValidateMetadataByItself() bool
- func (bReq BurningPRVRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (bReq BurningPRVRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type BurningRequest
- func (bReq *BurningRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (bReq *BurningRequest) CalculateSize() uint64
- func (bReq BurningRequest) Hash() *common.Hash
- func (bReq BurningRequest) HashWithoutSig() *common.Hash
- func (bReq BurningRequest) ValidateMetadataByItself() bool
- func (bReq BurningRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (bReq BurningRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type ConvertTokenToUnifiedTokenRequest
- func (request *ConvertTokenToUnifiedTokenRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (request *ConvertTokenToUnifiedTokenRequest) CalculateSize() uint64
- func (request *ConvertTokenToUnifiedTokenRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *ConvertTokenToUnifiedTokenRequest) Hash() *common.Hash
- func (request *ConvertTokenToUnifiedTokenRequest) ValidateMetadataByItself() bool
- func (request *ConvertTokenToUnifiedTokenRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *ConvertTokenToUnifiedTokenRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type ConvertTokenToUnifiedTokenResponse
- func (response *ConvertTokenToUnifiedTokenResponse) CalculateSize() uint64
- func (response *ConvertTokenToUnifiedTokenResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *ConvertTokenToUnifiedTokenResponse) Hash() *common.Hash
- func (response *ConvertTokenToUnifiedTokenResponse) ValidateMetadataByItself() bool
- func (response *ConvertTokenToUnifiedTokenResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *ConvertTokenToUnifiedTokenResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *ConvertTokenToUnifiedTokenResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type DepositEventData
- type EVMInfo
- type EVMProof
- type GetEVMBlockNumRes
- type GetEVMHeaderByHashRes
- type GetEVMHeaderByNumberRes
- type GetWasmBlockNumRes
- type GetWasmHeaderByHashRes
- type GetWasmHeaderByNumberRes
- type IssuingEVMAcceptedInst
- type IssuingEVMAuroraRequest
- func (iReq *IssuingEVMAuroraRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (iReq *IssuingEVMAuroraRequest) CalculateSize() uint64
- func (iReq IssuingEVMAuroraRequest) Hash() *common.Hash
- func (iReq IssuingEVMAuroraRequest) ValidateMetadataByItself() bool
- func (iReq IssuingEVMAuroraRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (iReq IssuingEVMAuroraRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type IssuingEVMReqAction
- type IssuingEVMRequest
- func NewIssuingEVMRequest(blockHash rCommon.Hash, txIndex uint, proofStrs []string, ...) (*IssuingEVMRequest, error)
- func NewIssuingEVMRequestFromMap(data map[string]interface{}, networkID uint, metatype int) (*IssuingEVMRequest, error)
- func NewIssuingEVMRequestFromProofData(proofData EVMProof, networkID uint, incTokenID common.Hash) (*IssuingEVMRequest, error)
- func (iReq *IssuingEVMRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (iReq *IssuingEVMRequest) CalculateSize() uint64
- func (iReq IssuingEVMRequest) Hash() *common.Hash
- func (iReq IssuingEVMRequest) ValidateMetadataByItself() bool
- func (iReq IssuingEVMRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (iReq IssuingEVMRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type IssuingEVMResAction
- type IssuingEVMResponse
- func (iRes *IssuingEVMResponse) CalculateSize() uint64
- func (iRes IssuingEVMResponse) CheckTransactionFee(tr metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (iRes IssuingEVMResponse) Hash() *common.Hash
- func (iRes *IssuingEVMResponse) SetSharedRandom(r []byte)
- func (iRes IssuingEVMResponse) ValidateMetadataByItself() bool
- func (iRes IssuingEVMResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (iRes IssuingEVMResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (iRes IssuingEVMResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type IssuingReshieldResponse
- func (iRes *IssuingReshieldResponse) CalculateSize() uint64
- func (iRes IssuingReshieldResponse) CheckTransactionFee(tr metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (iRes IssuingReshieldResponse) Hash() *common.Hash
- func (iRes IssuingReshieldResponse) ValidateMetadataByItself() bool
- func (iRes IssuingReshieldResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (iRes IssuingReshieldResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (iRes IssuingReshieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type IssuingWasmAcceptedInst
- type IssuingWasmReqAction
- type IssuingWasmRequest
- func (iReq *IssuingWasmRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (iReq *IssuingWasmRequest) CalculateSize() uint64
- func (iReq IssuingWasmRequest) Hash() *common.Hash
- func (iReq IssuingWasmRequest) ValidateMetadataByItself() bool
- func (iReq IssuingWasmRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (iReq IssuingWasmRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type ModifyBridgeAggParamContentInst
- type ModifyBridgeAggParamReq
- func (request *ModifyBridgeAggParamReq) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (request *ModifyBridgeAggParamReq) CalculateSize() uint64
- func (request *ModifyBridgeAggParamReq) Hash() *common.Hash
- func (request *ModifyBridgeAggParamReq) HashWithoutSig() *common.Hash
- func (request *ModifyBridgeAggParamReq) ValidateMetadataByItself() bool
- func (request *ModifyBridgeAggParamReq) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *ModifyBridgeAggParamReq) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type NormalResult
- type Proof
- type RejectedBurnForCallRequest
- type RejectedConvertTokenToUnifiedToken
- type RejectedUnshieldRequest
- type ShieldRequest
- func (request *ShieldRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (request *ShieldRequest) CalculateSize() uint64
- func (request *ShieldRequest) Hash() *common.Hash
- func (request *ShieldRequest) ValidateMetadataByItself() bool
- func (request *ShieldRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *ShieldRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type ShieldRequestData
- type ShieldResponse
- func (response *ShieldResponse) CalculateSize() uint64
- func (response *ShieldResponse) Hash() *common.Hash
- func (response *ShieldResponse) SetSharedRandom(r []byte)
- func (response *ShieldResponse) ValidateMetadataByItself() bool
- func (response *ShieldResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *ShieldResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response ShieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type ShieldResponseData
- type UnshieldRequest
- func (request *UnshieldRequest) BuildReqActions(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) ([][]string, error)
- func (request *UnshieldRequest) CalculateSize() uint64
- func (request *UnshieldRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *UnshieldRequest) Hash() *common.Hash
- func (request *UnshieldRequest) ValidateMetadataByItself() bool
- func (request *UnshieldRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *UnshieldRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type UnshieldRequestData
- type UnshieldResponse
- func (response *UnshieldResponse) CalculateSize() uint64
- func (response *UnshieldResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *UnshieldResponse) Hash() *common.Hash
- func (response *UnshieldResponse) ValidateMetadataByItself() bool
- func (response *UnshieldResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *UnshieldResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *UnshieldResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
Constants ¶
View Source
const ( LegacyTxType = iota AccessListTxType DynamicFeeTxType )
Variables ¶
This section is empty.
Functions ¶
func FindExternalTokenID ¶
func GetShardIDFromPaymentAddress ¶
func GetShardIDFromPaymentAddress(paymentAddress key.PaymentAddress) (byte, error)
func IsBridgeAggMetaType ¶
func TrimNetworkPrefix ¶
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 VerifyTokenPair ¶
func VerifyTokenPair( stateDBs map[int]*statedb.StateDB, ac *metadataCommon.AccumulatedValues, incTokenID common.Hash, token []byte, ) error
func VerifyWasmData ¶
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 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 (*AddToken) StringSlice ¶
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 (request *ConvertTokenToUnifiedTokenRequest) Hash() *common.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 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 (response *ConvertTokenToUnifiedTokenResponse) Hash() *common.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
}
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 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 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 NewIssuingEVMRequestFromMap ¶
func NewIssuingEVMRequestFromMap( data map[string]interface{}, networkID uint, metatype int, ) (*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"`
}
func NewIssuingEVMResponse ¶
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 (*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 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 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 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 ShieldResponse ¶
type ShieldResponse struct {
metadataCommon.MetadataBase
RequestedTxID common.Hash `json:"RequestedTxID"`
ShieldAmount uint64 `json:"ShieldAmount"`
Reward uint64 `json:"Reward"`
Data []ShieldResponseData `json:"Data"`
}
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 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 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)
Source Files
¶
- add_token.go
- burn_for_call_request.go
- burn_prv_request.go
- burning_request.go
- convert_token_to_unified_token_request.go
- convert_token_to_unified_token_response.go
- interface.go
- issuing_evm_aurora_request.go
- issuing_evm_request.go
- issuing_evm_response.go
- issuing_wasm_request.go
- modify_param.go
- reshield_response.go
- shield_request.go
- shield_response.go
- unshield_request.go
- unshield_response.go
- utils.go
Click to show internal directories.
Click to hide internal directories.