common

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// status of porting processing - used to store db
	PortalPortingReqSuccessStatus    = 1
	PortalPortingReqWaitingStatus    = 2
	PortalPortingReqExpiredStatus    = 3
	PortalPortingReqLiquidatedStatus = 4

	// status of redeem processing  - used to store db
	PortalRedeemReqSuccessStatus                = 1
	PortalRedeemReqWaitingStatus                = 2
	PortalRedeemReqMatchedStatus                = 3
	PortalRedeemReqLiquidatedStatus             = 4
	PortalRedeemReqCancelledByLiquidationStatus = 5

	// status of portal request - used to store db
	PortalRequestRejectedStatus = 0
	PortalRequestAcceptedStatus = 1

	// status of portal request - used to append to beacon instructions
	PortalRequestAcceptedChainStatus = "accepted"
	PortalRequestRejectedChainStatus = "rejected"
	PortalRequestRefundChainStatus   = "refund" // beacon reject portal request and refund PRV/PToken to requester

	PortalProducerInstSuccessChainStatus = "success"
	PortalProducerInstFailedChainStatus  = "failed"

	// cancel redeem request by liquidation
	PortalRedeemReqCancelledByLiquidationChainStatus = "cancelled"
)
View Source
const ETHChainName = "eth"
View Source
const PortalBNBIDStr = "6abd698ea7ddd1f98b1ecaaddab5db0453b8363ff092f0d8d7d4c6b1155fb693"
View Source
const PortalBTCIDStr = "ef5947f70ead81a76a53c7c8b7317dd5245510c665d3a13921dc9a581188728b"
View Source
const (
	UnexpectedError = iota
)

Variables

View Source
var ErrCodeMessage = map[int]struct {
	Code    int
	Message string
}{
	UnexpectedError: {-1, "Unexpected error"},
}

Global instant to use

View Source
var PortalSupportedIncTokenIDs = []string{
	PortalBTCIDStr,
	PortalBNBIDStr,
}

Functions

This section is empty.

Types

type PortalCommonError

type PortalCommonError struct {
	Code    int    // The code to send with reject messages
	Message string // Human readable message of the issue
	Err     error
}

func NewPortalCommonError

func NewPortalCommonError(key int, err error, params ...interface{}) *PortalCommonError

func (PortalCommonError) Error

func (e PortalCommonError) Error() string

Error satisfies the error interface and prints human-readable errors.

type PortalCommonLoggerV3

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

func (*PortalCommonLoggerV3) Init

func (portalCommonLogger *PortalCommonLoggerV3) Init(inst common.Logger)

Jump to

Keyboard shortcuts

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