Documentation ¶
Index ¶
- Variables
- func GetOIFeeValue(accounts []*mai3.MarginAccount, blockNumbers int64, ...) (oi, totalFee, daoFee decimal.Decimal, err error)
- func GetRemainMinutes(timestamp int64, epoch *mining.Schedule) decimal.Decimal
- type MockBlockGraph1
- type MockMAI3Graph1
- func (mockMAI3 *MockMAI3Graph1) GetMarkPriceWithBlockNumberAddrIndex(blockNumber int64, poolAddr string, perpIndex int) (decimal.Decimal, error)
- func (mockMAI3 *MockMAI3Graph1) GetMarkPrices(blockNumber int64) (map[string]decimal.Decimal, error)
- func (mockMAI3 *MockMAI3Graph1) GetPerpIDWithUSDBased(symbol string) (string, error)
- func (mockMAI3 *MockMAI3Graph1) GetUsersBasedOnBlockNumber(blockNumber int64) ([]mai3.User, error)
- func (mockMAI3 *MockMAI3Graph1) InBTCInverseContractWhiteList(perpID string) (bool, string)
- func (mockMAI3 *MockMAI3Graph1) InETHInverseContractWhiteList(perpID string) (bool, string)
- func (mockMAI3 *MockMAI3Graph1) InSATSInverseContractWhiteList(perpID string) (bool, string)
- type MockMAI3Graph2
- func (mockMAI3 *MockMAI3Graph2) GetMarkPriceWithBlockNumberAddrIndex(blockNumber int64, poolAddr string, perpIndex int) (decimal.Decimal, error)
- func (mockMAI3 *MockMAI3Graph2) GetMarkPrices(blockNumber int64) (map[string]decimal.Decimal, error)
- func (mockMAI3 *MockMAI3Graph2) GetPerpIDWithUSDBased(symbol string) (string, error)
- func (mockMAI3 *MockMAI3Graph2) GetUsersBasedOnBlockNumber(blockNumber int64) ([]mai3.User, error)
- func (mockMAI3 *MockMAI3Graph2) InBTCInverseContractWhiteList(perpID string) (bool, string)
- func (mockMAI3 *MockMAI3Graph2) InETHInverseContractWhiteList(perpID string) (bool, string)
- func (mockMAI3 *MockMAI3Graph2) InSATSInverseContractWhiteList(perpID string) (bool, string)
- type MockMultiBlockGraphs
- type MockMultiMAI3Graphs
- func (mockMultiMAI3Graphs *MockMultiMAI3Graphs) GetMai3GraphInterface(index int) (mai3.GraphInterface, error)
- func (mockMultiMAI3Graphs *MockMultiMAI3Graphs) GetMultiMarkPrices(blockNumbers []int64) (map[string]decimal.Decimal, error)
- func (mockMultiMAI3Graphs *MockMultiMAI3Graphs) GetMultiUsersBasedOnMultiBlockNumbers(blockNumbers []int64) ([][]mai3.User, error)
- type Syncer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PROGRESS_SYNC_STATE = "user_info" // compatible PROGRESS_INIT_FEE = "user_info.init_fee" PROGRESS_SNAPSHOT = "user_info.snapshot" )
View Source
var (
ErrNotInEpoch = errors.New("not in epoch period")
)
View Source
var TEST_ERROR = errors.New("test error")
Functions ¶
func GetOIFeeValue ¶ added in v0.0.66
Types ¶
type MockBlockGraph1 ¶ added in v0.0.57
type MockBlockGraph1 struct{}
func NewMockBlockGraph1 ¶ added in v0.0.57
func NewMockBlockGraph1() *MockBlockGraph1
func (*MockBlockGraph1) GetBlockNumberWithTS ¶ added in v0.0.57
func (mockBlock *MockBlockGraph1) GetBlockNumberWithTS(timestamp int64) (int64, error)
type MockMAI3Graph1 ¶ added in v0.0.57
type MockMAI3Graph1 struct {
// contains filtered or unexported fields
}
func NewMockMAI3Graph1 ¶ added in v0.0.57
func NewMockMAI3Graph1() *MockMAI3Graph1
func (*MockMAI3Graph1) GetMarkPriceWithBlockNumberAddrIndex ¶ added in v0.0.57
func (*MockMAI3Graph1) GetMarkPrices ¶ added in v0.0.57
func (*MockMAI3Graph1) GetPerpIDWithUSDBased ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph1) GetPerpIDWithUSDBased(symbol string) (string, error)
func (*MockMAI3Graph1) GetUsersBasedOnBlockNumber ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph1) GetUsersBasedOnBlockNumber(blockNumber int64) ([]mai3.User, error)
func (*MockMAI3Graph1) InBTCInverseContractWhiteList ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph1) InBTCInverseContractWhiteList(perpID string) (bool, string)
func (*MockMAI3Graph1) InETHInverseContractWhiteList ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph1) InETHInverseContractWhiteList(perpID string) (bool, string)
func (*MockMAI3Graph1) InSATSInverseContractWhiteList ¶ added in v0.0.66
func (mockMAI3 *MockMAI3Graph1) InSATSInverseContractWhiteList(perpID string) (bool, string)
type MockMAI3Graph2 ¶ added in v0.0.57
type MockMAI3Graph2 struct{}
func NewMockMAI3Graph2 ¶ added in v0.0.57
func NewMockMAI3Graph2() *MockMAI3Graph2
func (*MockMAI3Graph2) GetMarkPriceWithBlockNumberAddrIndex ¶ added in v0.0.57
func (*MockMAI3Graph2) GetMarkPrices ¶ added in v0.0.57
func (*MockMAI3Graph2) GetPerpIDWithUSDBased ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph2) GetPerpIDWithUSDBased(symbol string) (string, error)
func (*MockMAI3Graph2) GetUsersBasedOnBlockNumber ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph2) GetUsersBasedOnBlockNumber(blockNumber int64) ([]mai3.User, error)
func (*MockMAI3Graph2) InBTCInverseContractWhiteList ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph2) InBTCInverseContractWhiteList(perpID string) (bool, string)
func (*MockMAI3Graph2) InETHInverseContractWhiteList ¶ added in v0.0.57
func (mockMAI3 *MockMAI3Graph2) InETHInverseContractWhiteList(perpID string) (bool, string)
func (*MockMAI3Graph2) InSATSInverseContractWhiteList ¶ added in v0.0.66
func (mockMAI3 *MockMAI3Graph2) InSATSInverseContractWhiteList(perpID string) (bool, string)
type MockMultiBlockGraphs ¶ added in v0.0.57
type MockMultiBlockGraphs struct {
// contains filtered or unexported fields
}
func NewMockMultiBlockGraphsMultiChain ¶ added in v0.0.57
func NewMockMultiBlockGraphsMultiChain() *MockMultiBlockGraphs
func NewMockMultiBlockGraphsOneChain ¶ added in v0.0.57
func NewMockMultiBlockGraphsOneChain() *MockMultiBlockGraphs
func (*MockMultiBlockGraphs) GetMultiBlockNumberWithTS ¶ added in v0.0.57
func (mockMultiBlocks *MockMultiBlockGraphs) GetMultiBlockNumberWithTS(timestamp int64) ([]int64, error)
type MockMultiMAI3Graphs ¶ added in v0.0.57
type MockMultiMAI3Graphs struct {
// contains filtered or unexported fields
}
func NewMockMultiMAI3GraphsMultiChain ¶ added in v0.0.57
func NewMockMultiMAI3GraphsMultiChain() *MockMultiMAI3Graphs
func NewMockMultiMAI3GraphsOneChain ¶ added in v0.0.57
func NewMockMultiMAI3GraphsOneChain() *MockMultiMAI3Graphs
func (*MockMultiMAI3Graphs) GetMai3GraphInterface ¶ added in v0.0.57
func (mockMultiMAI3Graphs *MockMultiMAI3Graphs) GetMai3GraphInterface( index int) (mai3.GraphInterface, error)
func (*MockMultiMAI3Graphs) GetMultiMarkPrices ¶ added in v0.0.57
func (*MockMultiMAI3Graphs) GetMultiUsersBasedOnMultiBlockNumbers ¶ added in v0.0.57
func (mockMultiMAI3Graphs *MockMultiMAI3Graphs) GetMultiUsersBasedOnMultiBlockNumbers( blockNumbers []int64) ([][]mai3.User, error)
Click to show internal directories.
Click to hide internal directories.