dezswap

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 = "dimension_37"
	TestnetPrefix = "cube_47"
)
View Source
const (
	MainnetV2Height = 3166247
	TestnetV2Height = 2975818
)
View Source
const (
	SwapAction     = PairAction("swap")
	ProvideAction  = PairAction("provide_liquidity")
	WithdrawAction = PairAction("withdraw_liquidity")
)
View Source
const (
	WasmTransferAction     = "transfer"
	WasmTransferFromAction = "transfer_from"
)
View Source
const (
	CreatePairMatchedLen         = FactoryLpAddrIdx + 1
	PairCommonMatchedLen         = PairActionIdx + 1
	PairSwapMatchedLen           = PairSwapSpreadAmountIdx + 1
	PairProvideMatchedLen        = PairProvideShareIdx + 1
	PairV2ProvideMatchedLen      = PairV2ProvideShareIdx + 1
	PairWithdrawMatchedLen       = PairWithdrawWithdrawShareIdx + 1
	PairInitialProvideMatchedLen = PairInitialProvideToIdx + 1
	WasmCommonTransferMatchedLen = WasmCommonTransferActionIdx + 1
	WasmV1TransferMatchedLen     = WasmTransferToIdx + 1
	WasmV2TransferMatchedLen     = WasmTransferFromToIdx + 1
	TransferMatchedLen           = TransferAmountIdx + 1
)
View Source
const (
	FactoryAddrIdx = iota
	FactoryActionIdx
	FactoryPairIdx
	FactoryPairAddrIdx
	FactoryLpAddrIdx
)
View Source
const (
	PairAddrIdx = iota
	PairActionIdx
)
View Source
const (
	PairSwapAskAssetIdx = iota + PairCommonMatchedLen
	PairSwapCommissionAmountIdx
	PairSwapOfferAmountIdx
	PairSwapOfferAssetIdx
	PairSwapReceiverIdx
	PairSwapReturnAmountIdx
	PairSwapSenderIdx
	PairSwapSpreadAmountIdx
)
View Source
const (
	PairProvideAssetsIdx = iota + PairCommonMatchedLen
	PairProvideReceiverIdx
	PairProvideSenderIdx
	PairProvideShareIdx
)
View Source
const (
	PairV2ProvideAssetsIdx = iota + PairCommonMatchedLen
	PairV2ProvideReceiverIdx
	PairV2RefundAssetsIdx
	PairV2ProvideSenderIdx
	PairV2ProvideShareIdx
)

include returned assets

View Source
const (
	PairWithdrawRefundAssetsIdx = iota + PairCommonMatchedLen
	PairWithdrawSenderIdx
	PairWithdrawWithdrawShareIdx
)
View Source
const (
	PairInitialProvideAddrIdx = iota
	PairInitialProvideActionIdx
	PairInitialProvideAmountIdx
	PairInitialProvideToIdx
)
View Source
const (
	WasmCommonTransferCw20AddrIdx = iota
	WasmCommonTransferActionIdx
)
View Source
const (
	WasmTransferAmountIdx = iota + WasmCommonTransferMatchedLen
	WasmTransferFromIdx
	WasmTransferToIdx
)
View Source
const (
	WasmTransferFromAmountIdx = iota + WasmCommonTransferMatchedLen
	WasmTransferFromByIdx
	WasmTransferFromFromIdx
	WasmTransferFromToIdx
)
View Source
const (
	TransferRecipientIdx = iota
	TransferSenderIdx
	TransferAmountIdx
)

Variables

View Source
var FactoryAddress = map[string]string{
	"dimension_37": "xpla1j33xdql0h4kpgj2mhggy4vutw655u90z7nyj4afhxgj4v5urtadq44e3vd",
	"cube_47":      "xpla1j4kgjl6h4rt96uddtzdxdu39h0mhn4vrtydufdrk4uxxnrpsnw2qug2yx2",
}

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() (eventlog.LogFinder, error)

Track transfer from user to Pair

func CreateWasmCommonTransferRuleFinder

func CreateWasmCommonTransferRuleFinder() (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