Documentation ¶
Overview ¶
Package quote contains the quote service
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DLL ¶
type DLL struct {
// contains filtered or unexported fields
}
DLL represents a doubly linked list.
func (*DLL) ClearStale ¶
func (dll *DLL) ClearStale()
ClearStale clears any stale items from the list.
func (*DLL) NewTimestamp ¶
NewTimestamp is just for testing purposes.
func (*DLL) RemoveNode ¶
RemoveNode removes a given node from the list.
type DLLNode ¶
type DLLNode struct { Value *big.Int // exported for tests // contains filtered or unexported fields }
DLLNode represents a node in the doubly linked list.
type IBridgeReqHandler ¶
type IBridgeReqHandler interface { GetAndDelete(transactionID string) (*big.Int, bool) // Pop Put(transactionID string, value *big.Int) Capacity() int Sum() *big.Int GetHashmapLen() int GetHead() *DLLNode }
IBridgeReqHandler is the interface for the handling bridge requests.
func NewBridgeReqs ¶
func NewBridgeReqs(capacity int) IBridgeReqHandler
NewBridgeReqs creates a new IBridgeReqHandler.
type IQuoter ¶
type IQuoter interface { GetValidQuote(quoteID string, destTokenID string, destVolume *big.Int) (*Quote, error) PublishQuotes() error UpdateQuotes(quoteID string) error GetQuotes(quoteID string) []*Quote QuoteToAPIQuote(quote *Quote) (*client.APIQuote, error) HandleUnconfirmedBridgeRequest(req *bindings.FastBridgeBridgeRequested) error HandleCompletedBridge(transactionID string, event *bindings.IFastBridgeBridgeTransaction) error HandleUncompletedBridge(transactionID string, event *bindings.IFastBridgeBridgeTransaction) error }
IQuoter is the interface for a Quoter.
type Quote ¶
type Quote struct { QuoteID string // Hash of relayer, sell/buy asset, sell/buy chainID Gas *big.Int // Customizable by the relayer config OriginToken common.Address DestToken common.Address OriginChainID uint32 DestChainID uint32 MaxVolume *big.Int // Max volume the quote applies for APIID int }
Quote holds all the data for a quote.
Click to show internal directories.
Click to hide internal directories.