Documentation ¶
Overview ¶
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Index ¶
- Constants
- Variables
- type DepositCfgInterface
- type DepositCfger
- type DepositPositionConfig
- type Depositcurrent
- func (cur *Depositcurrent) CalcDepositTime(index uint64, deposit *common.DepositBase, wdAm *big.Int, t uint64) error
- func (cur *Depositcurrent) CheckAmountDeposit(addr common.Address, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
- func (cur *Depositcurrent) CheckAndcalcrefundDeposit(index uint64, deposit *common.DepositBase, t uint64) (bool, *big.Int, error)
- func (cur *Depositcurrent) CheckwithdrawDeposit(index uint64, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
- func (cur *Depositcurrent) GetRate() uint64
- type Depositregular
- func (drg *Depositregular) CalcDepositTime(index uint64, deposit *common.DepositBase, wdAm *big.Int, t uint64) error
- func (drg *Depositregular) CheckAmountDeposit(addr common.Address, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
- func (drg *Depositregular) CheckAndcalcrefundDeposit(index uint64, deposit *common.DepositBase, t uint64) (bool, *big.Int, error)
- func (drg *Depositregular) CheckwithdrawDeposit(index uint64, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
- func (dc *Depositregular) GetRate() uint64
Constants ¶
View Source
const ( CurrentDeposit = uint64(0) MONTH_1 = uint64(1) MONTH_3 = uint64(3) MONTH_6 = uint64(6) MONTH_12 = uint64(12) SecondsPerMonth = 30 * 24 * 60 * 60 //每月秒数 Days7Seconds = 7 * 24 * 60 * 60 Delay = 60 * 60 * 2 //2小时 )
View Source
const (
VersionA = "A"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DepositCfgInterface ¶
type DepositCfgInterface interface {
GetDepositPositionCfg(depositType uint64) DepositCfger
}
func GetDepositCfg ¶
func GetDepositCfg(version string) DepositCfgInterface
type DepositCfger ¶
type DepositCfger interface { CheckwithdrawDeposit(index uint64, deposit *common.DepositBase, wdAm *big.Int) (bool, error) CheckAndcalcrefundDeposit(index uint64, deposit *common.DepositBase, t uint64) (bool, *big.Int, error) CheckAmountDeposit(addr common.Address, deposit *common.DepositBase, wdAm *big.Int) (bool, error) CalcDepositTime(index uint64, deposit *common.DepositBase, wdAm *big.Int, t uint64) error GetRate() uint64 }
type DepositPositionConfig ¶
type Depositcurrent ¶
type Depositcurrent struct {
DepositCur DepositPositionConfig
}
func (*Depositcurrent) CalcDepositTime ¶
func (cur *Depositcurrent) CalcDepositTime(index uint64, deposit *common.DepositBase, wdAm *big.Int, t uint64) error
func (*Depositcurrent) CheckAmountDeposit ¶
func (cur *Depositcurrent) CheckAmountDeposit(addr common.Address, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
func (*Depositcurrent) CheckAndcalcrefundDeposit ¶
func (cur *Depositcurrent) CheckAndcalcrefundDeposit(index uint64, deposit *common.DepositBase, t uint64) (bool, *big.Int, error)
func (*Depositcurrent) CheckwithdrawDeposit ¶
func (cur *Depositcurrent) CheckwithdrawDeposit(index uint64, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
func (*Depositcurrent) GetRate ¶
func (cur *Depositcurrent) GetRate() uint64
type Depositregular ¶
type Depositregular struct {
Depositreg DepositPositionConfig
}
func (*Depositregular) CalcDepositTime ¶
func (drg *Depositregular) CalcDepositTime(index uint64, deposit *common.DepositBase, wdAm *big.Int, t uint64) error
func (*Depositregular) CheckAmountDeposit ¶
func (drg *Depositregular) CheckAmountDeposit(addr common.Address, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
func (*Depositregular) CheckAndcalcrefundDeposit ¶
func (drg *Depositregular) CheckAndcalcrefundDeposit(index uint64, deposit *common.DepositBase, t uint64) (bool, *big.Int, error)
func (*Depositregular) CheckwithdrawDeposit ¶
func (drg *Depositregular) CheckwithdrawDeposit(index uint64, deposit *common.DepositBase, wdAm *big.Int) (bool, error)
func (*Depositregular) GetRate ¶
func (dc *Depositregular) GetRate() uint64
Click to show internal directories.
Click to hide internal directories.