Commit be7eb574 authored by pengjun's avatar pengjun

#627 add manage action

parent fd703948
package commands
import (
"fmt"
"github.com/spf13/cobra"
jsonrpc "github.com/33cn/chain33/rpc/jsonclient"
rpctypes "github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
pkt "github.com/33cn/plugin/plugin/dapp/collateralize/types"
)
// CollateralizeCmd 斗牛游戏命令行
func CollateralizeCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "collateralize",
Short: "Collateralize command",
Args: cobra.MinimumNArgs(1),
}
cmd.AddCommand(
CollateralizeCreateRawTxCmd(),
//CollateralizeBorrowRawTxCmd(),
//CollateralizeAppendRawTxCmd(),
//CollateralizeRepayRawTxCmd(),
//CollateralizePriceFeedRawTxCmd(),
//CollateralizeCloseRawTxCmd(),
//CollateralizeManageRawTxCmd(),
)
return cmd
}
// CollateralizeCreateRawTxCmd 生成开始交易命令行
func CollateralizeCreateRawTxCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "create",
Short: "Create a collateralize",
Run: CollateralizeCreate,
}
addCollateralizeCreateFlags(cmd)
return cmd
}
func addCollateralizeCreateFlags(cmd *cobra.Command) {
cmd.Flags().Uint64P("balance", "b", 0, "balance")
cmd.MarkFlagRequired("balance")
}
func CollateralizeCreate(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
balance, _ := cmd.Flags().GetUint64("balance")
params := &rpctypes.CreateTxIn{
Execer: types.ExecName(pkt.CollateralizeX),
ActionName: "Create",
Payload: []byte(fmt.Sprintf("{\"balance\":%d}", balance)),
}
var res string
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.CreateTransaction", params, &res)
ctx.RunWithoutMarshal()
}
\ No newline at end of file
......@@ -23,12 +23,13 @@ const (
)
const (
decimal = types.Coin // 1e8
MaxDebtCeiling = 10000 // 最大借贷限额
MinLiquidationRatio = 0.3 // 最小质押比
MaxStabilityFee = 1000 // 最大稳定费
PriceWarningRate = 1.3 // 价格提前预警率
ExpireWarningTime = 3600 * 24 * 10 // 提前10天超时预警
Coin = types.Coin // 1e8
DefaultDebtCeiling = 10000 // 默认借贷限额
DefaultLiquidationRatio = 0.4 // 默认质押比
DefaultStabilityFeeRation = 0.08 // 默认稳定费
DefaultPeriod = 3600 * 24 * 365 // 默认合约限期
PriceWarningRate = 1.3 // 价格提前预警率
ExpireWarningTime = 3600 * 24 * 10 // 提前10天超时预警
)
// CollateralizeDB def
......@@ -58,6 +59,18 @@ func Key(id string) (key []byte) {
return key
}
// Key for CollateralizeConfig
func ConfigKey() (key []byte) {
key = append(key, []byte("mavl-"+pty.CollateralizeX+"config")...)
return key
}
// Key for CollateralizeAddrConfig
func AddrKey() (key []byte) {
key = append(key, []byte("mavl-"+pty.CollateralizeX+"addr")...)
return key
}
// Action struct
type Action struct {
coinsAccount *account.DB // bty账户
......@@ -204,21 +217,125 @@ func getLatestExpireTime(coll *pty.Collateralize) int64 {
return latest
}
// CollateralizeConfig 设置全局借贷参数(管理员权限)
func (action *Action) CollateralizeManage(manage *pty.CollateralizeManage) (*types.Receipt, error) {
var kv []*types.KeyValue
var receipt *types.Receipt
// 是否配置管理用户
if !isRightAddr(configKey, action.fromaddr, action.db) {
clog.Error("CollateralizeManage", "addr", action.fromaddr, "error", "Address has no permission to config")
return nil, pty.ErrPermissionDeny
}
if manage.Cfg != nil {
// 配置借贷参数
config := manage.Cfg
if config.DebtCeiling < 0 || config.LiquidationRatio < 0 || config.LiquidationRatio >= 1 ||
config.StabilityFeeRatio < 0 || config.StabilityFeeRatio >= 1 {
return nil, pty.ErrRiskParam
}
collConfig := &pty.CollateralizeConfig{}
collConfig.StabilityFeeRatio = config.StabilityFeeRatio
collConfig.Period = config.Period
collConfig.LiquidationRatio = config.LiquidationRatio
collConfig.DebtCeiling = config.DebtCeiling
value := types.Encode(collConfig)
action.db.Set(ConfigKey(), value)
kv = append(kv, &types.KeyValue{Key: ConfigKey(), Value: value})
} else if manage.Addr != nil {
// 添加大户地址
data, err := action.db.Get(AddrKey())
if err != nil {
if err != types.ErrNotFound {
clog.Error("CollateralizeManage", "error", err)
return nil, err
}
value := types.Encode(manage.Addr)
action.db.Set(AddrKey(), value)
kv = append(kv, &types.KeyValue{Key:AddrKey(), Value: value})
} else {
var addrStore pty.CollateralizeAddr
err = types.Decode(data, &addrStore)
if err != nil {
clog.Debug("CollateralizeManage", "decode", err)
return nil, err
}
addrStore.SuperAddrs = append(addrStore.SuperAddrs, manage.Addr.SuperAddrs...)
value := types.Encode(&addrStore)
action.db.Set(AddrKey(), value)
kv = append(kv, &types.KeyValue{Key:AddrKey(), Value: value})
}
}
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: nil}
return receipt, nil
}
func (action *Action) getCollateralizeConfig() (*pty.CollateralizeConfig, error) {
data, err := action.db.Get(ConfigKey())
if err != nil {
clog.Debug("getCollateralizeConfig", "error", err)
return nil, err
}
var collCfg pty.CollateralizeConfig
err = types.Decode(data, &collCfg)
if err != nil {
clog.Debug("getCollateralizeConfig", "decode", err)
return nil, err
}
return &collCfg, nil
}
func (action *Action) getSuperAddr() []string {
data, err := action.db.Get(AddrKey())
if err != nil {
clog.Error("getSuperAddr", "error", err)
return nil
}
var addrStore pty.CollateralizeAddr
err = types.Decode(data, &addrStore)
if err != nil {
clog.Debug("getSuperAddr", "decode", err)
return nil
}
return addrStore.SuperAddrs
}
func isSuperAddr(super []string, addr string) bool {
if super == nil || len(super) == 0 {
return false
}
for _, superAddr := range super {
if superAddr == addr {
return true
}
}
return false
}
// CollateralizeCreate 创建借贷,持有一定数量ccny的用户可创建借贷,提供给其他用户借贷
func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*types.Receipt, error) {
var logs []*types.ReceiptLog
var kv []*types.KeyValue
var receipt *types.Receipt
collateralizeID := common.ToHex(action.txhash)
// 参数校验
if create.DebtCeiling > MaxDebtCeiling || create.DebtCeiling < 0 ||
create.LiquidationRatio < MinLiquidationRatio || create.LiquidationRatio >= 1 ||
create.StabilityFee > MaxStabilityFee || create.StabilityFee < 0 {
return nil, pty.ErrRiskParam
superAddr := action.getSuperAddr()
if !isSuperAddr(superAddr, action.fromaddr) {
clog.Error("CollateralizeCreate", "error", "CollateralizeCreate need super address")
return nil, pty.ErrPermissionDeny
}
collateralizeID := common.ToHex(action.txhash)
// 检查ccny余额
if !action.CheckExecTokenAccount(action.fromaddr, create.TotalBalance, false) {
return nil, types.ErrInsufficientBalance
......@@ -240,13 +357,23 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
// 获取借贷配置
var collcfg *pty.CollateralizeConfig
cfg, err := action.getCollateralizeConfig()
if err != nil {
collcfg = &pty.CollateralizeConfig{DebtCeiling:DefaultDebtCeiling, LiquidationRatio:DefaultLiquidationRatio, StabilityFeeRatio:DefaultStabilityFeeRation, Period:DefaultPeriod}
} else {
collcfg = cfg
}
// 构造coll结构
coll := &CollateralizeDB{}
coll.CollateralizeId = collateralizeID
coll.LiquidationRatio = create.LiquidationRatio
coll.LiquidationRatio = collcfg.LiquidationRatio
coll.TotalBalance = create.TotalBalance
coll.DebtCeiling = create.DebtCeiling
coll.StabilityFee = create.StabilityFee
coll.DebtCeiling = collcfg.DebtCeiling
coll.StabilityFeeRatio = collcfg.StabilityFeeRatio
coll.Period = collcfg.Period
coll.Balance = create.TotalBalance
coll.CreateAddr = action.fromaddr
coll.Status = pty.CollateralizeActionCreate
......@@ -406,7 +533,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
}
// 抵押物转账
receipt, err := action.coinsAccount.ExecTransfer(action.fromaddr, coll.CreateAddr, action.execaddr, btyFrozen*decimal)
receipt, err := action.coinsAccount.ExecTransfer(action.fromaddr, coll.CreateAddr, action.execaddr, btyFrozen*Coin)
if err != nil {
clog.Error("CollateralizeBorrow.ExecTransfer", "addr", action.fromaddr, "execaddr", action.execaddr, "amount", btyFrozen)
return nil, err
......@@ -508,7 +635,7 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
}
// 借贷金额+利息
realRepay := repay.Value + repay.Value/20
realRepay := repay.Value + int64(float32(repay.Value) * coll.StabilityFeeRatio) + 1
// 检查
if !action.CheckExecTokenAccount(action.fromaddr, realRepay, false) {
......@@ -603,7 +730,7 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
}
// 抵押物转账
receipt, err := action.coinsAccount.ExecTransfer(action.fromaddr, coll.CreateAddr, action.execaddr, cAppend.CollateralValue*decimal)
receipt, err := action.coinsAccount.ExecTransfer(action.fromaddr, coll.CreateAddr, action.execaddr, cAppend.CollateralValue*Coin)
if err != nil {
clog.Error("CollateralizeBorrow.ExecTransfer", "addr", action.fromaddr, "execaddr", action.execaddr, "amount", cAppend.CollateralValue, "err", err)
return nil, err
......@@ -651,23 +778,24 @@ func getManageKey(key string, db dbm.KV) ([]byte, error) {
const (
priceFeedKey = "collateralize-price-feed"
guarantorKey = "collateralize-guarantor"
configKey = "collateralize-config"
)
func isRightPriceFeed(addr string, db dbm.KV) bool {
value, err := getManageKey(priceFeedKey, db)
func isRightAddr(key string, addr string, db dbm.KV) bool {
value, err := getManageKey(key, db)
if err != nil {
clog.Error("CollateralizePriceFeed", "priceFeedKey", priceFeedKey)
clog.Error("isRightAddr", "Key", key)
return false
}
if value == nil {
clog.Error("CollateralizePriceFeed priceFeedKey found nil value")
clog.Error("isRightAddr", "key", key, "error", "Found key nil value")
return false
}
var item types.ConfigItem
err = types.Decode(value, &item)
if err != nil {
clog.Error("CollateralizePriceFeed", "Decode", value)
clog.Error("isRightAddr", "Decode", value)
return false
}
......@@ -791,12 +919,12 @@ func (action *Action) expireLiquidation(coll *pty.Collateralize) (*types.Receipt
// 借贷记录清算
borrowRecord.LiquidateTime = action.blocktime
preStatus = borrowRecord.Status
borrowRecord.Status = pty.CollateralizeUserStatusSystemLiquidate
borrowRecord.Status = pty.CollateralizeUserStatusExpireLiquidate
coll.BorrowRecords = append(coll.BorrowRecords[:index], coll.BorrowRecords[index+1:]...)
coll.InvalidRecords = append(coll.InvalidRecords, borrowRecord)
} else {
preStatus = borrowRecord.Status
borrowRecord.Status = pty.CollateralizeUserStatusWarning
borrowRecord.Status = pty.CollateralizeUserStatusExpire
}
log := action.GetFeedReceiptLog(coll, borrowRecord, preStatus)
......@@ -839,9 +967,9 @@ func (action *Action) CollateralizeFeed(feed *pty.CollateralizeFeed) (*types.Rec
}
// 是否后台管理用户
if !isRightPriceFeed(action.fromaddr, action.db) {
if !isRightAddr(priceFeedKey, action.fromaddr, action.db) {
clog.Error("CollateralizePriceFeed", "addr", action.fromaddr, "error", "Address has no permission to feed price")
return nil, pty.ErrPriceFeedPermissionDeny
return nil, pty.ErrPermissionDeny
}
price := pricePolicy(feed)
......
......@@ -21,7 +21,7 @@ func (c *Collateralize) Query_CollateralizeInfoByID(req *pty.ReqCollateralizeInf
TotalBalance: coll.TotalBalance,
DebtCeiling: coll.DebtCeiling,
LiquidationRatio: coll.LiquidationRatio,
StabilityFee: coll.StabilityFee,
StabilityFeeRatio: coll.StabilityFeeRatio,
CreateAddr: coll.CreateAddr,
Balance: coll.Balance,
}, nil
......@@ -41,7 +41,7 @@ func (c *Collateralize) Query_CollateralizeInfoByIDs(req *pty.ReqCollateralizeIn
TotalBalance: coll.TotalBalance,
DebtCeiling: coll.DebtCeiling,
LiquidationRatio: coll.LiquidationRatio,
StabilityFee: coll.StabilityFee,
StabilityFeeRatio: coll.StabilityFeeRatio,
CreateAddr: coll.CreateAddr,
Balance: coll.Balance,
})
......
......@@ -6,6 +6,7 @@ package collateralize
import (
"github.com/33cn/chain33/pluginmgr"
"github.com/33cn/plugin/plugin/dapp/collateralize/commands"
"github.com/33cn/plugin/plugin/dapp/collateralize/executor"
"github.com/33cn/plugin/plugin/dapp/collateralize/types"
)
......@@ -15,7 +16,6 @@ func init() {
Name: types.CollateralizeX,
ExecName: executor.GetName(),
Exec: executor.Init,
Cmd: nil,
RPC: nil,
Cmd: commands.CollateralizeCmd,
})
}
......@@ -8,7 +8,7 @@ message Collateralize {
int64 totalBalance = 2; //当期可借贷的总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny)
float liquidationRatio = 4; //清算比例
int64 stabilityFee = 5; //稳定费
float stabilityFeeRatio = 5; //稳定费率
string createAddr = 6; //创建人地址
int64 balance = 7; //剩余可借贷金额(ccny)
repeated BorrowRecord borrowRecords = 8; //借贷记录
......@@ -51,16 +51,29 @@ message CollateralizeAction {
CollateralizeAppend append = 4; //追加
CollateralizeFeed feed = 5; //喂价
CollateralizeClose close = 6; //关闭
CollateralizeManage manage = 7; //全局配置
}
int32 ty = 10;
}
// 创建借贷
message CollateralizeCreate {
message CollateralizeManage {
CollateralizeConfig cfg = 1; //借贷配置
CollateralizeAddr addr = 2; //地址配置
}
message CollateralizeConfig {
int64 debtCeiling = 1; //单用户可借出的限额(ccny)
float liquidationRatio = 2; //清算比例
int64 stabilityFee = 3; //稳定费
int64 totalBalance = 4; //可借贷总金额
float stabilityFeeRatio = 3; //稳定费
int64 period = 4; //合约期限
}
message CollateralizeAddr {
repeated string superAddrs = 1; //大户地址
}
// 创建借贷
message CollateralizeCreate {
int64 totalBalance = 1; //可借贷总金额
}
// 质押借出
......@@ -127,7 +140,7 @@ message RepCollateralizeCurrentInfo {
int64 totalBalance = 2; //当期可借贷的总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny)
float liquidationRatio = 4; //清算比例
int64 stabilityFee = 5; //稳定费
float stabilityFeeRatio = 5; //稳定费
int64 liquidationPenalty = 6; //清算罚金
string createAddr = 7; //创建人地址
int64 balance = 8; //剩余可借贷金额(ccny)
......
......@@ -109,6 +109,18 @@ func (Collateralize CollateralizeType) CreateTx(action string, message json.RawM
return nil, types.ErrInvalidParam
}
return CreateRawCollateralizeCloseTx(&param)
} else if action == "CollateralizeManage" {
var param CollateralizeManageTx
err := json.Unmarshal(message, &param)
if err != nil {
llog.Error("CreateTx", "Error", err)
return nil, types.ErrInvalidParam
}
if param.Addr != nil {
return CreateRawCollateralizeManageAddrTx(&param)
}
return CreateRawCollateralizeManageConfigTx(&param)
} else {
return nil, types.ErrNotSupport
}
......@@ -123,6 +135,7 @@ func (Collateralize CollateralizeType) GetTypeMap() map[string]int32 {
"Append": CollateralizeActionAppend,
"Feed": CollateralizeActionFeed,
"Close": CollateralizeActionClose,
"Manage": CollateralizeActionManage,
}
}
......@@ -134,9 +147,6 @@ func CreateRawCollateralizeCreateTx(parm *CollateralizeCreateTx) (*types.Transac
}
v := &CollateralizeCreate{
DebtCeiling: parm.DebtCeiling,
LiquidationRatio: parm.LiquidationRatio,
StabilityFee: parm.StabilityFee,
TotalBalance: parm.TotalBalance,
}
create := &CollateralizeAction{
......@@ -301,3 +311,66 @@ func CreateRawCollateralizeCloseTx(parm *CollateralizeCloseTx) (*types.Transacti
}
return tx, nil
}
// CreateRawCollateralizeManageConfigTx method
func CreateRawCollateralizeManageConfigTx(parm *CollateralizeManageTx) (*types.Transaction, error) {
if parm == nil {
llog.Error("CreateRawCollateralizeManageTx", "parm", parm)
return nil, types.ErrInvalidParam
}
v := &CollateralizeManage{}
v.Cfg = &CollateralizeConfig{
DebtCeiling: parm.DebtCeiling,
LiquidationRatio: parm.LiquidationRatio,
StabilityFeeRatio: parm.StabilityFeeRatio,
Period: parm.Period,
}
close := &CollateralizeAction{
Ty: CollateralizeActionManage,
Value: &CollateralizeAction_Manage{v},
}
tx := &types.Transaction{
Execer: []byte(types.ExecName(CollateralizeX)),
Payload: types.Encode(close),
Fee: parm.Fee,
To: address.ExecAddress(types.ExecName(CollateralizeX)),
}
name := types.ExecName(CollateralizeX)
tx, err := types.FormatTx(name, tx)
if err != nil {
return nil, err
}
return tx, nil
}
// CreateRawCollateralizeManageAddrTx method
func CreateRawCollateralizeManageAddrTx(parm *CollateralizeManageTx) (*types.Transaction, error) {
if parm == nil {
llog.Error("CreateRawCollateralizeManageTx", "parm", parm)
return nil, types.ErrInvalidParam
}
v := &CollateralizeManage{}
v.Addr = &CollateralizeAddr{SuperAddrs:parm.Addr}
close := &CollateralizeAction{
Ty: CollateralizeActionManage,
Value: &CollateralizeAction_Manage{v},
}
tx := &types.Transaction{
Execer: []byte(types.ExecName(CollateralizeX)),
Payload: types.Encode(close),
Fee: parm.Fee,
To: address.ExecAddress(types.ExecName(CollateralizeX)),
}
name := types.ExecName(CollateralizeX)
tx, err := types.FormatTx(name, tx)
if err != nil {
return nil, err
}
return tx, nil
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ type Collateralize struct {
TotalBalance int64 `protobuf:"varint,2,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`
DebtCeiling int64 `protobuf:"varint,3,opt,name=debtCeiling,proto3" json:"debtCeiling,omitempty"`
LiquidationRatio float32 `protobuf:"fixed32,4,opt,name=liquidationRatio,proto3" json:"liquidationRatio,omitempty"`
StabilityFee int64 `protobuf:"varint,5,opt,name=stabilityFee,proto3" json:"stabilityFee,omitempty"`
StabilityFeeRatio float32 `protobuf:"fixed32,5,opt,name=stabilityFeeRatio,proto3" json:"stabilityFeeRatio,omitempty"`
CreateAddr string `protobuf:"bytes,6,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
Balance int64 `protobuf:"varint,7,opt,name=balance,proto3" json:"balance,omitempty"`
BorrowRecords []*BorrowRecord `protobuf:"bytes,8,rep,name=borrowRecords,proto3" json:"borrowRecords,omitempty"`
......@@ -94,9 +94,9 @@ func (m *Collateralize) GetLiquidationRatio() float32 {
return 0
}
func (m *Collateralize) GetStabilityFee() int64 {
func (m *Collateralize) GetStabilityFeeRatio() float32 {
if m != nil {
return m.StabilityFee
return m.StabilityFeeRatio
}
return 0
}
......@@ -349,6 +349,7 @@ type CollateralizeAction struct {
// *CollateralizeAction_Append
// *CollateralizeAction_Feed
// *CollateralizeAction_Close
// *CollateralizeAction_Manage
Value isCollateralizeAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -409,6 +410,10 @@ type CollateralizeAction_Close struct {
Close *CollateralizeClose `protobuf:"bytes,6,opt,name=close,proto3,oneof"`
}
type CollateralizeAction_Manage struct {
Manage *CollateralizeManage `protobuf:"bytes,7,opt,name=manage,proto3,oneof"`
}
func (*CollateralizeAction_Create) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Borrow) isCollateralizeAction_Value() {}
......@@ -421,6 +426,8 @@ func (*CollateralizeAction_Feed) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Close) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Manage) isCollateralizeAction_Value() {}
func (m *CollateralizeAction) GetValue() isCollateralizeAction_Value {
if m != nil {
return m.Value
......@@ -470,6 +477,13 @@ func (m *CollateralizeAction) GetClose() *CollateralizeClose {
return nil
}
func (m *CollateralizeAction) GetManage() *CollateralizeManage {
if x, ok := m.GetValue().(*CollateralizeAction_Manage); ok {
return x.Manage
}
return nil
}
func (m *CollateralizeAction) GetTy() int32 {
if m != nil {
return m.Ty
......@@ -486,66 +500,192 @@ func (*CollateralizeAction) XXX_OneofWrappers() []interface{} {
(*CollateralizeAction_Append)(nil),
(*CollateralizeAction_Feed)(nil),
(*CollateralizeAction_Close)(nil),
(*CollateralizeAction_Manage)(nil),
}
}
// 创建借贷
type CollateralizeCreate struct {
type CollateralizeManage struct {
Cfg *CollateralizeConfig `protobuf:"bytes,1,opt,name=cfg,proto3" json:"cfg,omitempty"`
Addr *CollateralizeAddr `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollateralizeManage) Reset() { *m = CollateralizeManage{} }
func (m *CollateralizeManage) String() string { return proto.CompactTextString(m) }
func (*CollateralizeManage) ProtoMessage() {}
func (*CollateralizeManage) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{4}
}
func (m *CollateralizeManage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeManage.Unmarshal(m, b)
}
func (m *CollateralizeManage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeManage.Marshal(b, m, deterministic)
}
func (m *CollateralizeManage) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeManage.Merge(m, src)
}
func (m *CollateralizeManage) XXX_Size() int {
return xxx_messageInfo_CollateralizeManage.Size(m)
}
func (m *CollateralizeManage) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeManage.DiscardUnknown(m)
}
var xxx_messageInfo_CollateralizeManage proto.InternalMessageInfo
func (m *CollateralizeManage) GetCfg() *CollateralizeConfig {
if m != nil {
return m.Cfg
}
return nil
}
func (m *CollateralizeManage) GetAddr() *CollateralizeAddr {
if m != nil {
return m.Addr
}
return nil
}
type CollateralizeConfig struct {
DebtCeiling int64 `protobuf:"varint,1,opt,name=debtCeiling,proto3" json:"debtCeiling,omitempty"`
LiquidationRatio float32 `protobuf:"fixed32,2,opt,name=liquidationRatio,proto3" json:"liquidationRatio,omitempty"`
StabilityFee int64 `protobuf:"varint,3,opt,name=stabilityFee,proto3" json:"stabilityFee,omitempty"`
TotalBalance int64 `protobuf:"varint,4,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`
StabilityFeeRatio float32 `protobuf:"fixed32,3,opt,name=stabilityFeeRatio,proto3" json:"stabilityFeeRatio,omitempty"`
Period int64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollateralizeCreate) Reset() { *m = CollateralizeCreate{} }
func (m *CollateralizeCreate) String() string { return proto.CompactTextString(m) }
func (*CollateralizeCreate) ProtoMessage() {}
func (*CollateralizeCreate) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{4}
func (m *CollateralizeConfig) Reset() { *m = CollateralizeConfig{} }
func (m *CollateralizeConfig) String() string { return proto.CompactTextString(m) }
func (*CollateralizeConfig) ProtoMessage() {}
func (*CollateralizeConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{5}
}
func (m *CollateralizeCreate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeCreate.Unmarshal(m, b)
func (m *CollateralizeConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeConfig.Unmarshal(m, b)
}
func (m *CollateralizeCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeCreate.Marshal(b, m, deterministic)
func (m *CollateralizeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeConfig.Marshal(b, m, deterministic)
}
func (m *CollateralizeCreate) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeCreate.Merge(m, src)
func (m *CollateralizeConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeConfig.Merge(m, src)
}
func (m *CollateralizeCreate) XXX_Size() int {
return xxx_messageInfo_CollateralizeCreate.Size(m)
func (m *CollateralizeConfig) XXX_Size() int {
return xxx_messageInfo_CollateralizeConfig.Size(m)
}
func (m *CollateralizeCreate) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeCreate.DiscardUnknown(m)
func (m *CollateralizeConfig) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeConfig.DiscardUnknown(m)
}
var xxx_messageInfo_CollateralizeCreate proto.InternalMessageInfo
var xxx_messageInfo_CollateralizeConfig proto.InternalMessageInfo
func (m *CollateralizeCreate) GetDebtCeiling() int64 {
func (m *CollateralizeConfig) GetDebtCeiling() int64 {
if m != nil {
return m.DebtCeiling
}
return 0
}
func (m *CollateralizeCreate) GetLiquidationRatio() float32 {
func (m *CollateralizeConfig) GetLiquidationRatio() float32 {
if m != nil {
return m.LiquidationRatio
}
return 0
}
func (m *CollateralizeCreate) GetStabilityFee() int64 {
func (m *CollateralizeConfig) GetStabilityFeeRatio() float32 {
if m != nil {
return m.StabilityFee
return m.StabilityFeeRatio
}
return 0
}
func (m *CollateralizeConfig) GetPeriod() int64 {
if m != nil {
return m.Period
}
return 0
}
type CollateralizeAddr struct {
SuperAddrs []string `protobuf:"bytes,1,rep,name=superAddrs,proto3" json:"superAddrs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollateralizeAddr) Reset() { *m = CollateralizeAddr{} }
func (m *CollateralizeAddr) String() string { return proto.CompactTextString(m) }
func (*CollateralizeAddr) ProtoMessage() {}
func (*CollateralizeAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{6}
}
func (m *CollateralizeAddr) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeAddr.Unmarshal(m, b)
}
func (m *CollateralizeAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeAddr.Marshal(b, m, deterministic)
}
func (m *CollateralizeAddr) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeAddr.Merge(m, src)
}
func (m *CollateralizeAddr) XXX_Size() int {
return xxx_messageInfo_CollateralizeAddr.Size(m)
}
func (m *CollateralizeAddr) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeAddr.DiscardUnknown(m)
}
var xxx_messageInfo_CollateralizeAddr proto.InternalMessageInfo
func (m *CollateralizeAddr) GetSuperAddrs() []string {
if m != nil {
return m.SuperAddrs
}
return nil
}
// 创建借贷
type CollateralizeCreate struct {
TotalBalance int64 `protobuf:"varint,1,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollateralizeCreate) Reset() { *m = CollateralizeCreate{} }
func (m *CollateralizeCreate) String() string { return proto.CompactTextString(m) }
func (*CollateralizeCreate) ProtoMessage() {}
func (*CollateralizeCreate) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{7}
}
func (m *CollateralizeCreate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeCreate.Unmarshal(m, b)
}
func (m *CollateralizeCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeCreate.Marshal(b, m, deterministic)
}
func (m *CollateralizeCreate) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeCreate.Merge(m, src)
}
func (m *CollateralizeCreate) XXX_Size() int {
return xxx_messageInfo_CollateralizeCreate.Size(m)
}
func (m *CollateralizeCreate) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeCreate.DiscardUnknown(m)
}
var xxx_messageInfo_CollateralizeCreate proto.InternalMessageInfo
func (m *CollateralizeCreate) GetTotalBalance() int64 {
if m != nil {
return m.TotalBalance
......@@ -566,7 +706,7 @@ func (m *CollateralizeBorrow) Reset() { *m = CollateralizeBorrow{} }
func (m *CollateralizeBorrow) String() string { return proto.CompactTextString(m) }
func (*CollateralizeBorrow) ProtoMessage() {}
func (*CollateralizeBorrow) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{5}
return fileDescriptor_a988fb4a61381972, []int{8}
}
func (m *CollateralizeBorrow) XXX_Unmarshal(b []byte) error {
......@@ -614,7 +754,7 @@ func (m *CollateralizeRepay) Reset() { *m = CollateralizeRepay{} }
func (m *CollateralizeRepay) String() string { return proto.CompactTextString(m) }
func (*CollateralizeRepay) ProtoMessage() {}
func (*CollateralizeRepay) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{6}
return fileDescriptor_a988fb4a61381972, []int{9}
}
func (m *CollateralizeRepay) XXX_Unmarshal(b []byte) error {
......@@ -662,7 +802,7 @@ func (m *CollateralizeAppend) Reset() { *m = CollateralizeAppend{} }
func (m *CollateralizeAppend) String() string { return proto.CompactTextString(m) }
func (*CollateralizeAppend) ProtoMessage() {}
func (*CollateralizeAppend) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{7}
return fileDescriptor_a988fb4a61381972, []int{10}
}
func (m *CollateralizeAppend) XXX_Unmarshal(b []byte) error {
......@@ -711,7 +851,7 @@ func (m *CollateralizeFeed) Reset() { *m = CollateralizeFeed{} }
func (m *CollateralizeFeed) String() string { return proto.CompactTextString(m) }
func (*CollateralizeFeed) ProtoMessage() {}
func (*CollateralizeFeed) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{8}
return fileDescriptor_a988fb4a61381972, []int{11}
}
func (m *CollateralizeFeed) XXX_Unmarshal(b []byte) error {
......@@ -765,7 +905,7 @@ func (m *CollateralizeClose) Reset() { *m = CollateralizeClose{} }
func (m *CollateralizeClose) String() string { return proto.CompactTextString(m) }
func (*CollateralizeClose) ProtoMessage() {}
func (*CollateralizeClose) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{9}
return fileDescriptor_a988fb4a61381972, []int{12}
}
func (m *CollateralizeClose) XXX_Unmarshal(b []byte) error {
......@@ -811,7 +951,7 @@ func (m *ReceiptCollateralize) Reset() { *m = ReceiptCollateralize{} }
func (m *ReceiptCollateralize) String() string { return proto.CompactTextString(m) }
func (*ReceiptCollateralize) ProtoMessage() {}
func (*ReceiptCollateralize) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{10}
return fileDescriptor_a988fb4a61381972, []int{13}
}
func (m *ReceiptCollateralize) XXX_Unmarshal(b []byte) error {
......@@ -895,7 +1035,7 @@ func (m *CollateralizeRecord) Reset() { *m = CollateralizeRecord{} }
func (m *CollateralizeRecord) String() string { return proto.CompactTextString(m) }
func (*CollateralizeRecord) ProtoMessage() {}
func (*CollateralizeRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{11}
return fileDescriptor_a988fb4a61381972, []int{14}
}
func (m *CollateralizeRecord) XXX_Unmarshal(b []byte) error {
......@@ -949,7 +1089,7 @@ func (m *CollateralizeRecords) Reset() { *m = CollateralizeRecords{} }
func (m *CollateralizeRecords) String() string { return proto.CompactTextString(m) }
func (*CollateralizeRecords) ProtoMessage() {}
func (*CollateralizeRecords) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{12}
return fileDescriptor_a988fb4a61381972, []int{15}
}
func (m *CollateralizeRecords) XXX_Unmarshal(b []byte) error {
......@@ -989,7 +1129,7 @@ func (m *ReqCollateralizeInfo) Reset() { *m = ReqCollateralizeInfo{} }
func (m *ReqCollateralizeInfo) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeInfo) ProtoMessage() {}
func (*ReqCollateralizeInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{13}
return fileDescriptor_a988fb4a61381972, []int{16}
}
func (m *ReqCollateralizeInfo) XXX_Unmarshal(b []byte) error {
......@@ -1023,7 +1163,7 @@ type RepCollateralizeCurrentInfo struct {
TotalBalance int64 `protobuf:"varint,2,opt,name=totalBalance,proto3" json:"totalBalance,omitempty"`
DebtCeiling int64 `protobuf:"varint,3,opt,name=debtCeiling,proto3" json:"debtCeiling,omitempty"`
LiquidationRatio float32 `protobuf:"fixed32,4,opt,name=liquidationRatio,proto3" json:"liquidationRatio,omitempty"`
StabilityFee int64 `protobuf:"varint,5,opt,name=stabilityFee,proto3" json:"stabilityFee,omitempty"`
StabilityFeeRatio float32 `protobuf:"fixed32,5,opt,name=stabilityFeeRatio,proto3" json:"stabilityFeeRatio,omitempty"`
LiquidationPenalty int64 `protobuf:"varint,6,opt,name=liquidationPenalty,proto3" json:"liquidationPenalty,omitempty"`
CreateAddr string `protobuf:"bytes,7,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
Balance int64 `protobuf:"varint,8,opt,name=balance,proto3" json:"balance,omitempty"`
......@@ -1036,7 +1176,7 @@ func (m *RepCollateralizeCurrentInfo) Reset() { *m = RepCollateralizeCur
func (m *RepCollateralizeCurrentInfo) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeCurrentInfo) ProtoMessage() {}
func (*RepCollateralizeCurrentInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{14}
return fileDescriptor_a988fb4a61381972, []int{17}
}
func (m *RepCollateralizeCurrentInfo) XXX_Unmarshal(b []byte) error {
......@@ -1085,9 +1225,9 @@ func (m *RepCollateralizeCurrentInfo) GetLiquidationRatio() float32 {
return 0
}
func (m *RepCollateralizeCurrentInfo) GetStabilityFee() int64 {
func (m *RepCollateralizeCurrentInfo) GetStabilityFeeRatio() float32 {
if m != nil {
return m.StabilityFee
return m.StabilityFeeRatio
}
return 0
}
......@@ -1125,7 +1265,7 @@ func (m *ReqCollateralizeInfos) Reset() { *m = ReqCollateralizeInfos{} }
func (m *ReqCollateralizeInfos) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeInfos) ProtoMessage() {}
func (*ReqCollateralizeInfos) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{15}
return fileDescriptor_a988fb4a61381972, []int{18}
}
func (m *ReqCollateralizeInfos) XXX_Unmarshal(b []byte) error {
......@@ -1165,7 +1305,7 @@ func (m *RepCollateralizeCurrentInfos) Reset() { *m = RepCollateralizeCu
func (m *RepCollateralizeCurrentInfos) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeCurrentInfos) ProtoMessage() {}
func (*RepCollateralizeCurrentInfos) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{16}
return fileDescriptor_a988fb4a61381972, []int{19}
}
func (m *RepCollateralizeCurrentInfos) XXX_Unmarshal(b []byte) error {
......@@ -1205,7 +1345,7 @@ func (m *ReqCollateralizeByStatus) Reset() { *m = ReqCollateralizeByStat
func (m *ReqCollateralizeByStatus) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeByStatus) ProtoMessage() {}
func (*ReqCollateralizeByStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{17}
return fileDescriptor_a988fb4a61381972, []int{20}
}
func (m *ReqCollateralizeByStatus) XXX_Unmarshal(b []byte) error {
......@@ -1245,7 +1385,7 @@ func (m *ReqCollateralizeByAddr) Reset() { *m = ReqCollateralizeByAddr{}
func (m *ReqCollateralizeByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeByAddr) ProtoMessage() {}
func (*ReqCollateralizeByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{18}
return fileDescriptor_a988fb4a61381972, []int{21}
}
func (m *ReqCollateralizeByAddr) XXX_Unmarshal(b []byte) error {
......@@ -1285,7 +1425,7 @@ func (m *RepCollateralizeIDs) Reset() { *m = RepCollateralizeIDs{} }
func (m *RepCollateralizeIDs) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeIDs) ProtoMessage() {}
func (*RepCollateralizeIDs) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{19}
return fileDescriptor_a988fb4a61381972, []int{22}
}
func (m *RepCollateralizeIDs) XXX_Unmarshal(b []byte) error {
......@@ -1326,7 +1466,7 @@ func (m *ReqCollateralizeBorrowInfoByAddr) Reset() { *m = ReqCollaterali
func (m *ReqCollateralizeBorrowInfoByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeBorrowInfoByAddr) ProtoMessage() {}
func (*ReqCollateralizeBorrowInfoByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{20}
return fileDescriptor_a988fb4a61381972, []int{23}
}
func (m *ReqCollateralizeBorrowInfoByAddr) XXX_Unmarshal(b []byte) error {
......@@ -1374,7 +1514,7 @@ func (m *ReqCollateralizeBorrowInfoByStatus) Reset() { *m = ReqCollatera
func (m *ReqCollateralizeBorrowInfoByStatus) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeBorrowInfoByStatus) ProtoMessage() {}
func (*ReqCollateralizeBorrowInfoByStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{21}
return fileDescriptor_a988fb4a61381972, []int{24}
}
func (m *ReqCollateralizeBorrowInfoByStatus) XXX_Unmarshal(b []byte) error {
......@@ -1421,7 +1561,7 @@ func (m *RepCollateralizeBorrowInfos) Reset() { *m = RepCollateralizeBor
func (m *RepCollateralizeBorrowInfos) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeBorrowInfos) ProtoMessage() {}
func (*RepCollateralizeBorrowInfos) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{22}
return fileDescriptor_a988fb4a61381972, []int{25}
}
func (m *RepCollateralizeBorrowInfos) XXX_Unmarshal(b []byte) error {
......@@ -1454,6 +1594,9 @@ func init() {
proto.RegisterType((*BorrowRecord)(nil), "types.BorrowRecord")
proto.RegisterType((*AssetPriceRecord)(nil), "types.AssetPriceRecord")
proto.RegisterType((*CollateralizeAction)(nil), "types.CollateralizeAction")
proto.RegisterType((*CollateralizeManage)(nil), "types.CollateralizeManage")
proto.RegisterType((*CollateralizeConfig)(nil), "types.CollateralizeConfig")
proto.RegisterType((*CollateralizeAddr)(nil), "types.CollateralizeAddr")
proto.RegisterType((*CollateralizeCreate)(nil), "types.CollateralizeCreate")
proto.RegisterType((*CollateralizeBorrow)(nil), "types.CollateralizeBorrow")
proto.RegisterType((*CollateralizeRepay)(nil), "types.CollateralizeRepay")
......@@ -1478,70 +1621,76 @@ func init() {
func init() { proto.RegisterFile("collateralize.proto", fileDescriptor_a988fb4a61381972) }
var fileDescriptor_a988fb4a61381972 = []byte{
// 1037 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0x5e, 0xdb, 0xf9, 0x69, 0x4e, 0xb6, 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0d, 0xbd, 0x9d, 0x9a, 0xde, 0xf4, 0x3d, 0x38, 0xb1, 0xf3, 0x58,
0x3e, 0x2a, 0xc9, 0x31, 0x78, 0xcb, 0x47, 0x9b, 0x8a, 0xe5, 0x27, 0xfd, 0x11, 0x26, 0xad, 0x6d,
0xf1, 0x2e, 0x90, 0xf9, 0xea, 0x00, 0xaf, 0x75, 0xd2, 0xe8, 0x0d, 0xd0, 0xbb, 0x22, 0xe8, 0xb2,
0xf7, 0x8f, 0x51, 0x03, 0xe4, 0x1a, 0x00, 0x7d, 0xdd, 0x3e, 0x2a, 0x75, 0x9c, 0x92, 0x7c, 0x00,
0x03, 0x75, 0x2e, 0x75, 0xbb, 0x3a, 0x5f, 0xfa, 0xda, 0x64, 0x35, 0xc0, 0xff, 0x5c, 0x1f, 0xff,
0x1b, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xc2, 0xae, 0xcc, 0x8a, 0x0d, 0x00, 0x00,
// 1125 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xef, 0x6e, 0xe3, 0x44,
0x10, 0x3f, 0xdb, 0xf9, 0xd3, 0x4c, 0xae, 0xa5, 0xb7, 0x2d, 0x95, 0x29, 0xd5, 0x29, 0x5a, 0x21,
0x11, 0x41, 0x55, 0x89, 0xde, 0x09, 0x71, 0x42, 0x42, 0xb4, 0x39, 0x4e, 0x17, 0x74, 0x48, 0xc8,
0x57, 0x10, 0x5f, 0x90, 0x70, 0xec, 0x4d, 0xb1, 0xe4, 0xda, 0xae, 0xbd, 0x29, 0x17, 0x9e, 0x85,
0x17, 0x40, 0xe2, 0x0d, 0xf8, 0xc0, 0x77, 0x1e, 0x87, 0x27, 0x40, 0x33, 0xbb, 0x89, 0xed, 0x75,
0x12, 0xa5, 0xdc, 0x17, 0xbe, 0x54, 0xdd, 0xd9, 0xdf, 0x78, 0xfe, 0xfd, 0x66, 0x66, 0x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x0d, 0x3a, 0x9e, 0x52, 0xe0, 0xe7, 0xe0, 0x9a, 0xee, 0x5d,
0xce, 0x75, 0xc7, 0xac, 0x29, 0x2e, 0x3f, 0x85, 0xa3, 0xa6, 0x0e, 0xa5, 0x61, 0x41, 0x74, 0xab,
0x24, 0x3a, 0xff, 0x10, 0x0e, 0x4c, 0x3f, 0xc6, 0xcf, 0x0b, 0xb6, 0x0f, 0xce, 0xf8, 0xf9, 0x22,
0x62, 0xfc, 0x97, 0xff, 0x04, 0x83, 0xc6, 0x67, 0x69, 0x2b, 0xa0, 0xbf, 0xda, 0xc0, 0x5b, 0xf5,
0x1c, 0x9f, 0x02, 0xdf, 0x64, 0x41, 0x87, 0xbd, 0xbd, 0x8d, 0x32, 0x41, 0x76, 0x2d, 0x41, 0x5f,
0x37, 0x9b, 0xa6, 0xb4, 0x53, 0xb0, 0x8f, 0xa1, 0xa3, 0x3a, 0x54, 0x97, 0x6b, 0xe5, 0x4f, 0x21,
0x0d, 0x99, 0x74, 0xe8, 0xe7, 0xe9, 0x93, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x90, 0x50, 0xc3,
0x44, 0xb5, 0x0e, 0x00, 0x00,
}
......@@ -20,6 +20,6 @@ var (
ErrCollateralizeAccountExist = errors.New("ErrCollateralizeAccountExist")
ErrCollateralizeLowBalance = errors.New("ErrCollateralizeLowBalance")
ErrCollateralizeBalanceInvalid = errors.New("ErrCollateralizeBalanceInvalid")
ErrPriceFeedPermissionDeny = errors.New("ErrPriceFeedPermissionDeny")
ErrPermissionDeny = errors.New("ErrPermissionDeny")
ErrCollateralizeRecordNotEmpty = errors.New("ErrCollateralizeRecordNotEmpty")
)
......@@ -6,9 +6,6 @@ package types
// CollateralizeCreateTx for construction
type CollateralizeCreateTx struct {
DebtCeiling int64 `json:"debtCeiling"`
LiquidationRatio float32 `json:"liquidationRatio"`
StabilityFee int64 `json:"stabilityFee"`
TotalBalance int64 `json:"totalBalance"`
Fee int64 `json:"fee"`
}
......@@ -43,6 +40,16 @@ type CollateralizeFeedTx struct {
// CollateralizeCloseTx for construction
type CollateralizeCloseTx struct {
CollateralizeID string `json:"CollateralizeId"`
CollateralizeID string `json:"collateralizeId"`
Fee int64 `json:"fee"`
}
// CollateralizeManageTx for construction
type CollateralizeManageTx struct {
DebtCeiling int64 `json:"debtCeiling"`
LiquidationRatio float32 `json:"liquidationRatio"`
StabilityFeeRatio float32 `json:"stabilityFeeRatio"`
Period int64 `json:"period"`
Addr []string `json:"addr"`
Fee int64 `json:"fee"`
}
......@@ -12,6 +12,7 @@ const (
CollateralizeActionAppend
CollateralizeActionFeed
CollateralizeActionClose
CollateralizeActionManage
//log for Collateralize
TyLogCollateralizeCreate = 731
......@@ -46,5 +47,6 @@ const (
CollateralizeUserStatusWarning
CollateralizeUserStatusSystemLiquidate
CollateralizeUserStatusExpire
CollateralizeUserStatusExpireLiquidate
CollateralizeUserStatusClose
)
\ No newline at end of file
package init
import (
_ "github.com/33cn/plugin/plugin/dapp/autonomy" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/blackwhite" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/cert" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/dposvote" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/echo" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/evm" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/game" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/guess" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/hashlock" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/js" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/lottery" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/multisig" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/norm" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/oracle" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/paracross" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/pokerbull" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/privacy" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/relay" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/retrieve" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/ticket" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/token" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/trade" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/unfreeze" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/valnode" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/autonomy" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/blackwhite" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/cert" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/collateralize" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/dposvote" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/echo" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/evm" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/game" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/guess" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/hashlock" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/js" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/lottery" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/multisig" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/norm" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/oracle" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/paracross" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/pokerbull" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/privacy" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/relay" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/retrieve" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/ticket" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/token" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/trade" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/unfreeze" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/valnode" //auto gen
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment