types

package
Version: v1.65.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IssuanceActionCreate = 1 + iota // 创建借贷
	IssuanceActionDebt              // 大户抵押
	IssuanceActionRepay             // 大户清算
	IssuanceActionFeed              // 发行合约喂价
	IssuanceActionClose             // 关闭借贷
	IssuanceActionManage            // 借贷管理

	//log for Issuance
	TyLogIssuanceCreate = 741
	TyLogIssuanceDebt   = 742
	TyLogIssuanceRepay  = 743
	TyLogIssuanceFeed   = 745
	TyLogIssuanceClose  = 746
)

Issuance op

View Source
const (
	IssuanceX                   = "issuance"
	CCNYTokenName               = "CCNY"
	IssuancePreLiquidationRatio = 11000 //TODO 预清算比例,抵押物价值跌到借出ccny价值110%的时候开始清算
)

Issuance name

View Source
const (
	IssuanceStatusCreated = 1 + iota
	IssuanceStatusClose
)

Issuance status

View Source
const (
	IssuanceUserStatusCreate = 1 + iota
	IssuanceUserStatusWarning
	IssuanceUserStatusSystemLiquidate
	IssuanceUserStatusExpire
	IssuanceUserStatusExpireLiquidate
	IssuanceUserStatusClose
)

status ...

View Source
const (
	PriceFeedKey = "issuance-price-feed"
	GuarantorKey = "issuance-guarantor"
	ManageKey    = "issuance-manage"
	FundKey      = "issuance-fund"
)

type ...

Variables

View Source
var (
	ErrRiskParam                 = errors.New("ErrRiskParam")
	ErrIssuanceRepeatHash        = errors.New("ErrIssuanceRepeatHash")
	ErrIssuanceStatus            = errors.New("ErrIssuanceStatus")
	ErrIssuanceExceedDebtCeiling = errors.New("ErrIssuanceExceedDebtCeiling")
	ErrPriceInvalid              = errors.New("ErrPriceInvalid")
	ErrAssetType                 = errors.New("ErrAssetType")
	ErrRecordNotExist            = errors.New("ErrRecordNotExist")
	ErrIssuanceErrCloser         = errors.New("ErrIssuanceErrCloser")
	ErrRepayValueInsufficient    = errors.New("ErrRepayValueInsufficient")
	ErrIssuanceAccountExist      = errors.New("ErrIssuanceAccountExist")
	ErrIssuanceLowBalance        = errors.New("ErrIssuanceLowBalance")
	ErrIssuanceBalanceInvalid    = errors.New("ErrIssuanceBalanceInvalid")
	ErrPermissionDeny            = errors.New("ErrPermissionDeny")
	ErrIssuanceRecordNotEmpty    = errors.New("ErrIssuanceRecordNotEmpty")
)

Errors for lottery

View Source
var File_issuance_proto protoreflect.FileDescriptor
View Source
var (
	ForkIssuanceTableUpdate = "ForkIssuanceTableUpdate"
)

fork ...

Functions

func CreateRawIssuanceCloseTx

func CreateRawIssuanceCloseTx(cfg *types.Chain33Config, parm *IssuanceCloseTx) (*types.Transaction, error)

CreateRawIssuanceCloseTx method

func CreateRawIssuanceCreateTx

func CreateRawIssuanceCreateTx(cfg *types.Chain33Config, parm *IssuanceCreateTx) (*types.Transaction, error)

CreateRawIssuanceCreateTx method

func CreateRawIssuanceDebtTx

func CreateRawIssuanceDebtTx(cfg *types.Chain33Config, parm *IssuanceDebtTx) (*types.Transaction, error)

CreateRawIssuanceDebtTx method

func CreateRawIssuanceFeedTx

func CreateRawIssuanceFeedTx(cfg *types.Chain33Config, parm *IssuanceFeedTx) (*types.Transaction, error)

CreateRawIssuanceFeedTx method

func CreateRawIssuanceManageTx

func CreateRawIssuanceManageTx(cfg *types.Chain33Config, parm *IssuanceManageTx) (*types.Transaction, error)

CreateRawIssuanceManageTx method

func CreateRawIssuanceRepayTx

func CreateRawIssuanceRepayTx(cfg *types.Chain33Config, parm *IssuanceRepayTx) (*types.Transaction, error)

CreateRawIssuanceRepayTx method

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

func NewIssuanceTable

func NewIssuanceTable(kvdb db.KV) *table.Table

NewIssuanceTable 新建表

func NewRecordTable

func NewRecordTable(kvdb db.KV) *table.Table

NewRecordTable 大户发行记录表

Types

type DebtRecord

type DebtRecord struct {
	AccountAddr      string `protobuf:"bytes,1,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`            //抵押人地址
	StartTime        int64  `protobuf:"varint,2,opt,name=startTime,proto3" json:"startTime,omitempty"`               //抵押时间
	CollateralValue  int64  `protobuf:"varint,3,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`   //抵押物价值(bty)
	CollateralPrice  int64  `protobuf:"varint,4,opt,name=collateralPrice,proto3" json:"collateralPrice,omitempty"`   //抵押物价格
	DebtValue        int64  `protobuf:"varint,5,opt,name=debtValue,proto3" json:"debtValue,omitempty"`               //债务价值(ccny)
	LiquidationPrice int64  `protobuf:"varint,6,opt,name=liquidationPrice,proto3" json:"liquidationPrice,omitempty"` //抵押物清算价格
	Status           int32  `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"`                     //抵押状态,是否被清算
	LiquidateTime    int64  `protobuf:"varint,8,opt,name=liquidateTime,proto3" json:"liquidateTime,omitempty"`       //清算时间
	ExpireTime       int64  `protobuf:"varint,9,opt,name=expireTime,proto3" json:"expireTime,omitempty"`             //超时清算时间
	PreStatus        int32  `protobuf:"varint,10,opt,name=preStatus,proto3" json:"preStatus,omitempty"`              //上一次抵押状态,用于告警恢复
	DebtId           string `protobuf:"bytes,11,opt,name=debtId,proto3" json:"debtId,omitempty"`                     //借贷id
	IssuId           string `protobuf:"bytes,12,opt,name=issuId,proto3" json:"issuId,omitempty"`                     //发行id
	// contains filtered or unexported fields
}

抵押记录

func (*DebtRecord) Descriptor deprecated

func (*DebtRecord) Descriptor() ([]byte, []int)

Deprecated: Use DebtRecord.ProtoReflect.Descriptor instead.

func (*DebtRecord) GetAccountAddr

func (x *DebtRecord) GetAccountAddr() string

func (*DebtRecord) GetCollateralPrice

func (x *DebtRecord) GetCollateralPrice() int64

func (*DebtRecord) GetCollateralValue

func (x *DebtRecord) GetCollateralValue() int64

func (*DebtRecord) GetDebtId

func (x *DebtRecord) GetDebtId() string

func (*DebtRecord) GetDebtValue

func (x *DebtRecord) GetDebtValue() int64

func (*DebtRecord) GetExpireTime

func (x *DebtRecord) GetExpireTime() int64

func (*DebtRecord) GetIssuId

func (x *DebtRecord) GetIssuId() string

func (*DebtRecord) GetLiquidateTime

func (x *DebtRecord) GetLiquidateTime() int64

func (*DebtRecord) GetLiquidationPrice

func (x *DebtRecord) GetLiquidationPrice() int64

func (*DebtRecord) GetPreStatus

func (x *DebtRecord) GetPreStatus() int32

func (*DebtRecord) GetStartTime

func (x *DebtRecord) GetStartTime() int64

func (*DebtRecord) GetStatus

func (x *DebtRecord) GetStatus() int32

func (*DebtRecord) ProtoMessage

func (*DebtRecord) ProtoMessage()

func (*DebtRecord) ProtoReflect added in v1.65.3

func (x *DebtRecord) ProtoReflect() protoreflect.Message

func (*DebtRecord) Reset

func (x *DebtRecord) Reset()

func (*DebtRecord) String

func (x *DebtRecord) String() string

type Issuance

type Issuance struct {
	IssuanceId             string        `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`                           //发行ID,一期发行对应一个ID
	TotalBalance           int64         `protobuf:"varint,2,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`                      //当期发行的总金额(ccny)
	DebtCeiling            int64         `protobuf:"varint,3,opt,name=debtCeiling,proto3" json:"debtCeiling,omitempty"`                        //单用户可借出的限额(ccny)
	LiquidationRatio       int64         `protobuf:"varint,4,opt,name=liquidationRatio,proto3" json:"liquidationRatio,omitempty"`              //清算比例
	CollateralValue        int64         `protobuf:"varint,5,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`                //抵押物总数量(bty)
	DebtValue              int64         `protobuf:"varint,6,opt,name=debtValue,proto3" json:"debtValue,omitempty"`                            //产生的ccny数量
	DebtRecords            []*DebtRecord `protobuf:"bytes,7,rep,name=debtRecords,proto3" json:"debtRecords,omitempty"`                         //大户抵押记录
	InvalidRecords         []*DebtRecord `protobuf:"bytes,8,rep,name=invalidRecords,proto3" json:"invalidRecords,omitempty"`                   //大户抵押记录
	Status                 int32         `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"`                                  //当期发行的状态,是否关闭
	LatestLiquidationPrice int64         `protobuf:"varint,10,opt,name=latestLiquidationPrice,proto3" json:"latestLiquidationPrice,omitempty"` //最高清算价格
	Period                 int64         `protobuf:"varint,11,opt,name=period,proto3" json:"period,omitempty"`                                 //发行最大期限
	LatestExpireTime       int64         `protobuf:"varint,12,opt,name=latestExpireTime,proto3" json:"latestExpireTime,omitempty"`             //最近超期时间
	CreateTime             int64         `protobuf:"varint,13,opt,name=createTime,proto3" json:"createTime,omitempty"`                         //创建时间
	Balance                int64         `protobuf:"varint,14,opt,name=balance,proto3" json:"balance,omitempty"`                               //剩余可发行ccny
	IssuerAddr             string        `protobuf:"bytes,15,opt,name=issuerAddr,proto3" json:"issuerAddr,omitempty"`                          //发行地址
	// contains filtered or unexported fields
}

发行信息

func (*Issuance) Descriptor deprecated

func (*Issuance) Descriptor() ([]byte, []int)

Deprecated: Use Issuance.ProtoReflect.Descriptor instead.

func (*Issuance) GetBalance

func (x *Issuance) GetBalance() int64

func (*Issuance) GetCollateralValue

func (x *Issuance) GetCollateralValue() int64

func (*Issuance) GetCreateTime

func (x *Issuance) GetCreateTime() int64

func (*Issuance) GetDebtCeiling

func (x *Issuance) GetDebtCeiling() int64

func (*Issuance) GetDebtRecords

func (x *Issuance) GetDebtRecords() []*DebtRecord

func (*Issuance) GetDebtValue

func (x *Issuance) GetDebtValue() int64

func (*Issuance) GetInvalidRecords

func (x *Issuance) GetInvalidRecords() []*DebtRecord

func (*Issuance) GetIssuanceId

func (x *Issuance) GetIssuanceId() string

func (*Issuance) GetIssuerAddr

func (x *Issuance) GetIssuerAddr() string

func (*Issuance) GetLatestExpireTime

func (x *Issuance) GetLatestExpireTime() int64

func (*Issuance) GetLatestLiquidationPrice

func (x *Issuance) GetLatestLiquidationPrice() int64

func (*Issuance) GetLiquidationRatio

func (x *Issuance) GetLiquidationRatio() int64

func (*Issuance) GetPeriod

func (x *Issuance) GetPeriod() int64

func (*Issuance) GetStatus

func (x *Issuance) GetStatus() int32

func (*Issuance) GetTotalBalance

func (x *Issuance) GetTotalBalance() int64

func (*Issuance) ProtoMessage

func (*Issuance) ProtoMessage()

func (*Issuance) ProtoReflect added in v1.65.3

func (x *Issuance) ProtoReflect() protoreflect.Message

func (*Issuance) Reset

func (x *Issuance) Reset()

func (*Issuance) String

func (x *Issuance) String() string

type IssuanceAction

type IssuanceAction struct {

	// Types that are assignable to Value:
	//	*IssuanceAction_Create
	//	*IssuanceAction_Debt
	//	*IssuanceAction_Repay
	//	*IssuanceAction_Feed
	//	*IssuanceAction_Close
	//	*IssuanceAction_Manage
	Value isIssuanceAction_Value `protobuf_oneof:"value"`
	Ty    int32                  `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

action

func (*IssuanceAction) Descriptor deprecated

func (*IssuanceAction) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceAction.ProtoReflect.Descriptor instead.

func (*IssuanceAction) GetClose

func (x *IssuanceAction) GetClose() *IssuanceClose

func (*IssuanceAction) GetCreate

func (x *IssuanceAction) GetCreate() *IssuanceCreate

func (*IssuanceAction) GetDebt

func (x *IssuanceAction) GetDebt() *IssuanceDebt

func (*IssuanceAction) GetFeed

func (x *IssuanceAction) GetFeed() *IssuanceFeed

func (*IssuanceAction) GetManage

func (x *IssuanceAction) GetManage() *IssuanceManage

func (*IssuanceAction) GetRepay

func (x *IssuanceAction) GetRepay() *IssuanceRepay

func (*IssuanceAction) GetTy

func (x *IssuanceAction) GetTy() int32

func (*IssuanceAction) GetValue

func (m *IssuanceAction) GetValue() isIssuanceAction_Value

func (*IssuanceAction) ProtoMessage

func (*IssuanceAction) ProtoMessage()

func (*IssuanceAction) ProtoReflect added in v1.65.3

func (x *IssuanceAction) ProtoReflect() protoreflect.Message

func (*IssuanceAction) Reset

func (x *IssuanceAction) Reset()

func (*IssuanceAction) String

func (x *IssuanceAction) String() string

type IssuanceAction_Close

type IssuanceAction_Close struct {
	Close *IssuanceClose `protobuf:"bytes,5,opt,name=close,proto3,oneof"` //关闭
}

type IssuanceAction_Create

type IssuanceAction_Create struct {
	Create *IssuanceCreate `protobuf:"bytes,1,opt,name=create,proto3,oneof"` //创建一期发行
}

type IssuanceAction_Debt

type IssuanceAction_Debt struct {
	Debt *IssuanceDebt `protobuf:"bytes,2,opt,name=debt,proto3,oneof"` //抵押
}

type IssuanceAction_Feed

type IssuanceAction_Feed struct {
	Feed *IssuanceFeed `protobuf:"bytes,4,opt,name=feed,proto3,oneof"` //喂价
}

type IssuanceAction_Manage

type IssuanceAction_Manage struct {
	Manage *IssuanceManage `protobuf:"bytes,6,opt,name=manage,proto3,oneof"` //全局配置
}

type IssuanceAction_Repay

type IssuanceAction_Repay struct {
	Repay *IssuanceRepay `protobuf:"bytes,3,opt,name=repay,proto3,oneof"` //清算
}

type IssuanceAssetPriceRecord

type IssuanceAssetPriceRecord struct {
	RecordTime int64 `protobuf:"varint,1,opt,name=recordTime,proto3" json:"recordTime,omitempty"` //价格记录时间
	BtyPrice   int64 `protobuf:"varint,2,opt,name=btyPrice,proto3" json:"btyPrice,omitempty"`     // bty价格
	// contains filtered or unexported fields
}

资产价格记录

func (*IssuanceAssetPriceRecord) Descriptor deprecated

func (*IssuanceAssetPriceRecord) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceAssetPriceRecord.ProtoReflect.Descriptor instead.

func (*IssuanceAssetPriceRecord) GetBtyPrice

func (x *IssuanceAssetPriceRecord) GetBtyPrice() int64

func (*IssuanceAssetPriceRecord) GetRecordTime

func (x *IssuanceAssetPriceRecord) GetRecordTime() int64

func (*IssuanceAssetPriceRecord) ProtoMessage

func (*IssuanceAssetPriceRecord) ProtoMessage()

func (*IssuanceAssetPriceRecord) ProtoReflect added in v1.65.3

func (x *IssuanceAssetPriceRecord) ProtoReflect() protoreflect.Message

func (*IssuanceAssetPriceRecord) Reset

func (x *IssuanceAssetPriceRecord) Reset()

func (*IssuanceAssetPriceRecord) String

func (x *IssuanceAssetPriceRecord) String() string

type IssuanceClose

type IssuanceClose struct {
	IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"` //发行ID
	// contains filtered or unexported fields
}

借贷关闭

func (*IssuanceClose) Descriptor deprecated

func (*IssuanceClose) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceClose.ProtoReflect.Descriptor instead.

func (*IssuanceClose) GetIssuanceId

func (x *IssuanceClose) GetIssuanceId() string

func (*IssuanceClose) ProtoMessage

func (*IssuanceClose) ProtoMessage()

func (*IssuanceClose) ProtoReflect added in v1.65.3

func (x *IssuanceClose) ProtoReflect() protoreflect.Message

func (*IssuanceClose) Reset

func (x *IssuanceClose) Reset()

func (*IssuanceClose) String

func (x *IssuanceClose) String() string

type IssuanceCloseTx

type IssuanceCloseTx struct {
	IssuanceID string `json:"issuanceId"`
	Fee        int64  `json:"fee"`
}

IssuanceCloseTx for construction

type IssuanceCreate

type IssuanceCreate struct {
	TotalBalance     int64 `protobuf:"varint,1,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`         //发行总金额
	DebtCeiling      int64 `protobuf:"varint,2,opt,name=debtCeiling,proto3" json:"debtCeiling,omitempty"`           //单用户可借出的限额(ccny)
	LiquidationRatio int64 `protobuf:"varint,3,opt,name=liquidationRatio,proto3" json:"liquidationRatio,omitempty"` //清算比例
	Period           int64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"`                     //发行最大期限
	// contains filtered or unexported fields
}

创建发行

func (*IssuanceCreate) Descriptor deprecated

func (*IssuanceCreate) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceCreate.ProtoReflect.Descriptor instead.

func (*IssuanceCreate) GetDebtCeiling

func (x *IssuanceCreate) GetDebtCeiling() int64

func (*IssuanceCreate) GetLiquidationRatio

func (x *IssuanceCreate) GetLiquidationRatio() int64

func (*IssuanceCreate) GetPeriod

func (x *IssuanceCreate) GetPeriod() int64

func (*IssuanceCreate) GetTotalBalance

func (x *IssuanceCreate) GetTotalBalance() int64

func (*IssuanceCreate) ProtoMessage

func (*IssuanceCreate) ProtoMessage()

func (*IssuanceCreate) ProtoReflect added in v1.65.3

func (x *IssuanceCreate) ProtoReflect() protoreflect.Message

func (*IssuanceCreate) Reset

func (x *IssuanceCreate) Reset()

func (*IssuanceCreate) String

func (x *IssuanceCreate) String() string

type IssuanceCreateTx

type IssuanceCreateTx struct {
	DebtCeiling      float64 `json:"debtCeiling"`
	LiquidationRatio float64 `json:"liquidationRatio"`
	Period           int64   `json:"period"`
	TotalBalance     float64 `json:"totalBalance"`
	Fee              int64   `json:"fee"`
}

IssuanceCreateTx for construction

type IssuanceDebt

type IssuanceDebt struct {
	IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"` //发行ID
	Value      int64  `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`          //借贷金额(ccny)
	// contains filtered or unexported fields
}

抵押

func (*IssuanceDebt) Descriptor deprecated

func (*IssuanceDebt) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceDebt.ProtoReflect.Descriptor instead.

func (*IssuanceDebt) GetIssuanceId

func (x *IssuanceDebt) GetIssuanceId() string

func (*IssuanceDebt) GetValue

func (x *IssuanceDebt) GetValue() int64

func (*IssuanceDebt) ProtoMessage

func (*IssuanceDebt) ProtoMessage()

func (*IssuanceDebt) ProtoReflect added in v1.65.3

func (x *IssuanceDebt) ProtoReflect() protoreflect.Message

func (*IssuanceDebt) Reset

func (x *IssuanceDebt) Reset()

func (*IssuanceDebt) String

func (x *IssuanceDebt) String() string

type IssuanceDebtTx

type IssuanceDebtTx struct {
	IssuanceID string  `json:"issuanceId"`
	Value      float64 `json:"value"`
	Fee        int64   `json:"fee"`
}

IssuanceDebtTx for construction

type IssuanceFeed

type IssuanceFeed struct {
	CollType int32   `protobuf:"varint,1,opt,name=collType,proto3" json:"collType,omitempty"`    //抵押物价格类型(1,bty,2,btc,3,eth...)
	Price    []int64 `protobuf:"varint,2,rep,packed,name=price,proto3" json:"price,omitempty"`   //喂价
	Volume   []int64 `protobuf:"varint,3,rep,packed,name=volume,proto3" json:"volume,omitempty"` //成交量
	// contains filtered or unexported fields
}

喂价

func (*IssuanceFeed) Descriptor deprecated

func (*IssuanceFeed) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceFeed.ProtoReflect.Descriptor instead.

func (*IssuanceFeed) GetCollType

func (x *IssuanceFeed) GetCollType() int32

func (*IssuanceFeed) GetPrice

func (x *IssuanceFeed) GetPrice() []int64

func (*IssuanceFeed) GetVolume

func (x *IssuanceFeed) GetVolume() []int64

func (*IssuanceFeed) ProtoMessage

func (*IssuanceFeed) ProtoMessage()

func (*IssuanceFeed) ProtoReflect added in v1.65.3

func (x *IssuanceFeed) ProtoReflect() protoreflect.Message

func (*IssuanceFeed) Reset

func (x *IssuanceFeed) Reset()

func (*IssuanceFeed) String

func (x *IssuanceFeed) String() string

type IssuanceFeedTx

type IssuanceFeedTx struct {
	Price  []float64 `json:"price"`
	Volume []int64   `json:"volume"`
	Fee    int64     `json:"fee"`
}

IssuanceFeedTx for construction

type IssuanceManage

type IssuanceManage struct {
	SuperAddrs []string `protobuf:"bytes,1,rep,name=superAddrs,proto3" json:"superAddrs,omitempty"` //大户地址
	// contains filtered or unexported fields
}

func (*IssuanceManage) Descriptor deprecated

func (*IssuanceManage) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceManage.ProtoReflect.Descriptor instead.

func (*IssuanceManage) GetSuperAddrs

func (x *IssuanceManage) GetSuperAddrs() []string

func (*IssuanceManage) ProtoMessage

func (*IssuanceManage) ProtoMessage()

func (*IssuanceManage) ProtoReflect added in v1.65.3

func (x *IssuanceManage) ProtoReflect() protoreflect.Message

func (*IssuanceManage) Reset

func (x *IssuanceManage) Reset()

func (*IssuanceManage) String

func (x *IssuanceManage) String() string

type IssuanceManageTx

type IssuanceManageTx struct {
	Addr []string `json:"addr"`
	Fee  int64    `json:"fee"`
}

IssuanceManageTx for construction

type IssuanceRecordRow

type IssuanceRecordRow struct {
	*ReceiptIssuance
}

IssuanceRecordRow table meta 结构

func NewRecordRow

func NewRecordRow() *IssuanceRecordRow

NewRecordRow 新建一个meta 结构

func (*IssuanceRecordRow) CreateRow

func (tx *IssuanceRecordRow) CreateRow() *table.Row

CreateRow 新建数据行

func (*IssuanceRecordRow) Get

func (tx *IssuanceRecordRow) Get(key string) ([]byte, error)

Get 按照indexName 查询 indexValue

func (*IssuanceRecordRow) SetPayload

func (tx *IssuanceRecordRow) SetPayload(data types.Message) error

SetPayload 设置数据

type IssuanceRecords

type IssuanceRecords struct {
	Records []*ReceiptIssuance `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

exec_local 抵押记录信息列表

func (*IssuanceRecords) Descriptor deprecated

func (*IssuanceRecords) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceRecords.ProtoReflect.Descriptor instead.

func (*IssuanceRecords) GetRecords

func (x *IssuanceRecords) GetRecords() []*ReceiptIssuance

func (*IssuanceRecords) ProtoMessage

func (*IssuanceRecords) ProtoMessage()

func (*IssuanceRecords) ProtoReflect added in v1.65.3

func (x *IssuanceRecords) ProtoReflect() protoreflect.Message

func (*IssuanceRecords) Reset

func (x *IssuanceRecords) Reset()

func (*IssuanceRecords) String

func (x *IssuanceRecords) String() string

type IssuanceRepay

type IssuanceRepay struct {
	IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"` //发行ID
	DebtId     string `protobuf:"bytes,2,opt,name=debtId,proto3" json:"debtId,omitempty"`         //抵押ID
	// contains filtered or unexported fields
}

质押清算

func (*IssuanceRepay) Descriptor deprecated

func (*IssuanceRepay) Descriptor() ([]byte, []int)

Deprecated: Use IssuanceRepay.ProtoReflect.Descriptor instead.

func (*IssuanceRepay) GetDebtId

func (x *IssuanceRepay) GetDebtId() string

func (*IssuanceRepay) GetIssuanceId

func (x *IssuanceRepay) GetIssuanceId() string

func (*IssuanceRepay) ProtoMessage

func (*IssuanceRepay) ProtoMessage()

func (*IssuanceRepay) ProtoReflect added in v1.65.3

func (x *IssuanceRepay) ProtoReflect() protoreflect.Message

func (*IssuanceRepay) Reset

func (x *IssuanceRepay) Reset()

func (*IssuanceRepay) String

func (x *IssuanceRepay) String() string

type IssuanceRepayTx

type IssuanceRepayTx struct {
	IssuanceID string `json:"issuanceId"`
	DebtID     string `json:"debtId"`
	Fee        int64  `json:"fee"`
}

IssuanceRepayTx for construction

type IssuanceRow

type IssuanceRow struct {
	*ReceiptIssuanceID
}

IssuanceRow table meta 结构

func NewIssuanceRow

func NewIssuanceRow() *IssuanceRow

NewIssuanceRow 新建一个meta 结构

func (*IssuanceRow) CreateRow

func (tx *IssuanceRow) CreateRow() *table.Row

CreateRow 新建数据行

func (*IssuanceRow) Get

func (tx *IssuanceRow) Get(key string) ([]byte, error)

Get 按照indexName 查询 indexValue

func (*IssuanceRow) SetPayload

func (tx *IssuanceRow) SetPayload(data types.Message) error

SetPayload 设置数据

type IssuanceType

type IssuanceType struct {
	types.ExecTypeBase
}

IssuanceType def

func NewType

func NewType(cfg *types.Chain33Config) *IssuanceType

NewType method

func (IssuanceType) CreateTx

func (issuance IssuanceType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)

CreateTx method

func (*IssuanceType) GetLogMap

func (issuance *IssuanceType) GetLogMap() map[int64]*types.LogInfo

GetLogMap method

func (*IssuanceType) GetName

func (issuance *IssuanceType) GetName() string

GetName 获取执行器名称

func (*IssuanceType) GetPayload

func (issuance *IssuanceType) GetPayload() types.Message

GetPayload method

func (IssuanceType) GetTypeMap

func (issuance IssuanceType) GetTypeMap() map[string]int32

GetTypeMap method

type ReceiptIssuance

type ReceiptIssuance struct {
	IssuanceId  string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
	AccountAddr string `protobuf:"bytes,2,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
	DebtId      string `protobuf:"bytes,3,opt,name=debtId,proto3" json:"debtId,omitempty"`
	Status      int32  `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

exec_local 发行信息

func (*ReceiptIssuance) Descriptor deprecated

func (*ReceiptIssuance) Descriptor() ([]byte, []int)

Deprecated: Use ReceiptIssuance.ProtoReflect.Descriptor instead.

func (*ReceiptIssuance) GetAccountAddr

func (x *ReceiptIssuance) GetAccountAddr() string

func (*ReceiptIssuance) GetDebtId

func (x *ReceiptIssuance) GetDebtId() string

func (*ReceiptIssuance) GetIssuanceId

func (x *ReceiptIssuance) GetIssuanceId() string

func (*ReceiptIssuance) GetStatus

func (x *ReceiptIssuance) GetStatus() int32

func (*ReceiptIssuance) ProtoMessage

func (*ReceiptIssuance) ProtoMessage()

func (*ReceiptIssuance) ProtoReflect added in v1.65.3

func (x *ReceiptIssuance) ProtoReflect() protoreflect.Message

func (*ReceiptIssuance) Reset

func (x *ReceiptIssuance) Reset()

func (*ReceiptIssuance) String

func (x *ReceiptIssuance) String() string

type ReceiptIssuanceID

type ReceiptIssuanceID struct {
	IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
	Status     int32  `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

exec_local issuid记录信息

func (*ReceiptIssuanceID) Descriptor deprecated

func (*ReceiptIssuanceID) Descriptor() ([]byte, []int)

Deprecated: Use ReceiptIssuanceID.ProtoReflect.Descriptor instead.

func (*ReceiptIssuanceID) GetIssuanceId

func (x *ReceiptIssuanceID) GetIssuanceId() string

func (*ReceiptIssuanceID) GetStatus

func (x *ReceiptIssuanceID) GetStatus() int32

func (*ReceiptIssuanceID) ProtoMessage

func (*ReceiptIssuanceID) ProtoMessage()

func (*ReceiptIssuanceID) ProtoReflect added in v1.65.3

func (x *ReceiptIssuanceID) ProtoReflect() protoreflect.Message

func (*ReceiptIssuanceID) Reset

func (x *ReceiptIssuanceID) Reset()

func (*ReceiptIssuanceID) String

func (x *ReceiptIssuanceID) String() string

type RepIssuanceCurrentInfo

type RepIssuanceCurrentInfo struct {
	Status           int32  `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`                     //当期发行的状态,是否关闭
	TotalBalance     int64  `protobuf:"varint,2,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`         //当期发行总金额(ccny)
	DebtCeiling      int64  `protobuf:"varint,3,opt,name=debtCeiling,proto3" json:"debtCeiling,omitempty"`           //单用户可借出的限额(ccny)
	LiquidationRatio int64  `protobuf:"varint,4,opt,name=liquidationRatio,proto3" json:"liquidationRatio,omitempty"` //清算比例
	Balance          int64  `protobuf:"varint,5,opt,name=balance,proto3" json:"balance,omitempty"`                   //剩余可借贷金额(ccny)
	CollateralValue  int64  `protobuf:"varint,6,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`   //抵押物总数量(bty)
	DebtValue        int64  `protobuf:"varint,7,opt,name=debtValue,proto3" json:"debtValue,omitempty"`               //产生的ccny数量
	Period           int64  `protobuf:"varint,8,opt,name=period,proto3" json:"period,omitempty"`                     //发行最大期限
	IssuId           string `protobuf:"bytes,9,opt,name=issuId,proto3" json:"issuId,omitempty"`                      //发行ID
	CreateTime       int64  `protobuf:"varint,10,opt,name=createTime,proto3" json:"createTime,omitempty"`            //创建时间
	// contains filtered or unexported fields
}

返回一期发行信息

func (*RepIssuanceCurrentInfo) Descriptor deprecated

func (*RepIssuanceCurrentInfo) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuanceCurrentInfo.ProtoReflect.Descriptor instead.

func (*RepIssuanceCurrentInfo) GetBalance

func (x *RepIssuanceCurrentInfo) GetBalance() int64

func (*RepIssuanceCurrentInfo) GetCollateralValue

func (x *RepIssuanceCurrentInfo) GetCollateralValue() int64

func (*RepIssuanceCurrentInfo) GetCreateTime

func (x *RepIssuanceCurrentInfo) GetCreateTime() int64

func (*RepIssuanceCurrentInfo) GetDebtCeiling

func (x *RepIssuanceCurrentInfo) GetDebtCeiling() int64

func (*RepIssuanceCurrentInfo) GetDebtValue

func (x *RepIssuanceCurrentInfo) GetDebtValue() int64

func (*RepIssuanceCurrentInfo) GetIssuId

func (x *RepIssuanceCurrentInfo) GetIssuId() string

func (*RepIssuanceCurrentInfo) GetLiquidationRatio

func (x *RepIssuanceCurrentInfo) GetLiquidationRatio() int64

func (*RepIssuanceCurrentInfo) GetPeriod

func (x *RepIssuanceCurrentInfo) GetPeriod() int64

func (*RepIssuanceCurrentInfo) GetStatus

func (x *RepIssuanceCurrentInfo) GetStatus() int32

func (*RepIssuanceCurrentInfo) GetTotalBalance

func (x *RepIssuanceCurrentInfo) GetTotalBalance() int64

func (*RepIssuanceCurrentInfo) ProtoMessage

func (*RepIssuanceCurrentInfo) ProtoMessage()

func (*RepIssuanceCurrentInfo) ProtoReflect added in v1.65.3

func (x *RepIssuanceCurrentInfo) ProtoReflect() protoreflect.Message

func (*RepIssuanceCurrentInfo) Reset

func (x *RepIssuanceCurrentInfo) Reset()

func (*RepIssuanceCurrentInfo) String

func (x *RepIssuanceCurrentInfo) String() string

type RepIssuanceCurrentInfos

type RepIssuanceCurrentInfos struct {
	Infos []*RepIssuanceCurrentInfo `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos,omitempty"`
	// contains filtered or unexported fields
}

返回多期发行信息

func (*RepIssuanceCurrentInfos) Descriptor deprecated

func (*RepIssuanceCurrentInfos) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuanceCurrentInfos.ProtoReflect.Descriptor instead.

func (*RepIssuanceCurrentInfos) GetInfos

func (*RepIssuanceCurrentInfos) ProtoMessage

func (*RepIssuanceCurrentInfos) ProtoMessage()

func (*RepIssuanceCurrentInfos) ProtoReflect added in v1.65.3

func (x *RepIssuanceCurrentInfos) ProtoReflect() protoreflect.Message

func (*RepIssuanceCurrentInfos) Reset

func (x *RepIssuanceCurrentInfos) Reset()

func (*RepIssuanceCurrentInfos) String

func (x *RepIssuanceCurrentInfos) String() string

type RepIssuanceDebtInfo

type RepIssuanceDebtInfo struct {
	Record *DebtRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

返回记录

func (*RepIssuanceDebtInfo) Descriptor deprecated

func (*RepIssuanceDebtInfo) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuanceDebtInfo.ProtoReflect.Descriptor instead.

func (*RepIssuanceDebtInfo) GetRecord

func (x *RepIssuanceDebtInfo) GetRecord() *DebtRecord

func (*RepIssuanceDebtInfo) ProtoMessage

func (*RepIssuanceDebtInfo) ProtoMessage()

func (*RepIssuanceDebtInfo) ProtoReflect added in v1.65.3

func (x *RepIssuanceDebtInfo) ProtoReflect() protoreflect.Message

func (*RepIssuanceDebtInfo) Reset

func (x *RepIssuanceDebtInfo) Reset()

func (*RepIssuanceDebtInfo) String

func (x *RepIssuanceDebtInfo) String() string

type RepIssuanceIDs

type RepIssuanceIDs struct {
	IDs []string `protobuf:"bytes,1,rep,name=IDs,proto3" json:"IDs,omitempty"`
	// contains filtered or unexported fields
}

返回发行ID列表

func (*RepIssuanceIDs) Descriptor deprecated

func (*RepIssuanceIDs) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuanceIDs.ProtoReflect.Descriptor instead.

func (*RepIssuanceIDs) GetIDs

func (x *RepIssuanceIDs) GetIDs() []string

func (*RepIssuanceIDs) ProtoMessage

func (*RepIssuanceIDs) ProtoMessage()

func (*RepIssuanceIDs) ProtoReflect added in v1.65.3

func (x *RepIssuanceIDs) ProtoReflect() protoreflect.Message

func (*RepIssuanceIDs) Reset

func (x *RepIssuanceIDs) Reset()

func (*RepIssuanceIDs) String

func (x *RepIssuanceIDs) String() string

type RepIssuancePrice

type RepIssuancePrice struct {
	Price int64 `protobuf:"varint,1,opt,name=price,proto3" json:"price,omitempty"` //当前抵押物最新价格
	// contains filtered or unexported fields
}

返回最新抵押物价格

func (*RepIssuancePrice) Descriptor deprecated

func (*RepIssuancePrice) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuancePrice.ProtoReflect.Descriptor instead.

func (*RepIssuancePrice) GetPrice

func (x *RepIssuancePrice) GetPrice() int64

func (*RepIssuancePrice) ProtoMessage

func (*RepIssuancePrice) ProtoMessage()

func (*RepIssuancePrice) ProtoReflect added in v1.65.3

func (x *RepIssuancePrice) ProtoReflect() protoreflect.Message

func (*RepIssuancePrice) Reset

func (x *RepIssuancePrice) Reset()

func (*RepIssuancePrice) String

func (x *RepIssuancePrice) String() string

type RepIssuanceRecords

type RepIssuanceRecords struct {
	Records []*DebtRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

返回记录列表

func (*RepIssuanceRecords) Descriptor deprecated

func (*RepIssuanceRecords) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuanceRecords.ProtoReflect.Descriptor instead.

func (*RepIssuanceRecords) GetRecords

func (x *RepIssuanceRecords) GetRecords() []*DebtRecord

func (*RepIssuanceRecords) ProtoMessage

func (*RepIssuanceRecords) ProtoMessage()

func (*RepIssuanceRecords) ProtoReflect added in v1.65.3

func (x *RepIssuanceRecords) ProtoReflect() protoreflect.Message

func (*RepIssuanceRecords) Reset

func (x *RepIssuanceRecords) Reset()

func (*RepIssuanceRecords) String

func (x *RepIssuanceRecords) String() string

type RepIssuanceUserBalance

type RepIssuanceUserBalance struct {
	Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"` //返回用户发行总额
	// contains filtered or unexported fields
}

返回用户发行总额

func (*RepIssuanceUserBalance) Descriptor deprecated

func (*RepIssuanceUserBalance) Descriptor() ([]byte, []int)

Deprecated: Use RepIssuanceUserBalance.ProtoReflect.Descriptor instead.

func (*RepIssuanceUserBalance) GetBalance

func (x *RepIssuanceUserBalance) GetBalance() int64

func (*RepIssuanceUserBalance) ProtoMessage

func (*RepIssuanceUserBalance) ProtoMessage()

func (*RepIssuanceUserBalance) ProtoReflect added in v1.65.3

func (x *RepIssuanceUserBalance) ProtoReflect() protoreflect.Message

func (*RepIssuanceUserBalance) Reset

func (x *RepIssuanceUserBalance) Reset()

func (*RepIssuanceUserBalance) String

func (x *RepIssuanceUserBalance) String() string

type ReqIssuanceByStatus

type ReqIssuanceByStatus struct {
	Status     int32  `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	IssuanceId string `protobuf:"bytes,2,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
	// contains filtered or unexported fields
}

根据发行状态查询

func (*ReqIssuanceByStatus) Descriptor deprecated

func (*ReqIssuanceByStatus) Descriptor() ([]byte, []int)

Deprecated: Use ReqIssuanceByStatus.ProtoReflect.Descriptor instead.

func (*ReqIssuanceByStatus) GetIssuanceId

func (x *ReqIssuanceByStatus) GetIssuanceId() string

func (*ReqIssuanceByStatus) GetStatus

func (x *ReqIssuanceByStatus) GetStatus() int32

func (*ReqIssuanceByStatus) ProtoMessage

func (*ReqIssuanceByStatus) ProtoMessage()

func (*ReqIssuanceByStatus) ProtoReflect added in v1.65.3

func (x *ReqIssuanceByStatus) ProtoReflect() protoreflect.Message

func (*ReqIssuanceByStatus) Reset

func (x *ReqIssuanceByStatus) Reset()

func (*ReqIssuanceByStatus) String

func (x *ReqIssuanceByStatus) String() string

type ReqIssuanceInfo

type ReqIssuanceInfo struct {
	IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
	// contains filtered or unexported fields
}

根据ID查询发行信息

func (*ReqIssuanceInfo) Descriptor deprecated

func (*ReqIssuanceInfo) Descriptor() ([]byte, []int)

Deprecated: Use ReqIssuanceInfo.ProtoReflect.Descriptor instead.

func (*ReqIssuanceInfo) GetIssuanceId

func (x *ReqIssuanceInfo) GetIssuanceId() string

func (*ReqIssuanceInfo) ProtoMessage

func (*ReqIssuanceInfo) ProtoMessage()

func (*ReqIssuanceInfo) ProtoReflect added in v1.65.3

func (x *ReqIssuanceInfo) ProtoReflect() protoreflect.Message

func (*ReqIssuanceInfo) Reset

func (x *ReqIssuanceInfo) Reset()

func (*ReqIssuanceInfo) String

func (x *ReqIssuanceInfo) String() string

type ReqIssuanceInfos

type ReqIssuanceInfos struct {
	IssuanceIds []string `protobuf:"bytes,1,rep,name=issuanceIds,proto3" json:"issuanceIds,omitempty"`
	// contains filtered or unexported fields
}

根据ID列表查询多期发行信息

func (*ReqIssuanceInfos) Descriptor deprecated

func (*ReqIssuanceInfos) Descriptor() ([]byte, []int)

Deprecated: Use ReqIssuanceInfos.ProtoReflect.Descriptor instead.

func (*ReqIssuanceInfos) GetIssuanceIds

func (x *ReqIssuanceInfos) GetIssuanceIds() []string

func (*ReqIssuanceInfos) ProtoMessage

func (*ReqIssuanceInfos) ProtoMessage()

func (*ReqIssuanceInfos) ProtoReflect added in v1.65.3

func (x *ReqIssuanceInfos) ProtoReflect() protoreflect.Message

func (*ReqIssuanceInfos) Reset

func (x *ReqIssuanceInfos) Reset()

func (*ReqIssuanceInfos) String

func (x *ReqIssuanceInfos) String() string

type ReqIssuanceRecords

type ReqIssuanceRecords struct {
	IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
	Addr       string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Status     int32  `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	DebtId     string `protobuf:"bytes,4,opt,name=debtId,proto3" json:"debtId,omitempty"`
	// contains filtered or unexported fields
}

根据用户地址查询抵押记录

func (*ReqIssuanceRecords) Descriptor deprecated

func (*ReqIssuanceRecords) Descriptor() ([]byte, []int)

Deprecated: Use ReqIssuanceRecords.ProtoReflect.Descriptor instead.

func (*ReqIssuanceRecords) GetAddr

func (x *ReqIssuanceRecords) GetAddr() string

func (*ReqIssuanceRecords) GetDebtId

func (x *ReqIssuanceRecords) GetDebtId() string

func (*ReqIssuanceRecords) GetIssuanceId

func (x *ReqIssuanceRecords) GetIssuanceId() string

func (*ReqIssuanceRecords) GetStatus

func (x *ReqIssuanceRecords) GetStatus() int32

func (*ReqIssuanceRecords) ProtoMessage

func (*ReqIssuanceRecords) ProtoMessage()

func (*ReqIssuanceRecords) ProtoReflect added in v1.65.3

func (x *ReqIssuanceRecords) ProtoReflect() protoreflect.Message

func (*ReqIssuanceRecords) Reset

func (x *ReqIssuanceRecords) Reset()

func (*ReqIssuanceRecords) String

func (x *ReqIssuanceRecords) String() string

Jump to

Keyboard shortcuts

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