submitproof

package
v0.0.0-...-c0e0e34 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MqSubmitTx = "submitproof"
	MqWatchTx  = "watchsubmit"
)
View Source
const (
	TxTypeRedeposit   = "redeposit"
	TxTypeShielding   = "shielding"
	TxTypeUnshielding = "unshielding"
)
View Source
const (
	SHIELD_TX_TOPIC   = "shieldtx_topic"
	UNSHIELD_TX_TOPIC = "unshieldtx_topic"
	PAPP_TX_TOPIC     = "papptx_topic"

	INTERSWAP_TX_TOPIC = "interswaptx_topic"
)
View Source
const (
	PappSubmitIncTask       = "papp_submit_inc_task"
	PappSubmitExtTask       = "papp_submit_ext_task"
	PappSubmitFeeRefundTask = "papp_submit_refundfee_task"
)
View Source
const (
	UnshieldSubmitIncTask       = "unshield_submit_inc_task"
	UnshieldSubmitExtTask       = "unshield_submit_ext_task"
	UnshieldSubmitFeeRefundTask = "unshield_submit_refundfee_task"
)
View Source
const (
	INC_NetworkID = iota
	ETH_NetworkID = 1
	BSC_NetworkID = 2
	PLG_NetworkID = 3
	FTM_NetworkID = 4
)
View Source
const (
	ShieldErrorPrefix  = "error-shield-"
	ShieldStatusPrefix = "status-shield-"
)
View Source
const ADDRESS_0 = "0x0000000000000000000000000000000000000000"
View Source
const Erc20ABINoIndex = "" /* 256-byte string literal not displayed */
View Source
const (
	EthNativeAddrStr = "0x0000000000000000000000000000000000000000"
)
View Source
const IERC20ABI = "" /* 2418-byte string literal not displayed */

IERC20ABI is the input ABI used to generate the binding from.

View Source
const (
	ProofAlreadySubmitError = "proof already submitted"
)

Variables

This section is empty.

Functions

func ProcessPappTxRequest

func ProcessPappTxRequest(ctx context.Context, m *pubsub.Message)

func ProcessShieldRequest

func ProcessShieldRequest(ctx context.Context, m *pubsub.Message)

func ProcessUnshieldTxRequest

func ProcessUnshieldTxRequest(ctx context.Context, m *pubsub.Message)

func PublishMsgInterswapTx

func PublishMsgInterswapTx(
	task interswap.InterswapSubmitTxTask,
) (interface{}, error)

func StartAssigner

func StartAssigner(cfg common.Config, serviceID uuid.UUID) error

func StartWatcher

func StartWatcher(keylist []string, cfg wcommon.Config, serviceID uuid.UUID) error

func StartWorker

func StartWorker(keylist []string, cfg wcommon.Config, serviceID uuid.UUID) error

func SubmitOutChainTx

func SubmitOutChainTx(incTxHash string, network string, isUnifiedToken bool, retry bool, txType int) (interface{}, error)

func SubmitPappTx

func SubmitPappTx(txhash string, rawTxData []byte, isPRVTx bool, feeToken string, feeAmount uint64, pfeeAmount uint64, burntToken string, burntAmount uint64, swapInfo *common.PappSwapInfo, isUnifiedToken bool, networks []string, refundFeeOTA string, refundFeeAddress string, userAgent string, txType int) (interface{}, error)

func SubmitShieldProof

func SubmitShieldProof(txhash string, networkID int, tokenID string, txtype string, retry bool) (interface{}, error)

func SubmitTxFeeRefund

func SubmitTxFeeRefund(incReqTx, refundOTA, paymentAddress, token string, amount uint64, isPrivacyFeeRefund bool) (interface{}, error)

func SubmitUnshieldTx

func SubmitUnshieldTx(txhash string, rawTxData []byte, isPRVTx bool, feeToken string, feeAmount uint64, pfeeAmount uint64, tokenID, uTokenID string, burntAmount uint64, isUnifiedToken bool, externalAddress string, networks []string, refundFeeOTA string, refundFeeAddress string, userAgent string) (interface{}, error)

Types

type EVMProofResult

type EVMProofResult struct {
	Proof *incclient.EVMDepositProof
}

type NormalResult

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

type Receipt

type Receipt struct {
	Result *types.Receipt `json:"result"`
}

type SubmitPappTxTask

type SubmitPappTxTask struct {
	TxHash           string
	TxRawData        []byte
	IsPRVTx          bool
	IsUnifiedToken   bool
	FeeToken         string
	FeeAmount        uint64
	PFeeAmount       uint64
	FeeRefundOTA     string
	FeeRefundAddress string
	BurntToken       string
	BurntAmount      uint64
	PappSwapInfo     *common.PappSwapInfo
	Networks         []string
	Time             time.Time
	UserAgent        string
	TxType           int
}

type SubmitProofConsumer

type SubmitProofConsumer struct {
	UseKey    string
	NetworkID int
}

type SubmitProofOutChainTask

type SubmitProofOutChainTask struct {
	IncTxhash      string
	Network        string
	IsUnifiedToken bool
	IsRetry        bool
	Type           int
	Time           time.Time
}

type SubmitProofShieldTask

type SubmitProofShieldTask struct {
	TxHash    string
	NetworkID int
	TokenID   string
	Metatype  string
}

type SubmitRefundFeeTask

type SubmitRefundFeeTask struct {
	IncReqTx string
	Token    string
	OTA      string
	// OTASS          string
	IsPrivacyFeeRefund bool
	PaymentAddress     string
	Amount             uint64
	Time               time.Time
}

type SubmitUnshieldTxTask

type SubmitUnshieldTxTask struct {
	TxHash           string
	TxRawData        []byte
	IsPRVTx          bool
	IsUnifiedToken   bool
	FeeToken         string
	FeeAmount        uint64
	PFeeAmount       uint64
	FeeRefundOTA     string
	FeeRefundAddress string
	Token            string
	UToken           string
	BurntAmount      uint64
	ExternalAddress  string
	Networks         []string
	Time             time.Time
	UserAgent        string
}

Jump to

Keyboard shortcuts

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