terraswap

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetPrefix = "phoenix"
	ClassicPrefix = "columbus"
	TestnetPrefix = "pisco"
)
View Source
const (
	SwapAction     = PairAction("swap")
	ProvideAction  = PairAction("provide_liquidity")
	WithdrawAction = PairAction("withdraw_liquidity")
)
View Source
const (
	CreatePairMatchedLen         = FactoryLpAddrIdx + 1
	PairCommonMatchedLen         = PairSenderIdx + 1
	PairSwapMatchedLen           = PairSwapCommissionAmountIdx + 1
	PairProvideMatchedLen        = PairProvideShareIdx + 1
	PairWithdrawMatchedLen       = PairWithdrawRefundAssetsIdx + 1
	WasmTransferMatchedLen       = WasmTransferAmountIdx + 1
	TransferMatchedLen           = TransferAmountIdx + 1
	PairInitialProvideMatchedLen = PairInitialProvideToIdx + 1
)
View Source
const (
	FactoryAddrIdx = iota
	FactoryActionIdx
	FactoryPairIdx
	FactoryPairAddrIdx
	FactoryLpAddrIdx
)
View Source
const (
	PairAddrIdx = iota
	PairActionIdx
	PairSenderIdx
)
View Source
const (
	PairSwapReceiverIdx = iota + 3
	PairSwapOfferAssetIdx
	PairSwapAskAssetIdx
	PairSwapOfferAmountIdx
	PairSwapReturnAmountIdx
	PairSwapSpreadAmountIdx
	PairSwapCommissionAmountIdx
)
View Source
const (
	PairProvideReceiverIdx = iota + 3
	PairProvideAssetsIdx
	PairProvideShareIdx
)
View Source
const (
	PairWithdrawWithdrawShareIdx = iota + 3
	PairWithdrawRefundAssetsIdx
)
View Source
const (
	WasmTransferCw20AddrIdx = iota
	WasmTransferActionIdx
	WasmTransferFromIdx
	WasmTransferToIdx
	WasmTransferAmountIdx
)
View Source
const (
	TransferRecipientIdx = iota
	TransferSenderIdx
	TransferAmountIdx
)
View Source
const (
	PairInitialProvideAddrIdx = iota
	PairInitialProvideActionIdx
	PairInitialProvideAmountIdx
	PairInitialProvideToIdx
)
View Source
const WasmTransferAction = "transfer"

Variables

View Source
var FactoryAddress = map[string]string{
	"phoenix":  "terra1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjqxl5qul",
	"pisco":    "terra1jha5avc92uerwp9qzx3flvwnyxs3zax2rrm6jkcedy2qvzwd2k7qk7yxcl",
	"columbus": "terra1ulgw0td86nvs4wtpsc80thv6xelk76ut7a7apj",
}

Functions

func CreateCreatePairRuleFinder

func CreateCreatePairRuleFinder(chainId string) (eventlog.LogFinder, error)

func CreatePairAllRulesFinder

func CreatePairAllRulesFinder(pairs map[string]bool) (eventlog.LogFinder, error)

func CreatePairInitialProvideRuleFinder

func CreatePairInitialProvideRuleFinder(pairs map[string]bool) (eventlog.LogFinder, error)

func CreatePairProviderRuleFinder

func CreatePairProviderRuleFinder(pairs map[string]bool) (eventlog.LogFinder, error)

func CreatePairSwapRuleFinder

func CreatePairSwapRuleFinder(pairs map[string]bool) (eventlog.LogFinder, error)

func CreatePairWithdrawRuleFinder

func CreatePairWithdrawRuleFinder(pairs map[string]bool) (eventlog.LogFinder, error)

func CreateTransferRuleFinder

func CreateTransferRuleFinder(pairs map[string]bool) (eventlog.LogFinder, error)

Track transfer from user to Pair

func CreateWasmTransferRuleFinder

func CreateWasmTransferRuleFinder(pairs map[string]bool) (eventlog.LogFinder, error)

Track cw20 transfer

Types

type PairAction

type PairAction string

Jump to

Keyboard shortcuts

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