Documentation ¶
Index ¶
- Variables
- func ConvertIncPBNBAmountToExternalBNBAmount(incPBNBAmount int64) int64
- type PortalBNBTokenProcessor
- func (p PortalBNBTokenProcessor) GetChainID() string
- func (p PortalBNBTokenProcessor) GetExpectedMemoForPorting(portingID string) string
- func (p PortalBNBTokenProcessor) GetExpectedMemoForRedeem(redeemID string, custodianAddress string) string
- func (p PortalBNBTokenProcessor) GetMinTokenAmount() uint64
- func (p PortalBNBTokenProcessor) IsValidRemoteAddress(address string, bcr metadata.ChainRetriever) (bool, error)
- func (p PortalBNBTokenProcessor) ParseAndVerifyProof(proof string, bc metadata.ChainRetriever, expectedMemo string, ...) (bool, error)
- type PortalBTCTokenProcessor
- func (p PortalBTCTokenProcessor) GetChainID() string
- func (p PortalBTCTokenProcessor) GetExpectedMemoForPorting(portingID string) string
- func (p PortalBTCTokenProcessor) GetExpectedMemoForRedeem(redeemID string, custodianIncAddress string) string
- func (p PortalBTCTokenProcessor) GetMinTokenAmount() uint64
- func (p PortalBTCTokenProcessor) IsValidRemoteAddress(address string, bcr metadata.ChainRetriever) (bool, error)
- func (p PortalBTCTokenProcessor) ParseAndVerifyProof(proof string, bc metadata.ChainRetriever, expectedMemo string, ...) (bool, error)
- type PortalTokenLoggerV3
- type PortalTokenProcessorV3
- type PortalTokenV3
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = PortalTokenLoggerV3{}
Global instant to use
Functions ¶
func ConvertIncPBNBAmountToExternalBNBAmount ¶
ConvertIncPBNBAmountToExternalBNBAmount converts amount in inc chain (decimal 9) to amount in bnb chain (decimal 8)
Types ¶
type PortalBNBTokenProcessor ¶
type PortalBNBTokenProcessor struct {
*PortalTokenV3
}
func (PortalBNBTokenProcessor) GetChainID ¶
func (p PortalBNBTokenProcessor) GetChainID() string
func (PortalBNBTokenProcessor) GetExpectedMemoForPorting ¶
func (p PortalBNBTokenProcessor) GetExpectedMemoForPorting(portingID string) string
func (PortalBNBTokenProcessor) GetExpectedMemoForRedeem ¶
func (p PortalBNBTokenProcessor) GetExpectedMemoForRedeem(redeemID string, custodianAddress string) string
func (PortalBNBTokenProcessor) GetMinTokenAmount ¶
func (p PortalBNBTokenProcessor) GetMinTokenAmount() uint64
func (PortalBNBTokenProcessor) IsValidRemoteAddress ¶
func (p PortalBNBTokenProcessor) IsValidRemoteAddress(address string, bcr metadata.ChainRetriever) (bool, error)
func (PortalBNBTokenProcessor) ParseAndVerifyProof ¶
func (p PortalBNBTokenProcessor) ParseAndVerifyProof( proof string, bc metadata.ChainRetriever, expectedMemo string, expectedPaymentInfos map[string]uint64) (bool, error)
type PortalBTCTokenProcessor ¶
type PortalBTCTokenProcessor struct {
*PortalTokenV3
}
func (PortalBTCTokenProcessor) GetChainID ¶
func (p PortalBTCTokenProcessor) GetChainID() string
func (PortalBTCTokenProcessor) GetExpectedMemoForPorting ¶
func (p PortalBTCTokenProcessor) GetExpectedMemoForPorting(portingID string) string
func (PortalBTCTokenProcessor) GetExpectedMemoForRedeem ¶
func (p PortalBTCTokenProcessor) GetExpectedMemoForRedeem(redeemID string, custodianIncAddress string) string
func (PortalBTCTokenProcessor) GetMinTokenAmount ¶
func (p PortalBTCTokenProcessor) GetMinTokenAmount() uint64
func (PortalBTCTokenProcessor) IsValidRemoteAddress ¶
func (p PortalBTCTokenProcessor) IsValidRemoteAddress(address string, bcr metadata.ChainRetriever) (bool, error)
func (PortalBTCTokenProcessor) ParseAndVerifyProof ¶
func (p PortalBTCTokenProcessor) ParseAndVerifyProof( proof string, bc metadata.ChainRetriever, expectedMemo string, expectedPaymentInfos map[string]uint64) (bool, error)
type PortalTokenLoggerV3 ¶
type PortalTokenLoggerV3 struct {
// contains filtered or unexported fields
}
func (*PortalTokenLoggerV3) Init ¶
func (portalTokenLogger *PortalTokenLoggerV3) Init(inst common.Logger)
type PortalTokenProcessorV3 ¶
type PortalTokenProcessorV3 interface { IsValidRemoteAddress(address string, bcr metadata.ChainRetriever) (bool, error) GetChainID() string GetMinTokenAmount() uint64 GetExpectedMemoForPorting(portingID string) string GetExpectedMemoForRedeem(redeemID string, custodianIncAddress string) string ParseAndVerifyProof( proof string, bc metadata.ChainRetriever, expectedMemo string, expectedPaymentInfos map[string]uint64) (bool, error) }
type PortalTokenV3 ¶
type PortalTokenV3 struct { ChainID string MinTokenAmount uint64 // minimum amount for porting/redeem }
set MinTokenAmount to avoid attacking with amount is less than smallest unit of cryptocurrency such as satoshi in BTC
func (PortalTokenV3) GetExpectedMemoForPorting ¶
func (p PortalTokenV3) GetExpectedMemoForPorting(portingID string) string
func (PortalTokenV3) GetExpectedMemoForRedeem ¶
func (p PortalTokenV3) GetExpectedMemoForRedeem(redeemID string, custodianAddress string) string
Click to show internal directories.
Click to hide internal directories.