Documentation
¶
Index ¶
- Constants
- Variables
- func NewAcrossMessage(source, destination uint64, acrossData *AcrossData) *message.Message
- func NewMayanMessage(source, destination uint64, mayanData *MayanData) *message.Message
- type AcrossData
- type AcrossMessageHandler
- type ConfirmationWatcher
- type Coordinator
- type EventFilterer
- type MayanContract
- type MayanData
- type MayanMessageHandler
- type SwapFetcher
- type TokenMatcher
- type TokenPricer
- type Watcher
Constants ¶
View Source
const ( AcrossMessage = "AcrossMessage" MayanMessage = "MayanMessage" ZERO_HASH = "0000000000000000000000000000000000000000000000000000000000000000" DOMAIN_NAME = "LiquidityPool" VERSION = "1.0.0" TIMEOUT = 10 * time.Minute BLOCK_RANGE = 1000 )
View Source
const (
TRANSACTION_TIMEOUT = 30 * time.Second
)
Variables ¶
View Source
var (
BPS_DENOMINATOR = big.NewInt(10000)
)
Functions ¶
func NewAcrossMessage ¶
func NewAcrossMessage(source, destination uint64, acrossData *AcrossData) *message.Message
Types ¶
type AcrossData ¶
type AcrossMessageHandler ¶
type AcrossMessageHandler struct {
// contains filtered or unexported fields
}
func NewAcrossMessageHandler ¶
func NewAcrossMessageHandler( chainID uint64, client EventFilterer, pools map[uint64]common.Address, coordinator Coordinator, host host.Host, comm comm.Communication, fetcher signing.SaveDataFetcher, tokenMatcher TokenMatcher, tokenStore config.TokenStore, confirmationWatcher ConfirmationWatcher, sigChn chan any, ) *AcrossMessageHandler
func (*AcrossMessageHandler) HandleMessage ¶
HandleMessage finds the Across deposit with the according deposit ID and starts the MPC signature process for it. The result will be saved into the signature cache through the result channel.
func (*AcrossMessageHandler) Listen ¶
func (h *AcrossMessageHandler) Listen(ctx context.Context)
type ConfirmationWatcher ¶ added in v0.2.0
type Coordinator ¶
type EventFilterer ¶
type MayanContract ¶ added in v0.2.0
type MayanContract interface {
DecodeFulfillCall(calldata []byte) (*contracts.MayanFulfillParams, *contracts.MayanFulfillMsg, error)
GetOrder(
msg *contracts.MayanFulfillMsg,
swap *mayan.MayanSwap,
srcTokenDecimals uint8,
) (*contracts.MayanOrder, error)
}
type MayanMessageHandler ¶ added in v0.2.0
type MayanMessageHandler struct {
// contains filtered or unexported fields
}
func NewMayanMessageHandler ¶ added in v0.2.0
func NewMayanMessageHandler( chainID uint64, client EventFilterer, liquidityPools map[uint64]common.Address, mayanPools map[uint64]common.Address, coordinator Coordinator, host host.Host, comm comm.Communication, fetcher signing.SaveDataFetcher, confirmationWatcher ConfirmationWatcher, tokenStore config.TokenStore, mayanDecoder MayanContract, swapFetcher SwapFetcher, sigChn chan any, ) *MayanMessageHandler
func (*MayanMessageHandler) HandleMessage ¶ added in v0.2.0
HandleMessage finds the Mayan deposit with the according deposit ID and starts the MPC signature process for it. The result will be saved into the signature cache through the result channel.
func (*MayanMessageHandler) Listen ¶ added in v0.2.0
func (h *MayanMessageHandler) Listen(ctx context.Context)
type SwapFetcher ¶ added in v0.2.0
type TokenMatcher ¶
type TokenPricer ¶
type Watcher ¶ added in v0.2.0
type Watcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶ added in v0.2.0
func NewWatcher( client EventFilterer, tokenPricer TokenPricer, tokenStore config.TokenStore, confirmations map[uint64]uint64, blocktime time.Duration, ) *Watcher
Click to show internal directories.
Click to hide internal directories.