Commit 28885ad0 authored by harrylee's avatar harrylee Committed by vipwzw

remove asset from accountmanager.proto

parent ce2ba241
...@@ -125,7 +125,7 @@ func TestAccountManager(t *testing.T) { ...@@ -125,7 +125,7 @@ func TestAccountManager(t *testing.T) {
tx3, err := CreateRegister(&et.Register{AccountID: "harrylee2020"}, PrivKeyC) tx3, err := CreateRegister(&et.Register{AccountID: "harrylee2020"}, PrivKeyC)
Exec_Block(t, stateDB, kvdb, env, tx3) Exec_Block(t, stateDB, kvdb, env, tx3)
//转账 //转账
tx4, err := CreateTransfer(&et.Transfer{FromAccountID: "harrylee2015", ToAccountID: "harrylee2020", Amount: 1e8, Asset: &et.Asset{Execer: "coins", Symbol: "bty"}}, PrivKeyB) tx4, err := CreateTransfer(&et.Transfer{FromAccountID: "harrylee2015", ToAccountID: "harrylee2020", Asset: &types.Asset{Exec: "coins", Symbol: "bty", Amount: 1e8}}, PrivKeyB)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
err = Exec_Block(t, stateDB, kvdb, env, tx4) err = Exec_Block(t, stateDB, kvdb, env, tx4)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
...@@ -147,11 +147,11 @@ func TestAccountManager(t *testing.T) { ...@@ -147,11 +147,11 @@ func TestAccountManager(t *testing.T) {
tx6, err = CreateApply(&et.Apply{Op: et.EnforceReset, AccountID: "harrylee2015"}, PrivKeyD) tx6, err = CreateApply(&et.Apply{Op: et.EnforceReset, AccountID: "harrylee2015"}, PrivKeyD)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
err = Exec_Block(t, stateDB, kvdb, env, tx6) err = Exec_Block(t, stateDB, kvdb, env, tx6)
tx7, _ := CreateTransfer(&et.Transfer{FromAccountID: "harrylee2015", ToAccountID: "harrylee2015", Amount: 1e8, Asset: &et.Asset{Execer: "coins", Symbol: "bty"}}, PrivKeyD) tx7, _ := CreateTransfer(&et.Transfer{FromAccountID: "harrylee2015", ToAccountID: "harrylee2015", Asset: &types.Asset{Exec: "coins", Symbol: "bty", Amount: 1e8}}, PrivKeyD)
err = Exec_Block(t, stateDB, kvdb, env, tx7) err = Exec_Block(t, stateDB, kvdb, env, tx7)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
balance, err := Exec_QueryBalanceByID(&et.QueryBalanceByID{AccountID: "harrylee2015", Asset: &et.Asset{Symbol: "bty", Execer: "coins"}}, stateDB, kvdb) balance, err := Exec_QueryBalanceByID(&et.QueryBalanceByID{AccountID: "harrylee2015", Asset: &types.Asset{Symbol: "bty", Exec: "coins"}}, stateDB, kvdb)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
assert.Equal(t, balance.Balance, 199*types.Coin) assert.Equal(t, balance.Balance, 199*types.Coin)
...@@ -166,7 +166,7 @@ func TestAccountManager(t *testing.T) { ...@@ -166,7 +166,7 @@ func TestAccountManager(t *testing.T) {
accounts, err := Exec_QueryAccountsByStatus(et.Frozen, stateDB, kvdb) accounts, err := Exec_QueryAccountsByStatus(et.Frozen, stateDB, kvdb)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
assert.Equal(t, accounts.Accounts[0].Status, et.Frozen) assert.Equal(t, accounts.Accounts[0].Status, et.Frozen)
balance, err = Exec_QueryBalanceByID(&et.QueryBalanceByID{Asset: &et.Asset{Execer: "coins", Symbol: "bty"}, AccountID: "harrylee2015"}, stateDB, kvdb) balance, err = Exec_QueryBalanceByID(&et.QueryBalanceByID{Asset: &types.Asset{Exec: "coins", Symbol: "bty"}, AccountID: "harrylee2015"}, stateDB, kvdb)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
assert.Equal(t, balance.Frozen, 199*types.Coin) assert.Equal(t, balance.Frozen, 199*types.Coin)
...@@ -180,7 +180,7 @@ func TestAccountManager(t *testing.T) { ...@@ -180,7 +180,7 @@ func TestAccountManager(t *testing.T) {
//根据状态查询 //根据状态查询
accounts, err = Exec_QueryAccountsByStatus(et.Frozen, stateDB, kvdb) accounts, err = Exec_QueryAccountsByStatus(et.Frozen, stateDB, kvdb)
assert.NotEqual(t, err, nil) assert.NotEqual(t, err, nil)
balance, err = Exec_QueryBalanceByID(&et.QueryBalanceByID{Asset: &et.Asset{Execer: "coins", Symbol: "bty"}, AccountID: "harrylee2015"}, stateDB, kvdb) balance, err = Exec_QueryBalanceByID(&et.QueryBalanceByID{Asset: &types.Asset{Exec: "coins", Symbol: "bty"}, AccountID: "harrylee2015"}, stateDB, kvdb)
assert.Equal(t, err, nil) assert.Equal(t, err, nil)
assert.Equal(t, balance.Balance, 199*types.Coin) assert.Equal(t, balance.Balance, 199*types.Coin)
......
...@@ -131,7 +131,7 @@ func (a *Action) Transfer(payload *et.Transfer) (*types.Receipt, error) { ...@@ -131,7 +131,7 @@ func (a *Action) Transfer(payload *et.Transfer) (*types.Receipt, error) {
} }
//如果prevAddr地址不为空,先查看余额,将该地址下面得资产划转到新得公钥地址下 //如果prevAddr地址不为空,先查看余额,将该地址下面得资产划转到新得公钥地址下
if account1.PrevAddr != "" { if account1.PrevAddr != "" {
assetDB, err := account.NewAccountDB(cfg, payload.Asset.GetExecer(), payload.Asset.GetSymbol(), a.statedb) assetDB, err := account.NewAccountDB(cfg, payload.Asset.GetExec(), payload.Asset.GetSymbol(), a.statedb)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -166,16 +166,16 @@ func (a *Action) Transfer(payload *et.Transfer) (*types.Receipt, error) { ...@@ -166,16 +166,16 @@ func (a *Action) Transfer(payload *et.Transfer) (*types.Receipt, error) {
return nil, et.ErrAccountIDNotPermiss return nil, et.ErrAccountIDNotPermiss
} }
assetDB, err := account.NewAccountDB(cfg, payload.Asset.GetExecer(), payload.Asset.GetSymbol(), a.statedb) assetDB, err := account.NewAccountDB(cfg, payload.Asset.GetExec(), payload.Asset.GetSymbol(), a.statedb)
if err != nil { if err != nil {
return nil, err return nil, err
} }
fromAccount := assetDB.LoadExecAccount(a.fromaddr, a.execaddr) fromAccount := assetDB.LoadExecAccount(a.fromaddr, a.execaddr)
if fromAccount.Balance < payload.Amount { if fromAccount.Balance < payload.Asset.Amount {
elog.Error("Transfer, check balance", "addr", a.fromaddr, "avail", fromAccount.Balance, "need", payload.Amount) elog.Error("Transfer, check balance", "addr", a.fromaddr, "avail", fromAccount.Balance, "need", payload.Asset.Amount)
return nil, et.ErrAssetBalance return nil, et.ErrAssetBalance
} }
receipt, err := assetDB.ExecTransfer(account1.Addr, account2.Addr, a.execaddr, payload.Amount) receipt, err := assetDB.ExecTransfer(account1.Addr, account2.Addr, a.execaddr, payload.Asset.Amount)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -472,7 +472,7 @@ func queryBalanceByID(statedb, localdb dbm.KV, cfg *types.Chain33Config, execNam ...@@ -472,7 +472,7 @@ func queryBalanceByID(statedb, localdb dbm.KV, cfg *types.Chain33Config, execNam
if err != nil { if err != nil {
return nil, err return nil, err
} }
assetDB, err := account.NewAccountDB(cfg, in.Asset.GetExecer(), in.Asset.GetSymbol(), statedb) assetDB, err := account.NewAccountDB(cfg, in.Asset.GetExec(), in.Asset.GetSymbol(), statedb)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
syntax = "proto3"; syntax = "proto3";
import "transaction.proto";
package types; package types;
message Accountmanager { message Accountmanager {
...@@ -41,22 +44,16 @@ message Apply { ...@@ -41,22 +44,16 @@ message Apply {
int32 op = 2; int32 op = 2;
} }
//资产类型
message asset {
string execer = 1;
string symbol = 2;
}
//合约内部账户之间转账 //合约内部账户之间转账
message Transfer { message Transfer {
//资产类型 //资产类型 及转账金额
asset Asset = 1; Asset asset = 1;
// from账户 // from账户
string fromAccountID = 2; string fromAccountID = 2;
// to账户 // to账户
string toAccountID = 3; string toAccountID = 3;
//转账金额
int64 amount = 4;
} }
...@@ -144,7 +141,7 @@ message QueryAccountByAddr { ...@@ -144,7 +141,7 @@ message QueryAccountByAddr {
message QueryBalanceByID { message QueryBalanceByID {
string accountID = 1; string accountID = 1;
asset asset = 2; Asset asset = 2;
} }
message balance { message balance {
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
fmt "fmt" fmt "fmt"
math "math" math "math"
types "github.com/33cn/chain33/types"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
) )
...@@ -324,64 +325,14 @@ func (m *Apply) GetOp() int32 { ...@@ -324,64 +325,14 @@ func (m *Apply) GetOp() int32 {
return 0 return 0
} }
//资产类型
type Asset struct {
Execer string `protobuf:"bytes,1,opt,name=execer,proto3" json:"execer,omitempty"`
Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Asset) Reset() { *m = Asset{} }
func (m *Asset) String() string { return proto.CompactTextString(m) }
func (*Asset) ProtoMessage() {}
func (*Asset) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{5}
}
func (m *Asset) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Asset.Unmarshal(m, b)
}
func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Asset.Marshal(b, m, deterministic)
}
func (m *Asset) XXX_Merge(src proto.Message) {
xxx_messageInfo_Asset.Merge(m, src)
}
func (m *Asset) XXX_Size() int {
return xxx_messageInfo_Asset.Size(m)
}
func (m *Asset) XXX_DiscardUnknown() {
xxx_messageInfo_Asset.DiscardUnknown(m)
}
var xxx_messageInfo_Asset proto.InternalMessageInfo
func (m *Asset) GetExecer() string {
if m != nil {
return m.Execer
}
return ""
}
func (m *Asset) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
//合约内部账户之间转账 //合约内部账户之间转账
type Transfer struct { type Transfer struct {
//资产类型 //资产类型 及转账金额
Asset *Asset `protobuf:"bytes,1,opt,name=Asset,proto3" json:"Asset,omitempty"` Asset *types.Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
// from账户 // from账户
FromAccountID string `protobuf:"bytes,2,opt,name=fromAccountID,proto3" json:"fromAccountID,omitempty"` FromAccountID string `protobuf:"bytes,2,opt,name=fromAccountID,proto3" json:"fromAccountID,omitempty"`
// to账户 // to账户
ToAccountID string `protobuf:"bytes,3,opt,name=toAccountID,proto3" json:"toAccountID,omitempty"` ToAccountID string `protobuf:"bytes,3,opt,name=toAccountID,proto3" json:"toAccountID,omitempty"`
//转账金额
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -391,7 +342,7 @@ func (m *Transfer) Reset() { *m = Transfer{} } ...@@ -391,7 +342,7 @@ func (m *Transfer) Reset() { *m = Transfer{} }
func (m *Transfer) String() string { return proto.CompactTextString(m) } func (m *Transfer) String() string { return proto.CompactTextString(m) }
func (*Transfer) ProtoMessage() {} func (*Transfer) ProtoMessage() {}
func (*Transfer) Descriptor() ([]byte, []int) { func (*Transfer) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{6} return fileDescriptor_aba6db06a1aaf83a, []int{5}
} }
func (m *Transfer) XXX_Unmarshal(b []byte) error { func (m *Transfer) XXX_Unmarshal(b []byte) error {
...@@ -412,7 +363,7 @@ func (m *Transfer) XXX_DiscardUnknown() { ...@@ -412,7 +363,7 @@ func (m *Transfer) XXX_DiscardUnknown() {
var xxx_messageInfo_Transfer proto.InternalMessageInfo var xxx_messageInfo_Transfer proto.InternalMessageInfo
func (m *Transfer) GetAsset() *Asset { func (m *Transfer) GetAsset() *types.Asset {
if m != nil { if m != nil {
return m.Asset return m.Asset
} }
...@@ -433,13 +384,6 @@ func (m *Transfer) GetToAccountID() string { ...@@ -433,13 +384,6 @@ func (m *Transfer) GetToAccountID() string {
return "" return ""
} }
func (m *Transfer) GetAmount() int64 {
if m != nil {
return m.Amount
}
return 0
}
//管理员监管操作 //管理员监管操作
type Supervise struct { type Supervise struct {
//账户名单 //账户名单
...@@ -457,7 +401,7 @@ func (m *Supervise) Reset() { *m = Supervise{} } ...@@ -457,7 +401,7 @@ func (m *Supervise) Reset() { *m = Supervise{} }
func (m *Supervise) String() string { return proto.CompactTextString(m) } func (m *Supervise) String() string { return proto.CompactTextString(m) }
func (*Supervise) ProtoMessage() {} func (*Supervise) ProtoMessage() {}
func (*Supervise) Descriptor() ([]byte, []int) { func (*Supervise) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{7} return fileDescriptor_aba6db06a1aaf83a, []int{6}
} }
func (m *Supervise) XXX_Unmarshal(b []byte) error { func (m *Supervise) XXX_Unmarshal(b []byte) error {
...@@ -527,7 +471,7 @@ func (m *Account) Reset() { *m = Account{} } ...@@ -527,7 +471,7 @@ func (m *Account) Reset() { *m = Account{} }
func (m *Account) String() string { return proto.CompactTextString(m) } func (m *Account) String() string { return proto.CompactTextString(m) }
func (*Account) ProtoMessage() {} func (*Account) ProtoMessage() {}
func (*Account) Descriptor() ([]byte, []int) { func (*Account) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{8} return fileDescriptor_aba6db06a1aaf83a, []int{7}
} }
func (m *Account) XXX_Unmarshal(b []byte) error { func (m *Account) XXX_Unmarshal(b []byte) error {
...@@ -622,7 +566,7 @@ func (m *AccountReceipt) Reset() { *m = AccountReceipt{} } ...@@ -622,7 +566,7 @@ func (m *AccountReceipt) Reset() { *m = AccountReceipt{} }
func (m *AccountReceipt) String() string { return proto.CompactTextString(m) } func (m *AccountReceipt) String() string { return proto.CompactTextString(m) }
func (*AccountReceipt) ProtoMessage() {} func (*AccountReceipt) ProtoMessage() {}
func (*AccountReceipt) Descriptor() ([]byte, []int) { func (*AccountReceipt) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{9} return fileDescriptor_aba6db06a1aaf83a, []int{8}
} }
func (m *AccountReceipt) XXX_Unmarshal(b []byte) error { func (m *AccountReceipt) XXX_Unmarshal(b []byte) error {
...@@ -662,7 +606,7 @@ func (m *ReplyAccountList) Reset() { *m = ReplyAccountList{} } ...@@ -662,7 +606,7 @@ func (m *ReplyAccountList) Reset() { *m = ReplyAccountList{} }
func (m *ReplyAccountList) String() string { return proto.CompactTextString(m) } func (m *ReplyAccountList) String() string { return proto.CompactTextString(m) }
func (*ReplyAccountList) ProtoMessage() {} func (*ReplyAccountList) ProtoMessage() {}
func (*ReplyAccountList) Descriptor() ([]byte, []int) { func (*ReplyAccountList) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{10} return fileDescriptor_aba6db06a1aaf83a, []int{9}
} }
func (m *ReplyAccountList) XXX_Unmarshal(b []byte) error { func (m *ReplyAccountList) XXX_Unmarshal(b []byte) error {
...@@ -710,7 +654,7 @@ func (m *TransferReceipt) Reset() { *m = TransferReceipt{} } ...@@ -710,7 +654,7 @@ func (m *TransferReceipt) Reset() { *m = TransferReceipt{} }
func (m *TransferReceipt) String() string { return proto.CompactTextString(m) } func (m *TransferReceipt) String() string { return proto.CompactTextString(m) }
func (*TransferReceipt) ProtoMessage() {} func (*TransferReceipt) ProtoMessage() {}
func (*TransferReceipt) Descriptor() ([]byte, []int) { func (*TransferReceipt) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{11} return fileDescriptor_aba6db06a1aaf83a, []int{10}
} }
func (m *TransferReceipt) XXX_Unmarshal(b []byte) error { func (m *TransferReceipt) XXX_Unmarshal(b []byte) error {
...@@ -766,7 +710,7 @@ func (m *SuperviseReceipt) Reset() { *m = SuperviseReceipt{} } ...@@ -766,7 +710,7 @@ func (m *SuperviseReceipt) Reset() { *m = SuperviseReceipt{} }
func (m *SuperviseReceipt) String() string { return proto.CompactTextString(m) } func (m *SuperviseReceipt) String() string { return proto.CompactTextString(m) }
func (*SuperviseReceipt) ProtoMessage() {} func (*SuperviseReceipt) ProtoMessage() {}
func (*SuperviseReceipt) Descriptor() ([]byte, []int) { func (*SuperviseReceipt) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{12} return fileDescriptor_aba6db06a1aaf83a, []int{11}
} }
func (m *SuperviseReceipt) XXX_Unmarshal(b []byte) error { func (m *SuperviseReceipt) XXX_Unmarshal(b []byte) error {
...@@ -824,7 +768,7 @@ func (m *QueryExpiredAccounts) Reset() { *m = QueryExpiredAccounts{} } ...@@ -824,7 +768,7 @@ func (m *QueryExpiredAccounts) Reset() { *m = QueryExpiredAccounts{} }
func (m *QueryExpiredAccounts) String() string { return proto.CompactTextString(m) } func (m *QueryExpiredAccounts) String() string { return proto.CompactTextString(m) }
func (*QueryExpiredAccounts) ProtoMessage() {} func (*QueryExpiredAccounts) ProtoMessage() {}
func (*QueryExpiredAccounts) Descriptor() ([]byte, []int) { func (*QueryExpiredAccounts) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{13} return fileDescriptor_aba6db06a1aaf83a, []int{12}
} }
func (m *QueryExpiredAccounts) XXX_Unmarshal(b []byte) error { func (m *QueryExpiredAccounts) XXX_Unmarshal(b []byte) error {
...@@ -882,7 +826,7 @@ func (m *QueryAccountsByStatus) Reset() { *m = QueryAccountsByStatus{} } ...@@ -882,7 +826,7 @@ func (m *QueryAccountsByStatus) Reset() { *m = QueryAccountsByStatus{} }
func (m *QueryAccountsByStatus) String() string { return proto.CompactTextString(m) } func (m *QueryAccountsByStatus) String() string { return proto.CompactTextString(m) }
func (*QueryAccountsByStatus) ProtoMessage() {} func (*QueryAccountsByStatus) ProtoMessage() {}
func (*QueryAccountsByStatus) Descriptor() ([]byte, []int) { func (*QueryAccountsByStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{14} return fileDescriptor_aba6db06a1aaf83a, []int{13}
} }
func (m *QueryAccountsByStatus) XXX_Unmarshal(b []byte) error { func (m *QueryAccountsByStatus) XXX_Unmarshal(b []byte) error {
...@@ -935,7 +879,7 @@ func (m *QueryAccountByID) Reset() { *m = QueryAccountByID{} } ...@@ -935,7 +879,7 @@ func (m *QueryAccountByID) Reset() { *m = QueryAccountByID{} }
func (m *QueryAccountByID) String() string { return proto.CompactTextString(m) } func (m *QueryAccountByID) String() string { return proto.CompactTextString(m) }
func (*QueryAccountByID) ProtoMessage() {} func (*QueryAccountByID) ProtoMessage() {}
func (*QueryAccountByID) Descriptor() ([]byte, []int) { func (*QueryAccountByID) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{15} return fileDescriptor_aba6db06a1aaf83a, []int{14}
} }
func (m *QueryAccountByID) XXX_Unmarshal(b []byte) error { func (m *QueryAccountByID) XXX_Unmarshal(b []byte) error {
...@@ -974,7 +918,7 @@ func (m *QueryAccountByAddr) Reset() { *m = QueryAccountByAddr{} } ...@@ -974,7 +918,7 @@ func (m *QueryAccountByAddr) Reset() { *m = QueryAccountByAddr{} }
func (m *QueryAccountByAddr) String() string { return proto.CompactTextString(m) } func (m *QueryAccountByAddr) String() string { return proto.CompactTextString(m) }
func (*QueryAccountByAddr) ProtoMessage() {} func (*QueryAccountByAddr) ProtoMessage() {}
func (*QueryAccountByAddr) Descriptor() ([]byte, []int) { func (*QueryAccountByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{16} return fileDescriptor_aba6db06a1aaf83a, []int{15}
} }
func (m *QueryAccountByAddr) XXX_Unmarshal(b []byte) error { func (m *QueryAccountByAddr) XXX_Unmarshal(b []byte) error {
...@@ -1004,7 +948,7 @@ func (m *QueryAccountByAddr) GetAddr() string { ...@@ -1004,7 +948,7 @@ func (m *QueryAccountByAddr) GetAddr() string {
type QueryBalanceByID struct { type QueryBalanceByID struct {
AccountID string `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"` AccountID string `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
Asset *Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` Asset *types.Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -1014,7 +958,7 @@ func (m *QueryBalanceByID) Reset() { *m = QueryBalanceByID{} } ...@@ -1014,7 +958,7 @@ func (m *QueryBalanceByID) Reset() { *m = QueryBalanceByID{} }
func (m *QueryBalanceByID) String() string { return proto.CompactTextString(m) } func (m *QueryBalanceByID) String() string { return proto.CompactTextString(m) }
func (*QueryBalanceByID) ProtoMessage() {} func (*QueryBalanceByID) ProtoMessage() {}
func (*QueryBalanceByID) Descriptor() ([]byte, []int) { func (*QueryBalanceByID) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{17} return fileDescriptor_aba6db06a1aaf83a, []int{16}
} }
func (m *QueryBalanceByID) XXX_Unmarshal(b []byte) error { func (m *QueryBalanceByID) XXX_Unmarshal(b []byte) error {
...@@ -1042,7 +986,7 @@ func (m *QueryBalanceByID) GetAccountID() string { ...@@ -1042,7 +986,7 @@ func (m *QueryBalanceByID) GetAccountID() string {
return "" return ""
} }
func (m *QueryBalanceByID) GetAsset() *Asset { func (m *QueryBalanceByID) GetAsset() *types.Asset {
if m != nil { if m != nil {
return m.Asset return m.Asset
} }
...@@ -1061,7 +1005,7 @@ func (m *Balance) Reset() { *m = Balance{} } ...@@ -1061,7 +1005,7 @@ func (m *Balance) Reset() { *m = Balance{} }
func (m *Balance) String() string { return proto.CompactTextString(m) } func (m *Balance) String() string { return proto.CompactTextString(m) }
func (*Balance) ProtoMessage() {} func (*Balance) ProtoMessage() {}
func (*Balance) Descriptor() ([]byte, []int) { func (*Balance) Descriptor() ([]byte, []int) {
return fileDescriptor_aba6db06a1aaf83a, []int{18} return fileDescriptor_aba6db06a1aaf83a, []int{17}
} }
func (m *Balance) XXX_Unmarshal(b []byte) error { func (m *Balance) XXX_Unmarshal(b []byte) error {
...@@ -1102,7 +1046,6 @@ func init() { ...@@ -1102,7 +1046,6 @@ func init() {
proto.RegisterType((*Register)(nil), "types.Register") proto.RegisterType((*Register)(nil), "types.Register")
proto.RegisterType((*ResetKey)(nil), "types.ResetKey") proto.RegisterType((*ResetKey)(nil), "types.ResetKey")
proto.RegisterType((*Apply)(nil), "types.Apply") proto.RegisterType((*Apply)(nil), "types.Apply")
proto.RegisterType((*Asset)(nil), "types.asset")
proto.RegisterType((*Transfer)(nil), "types.Transfer") proto.RegisterType((*Transfer)(nil), "types.Transfer")
proto.RegisterType((*Supervise)(nil), "types.Supervise") proto.RegisterType((*Supervise)(nil), "types.Supervise")
proto.RegisterType((*Account)(nil), "types.account") proto.RegisterType((*Account)(nil), "types.account")
...@@ -1123,53 +1066,51 @@ func init() { ...@@ -1123,53 +1066,51 @@ func init() {
} }
var fileDescriptor_aba6db06a1aaf83a = []byte{ var fileDescriptor_aba6db06a1aaf83a = []byte{
// 731 bytes of a gzipped FileDescriptorProto // 699 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6b, 0xdb, 0x4c, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5d, 0x6f, 0xd3, 0x30,
0x10, 0x8e, 0xac, 0xc8, 0xb6, 0x26, 0xef, 0xeb, 0x98, 0xc5, 0x0d, 0xa2, 0x94, 0x62, 0x96, 0x1c, 0x14, 0x5d, 0x92, 0xa5, 0x6d, 0xee, 0xa0, 0x2b, 0x56, 0x99, 0xa2, 0x09, 0xa1, 0xca, 0xda, 0x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0x65, 0x47, 0x63, 0x6b, 0xa3, 0xd1, 0x87, 0xbf, 0x87, 0xde, 0x95, 0x31, 0xc8, 0xcc, 0xea, 0x74, 0x04, 0xc3, 0xee, 0x0f, 0xf2, 0xba, 0xa7, 0xfe, 0x83, 0xef, 0xff, 0x05, 0x00,
0x82, 0xea, 0x48, 0xa6, 0x5c, 0x51, 0x69, 0x0e, 0xa0, 0x7b, 0x2d, 0xd3, 0xef, 0xb8, 0xb2, 0x0d, 0x00, 0xff, 0xff, 0x84, 0xc3, 0xe9, 0x87, 0x39, 0x07, 0x00, 0x00,
0xb0, 0xd2, 0xc9, 0x10, 0x06, 0xed, 0xff, 0xeb, 0x55, 0x97, 0x7e, 0xb0, 0xaf, 0xff, 0x04, 0x00,
0x00, 0xff, 0xff, 0x84, 0x94, 0xab, 0xf2, 0x78, 0x07, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
......
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