Commit 8f577bdc authored by vicotor's avatar vicotor

update proto

parent 0dc0cad7
package exchain package exchain
import "github.com/holiman/uint256" // A wrapper for account defined in proto.
type Wallet struct {
Coin string `json:"coin"`
Balance uint256.Int `json:"balance"`
FrozenBalance uint256.Int `json:"frozenBalance"`
}
func (w *Wallet) AddBalance(balance uint256.Int) {
w.Balance = *new(uint256.Int).Add(&w.Balance, &balance)
}
type ProxyPublickey [64]byte
type AccountInfo struct {
ProxySigner ProxyPublickey
Wallets []Wallet // a sorted wallet list.
}
func (acc *AccountInfo) GetWallet(coin string) *Wallet {
for i := range acc.Wallets {
if acc.Wallets[i].Coin == coin {
return &acc.Wallets[i]
}
}
return nil
}
func (acc *AccountInfo) GetWallets() []Wallet {
return acc.Wallets
}
package exchain package exchain
// BackendService define all api that provide the info in server. // A wrapper for exchange service defined in proto.
type BackendService interface {
// Get all pending orders info.
// Get all history orders info.
// Get all order books info.
}
...@@ -2,11 +2,21 @@ package exchain ...@@ -2,11 +2,21 @@ package exchain
import ( import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
nebulav1 "github.com/exchain/go-exchain/exchain/protocol/gen/go/nebula/v1"
"github.com/holiman/uint256" "github.com/holiman/uint256"
) )
// This file define all database interfaces for exchain.
// Database is a simple key-value store.
type Database interface {
Get(key []byte) ([]byte, error)
Put(key []byte, value []byte) error
Delete(key []byte) error
}
type StateDB interface { type StateDB interface {
GetAccount(address common.Address) *AccountInfo GetAccount(address common.Address) *nebulav1.Account
FrozenBalance(address common.Address, coin common.Address, balance uint256.Int) error FrozenBalance(address common.Address, coin common.Address, balance uint256.Int) error
UnFrozenBalance(address common.Address, coin common.Address, balance uint256.Int) error UnFrozenBalance(address common.Address, coin common.Address, balance uint256.Int) error
SubBalance(address common.Address, coin common.Address, balance uint256.Int) error SubBalance(address common.Address, coin common.Address, balance uint256.Int) error
......
package exchain package exchain
import ( import (
"context"
"github.com/exchain/go-exchain/op-service/eth"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
nebulav1 "github.com/exchain/go-exchain/exchain/protocol/gen/go/nebula/v1"
) )
// Engine define all api that op-node needed to build a block and process a block. //
//// define the engine service
//service Engine {
//// NewPayload start to generate a new execution payload.
//rpc NewPayload(PayloadParams) returns (PayloadStatus) {}
//// GetPayload get the execution payload by the payload status.
//rpc GetPayload(PayloadStatus) returns (ExecutionPayload) {}
//
//// ProcessPayload execute a new execute payload that received from other node.
//rpc ProcessPayload(ExecutionPayload) returns (google.protobuf.Empty) {}
//}
//
//message PayloadStatus {
//string id = 1;
//}
//
//message PayloadParams {
//bytes parent_root = 1; // layer1 block hash.
//uint64 timestamp = 2;
//bytes proposer = 3;
//
//nebula.v1.TransactionList transactions = 4; // append to execute tx list.
//}
//
//message ExecutionPayload {
//uint64 height = 1;
//bytes hash = 2;
//bytes parent_hash = 3;
//uint64 timestamp = 4;
//bytes proposer = 5;
//bytes app_root = 6; // used to verify block is valid.
//nebula.v1.TransactionList transactions = 7;
//}
//
//message ExecutionResult {
//bytes parent_root = 1;
//ExecutionPayload payload = 2;
//}
type Signer func(data []byte) ([]byte, error)
type Engine interface { type Engine interface {
// NewPayload generate a new execution payload. Start() error
NewPayload(ctx context.Context, params PayloadParams) (*ExecutionPayload, error) NewPayload(params PayloadParams) (ExecutionResult, error)
// ProcessPayload execute a new execute payload that received from other node. ProcessPayload(block *nebulav1.Block) error
ProcessPayload(ctx context.Context, payload *ExecutionPayload) error
} }
type PayloadParams struct { type PayloadParams struct {
ParentHash common.Hash ParentRoot common.Hash
Timestamp eth.Uint64Quantity Timestamp uint64
Transactions []eth.Data Proposer common.Address
Transactions nebulav1.TransactionList
Signer Signer
}
type ExecutionResult struct {
ParentRoot common.Hash
Payload *nebulav1.Block
}
type mockEngine struct{}
func (m mockEngine) Start() error {
return nil
} }
type ExecutionPayload struct { func (m mockEngine) NewPayload(params PayloadParams) (ExecutionResult, error) {
ParentHash common.Hash `json:"parentHash"` return ExecutionResult{}, nil
BlockHash common.Hash `json:"blockHash"` }
BlockNumber eth.Uint64Quantity `json:"blockNumber"`
Timestamp eth.Uint64Quantity `json:"timestamp"` func (m mockEngine) ProcessPayload(block *nebulav1.Block) error {
return nil
}
StateRoot eth.Bytes32 `json:"stateRoot"` func NewEngine(database Database) Engine {
ReceiptsRoot eth.Bytes32 `json:"receiptsRoot"` return &mockEngine{}
ExtraData eth.BytesMax32 `json:"extraData"`
Transactions []eth.Data `json:"transactions"`
} }
...@@ -32,6 +32,8 @@ type BlockHeader struct { ...@@ -32,6 +32,8 @@ type BlockHeader struct {
ParentHash []byte `protobuf:"bytes,3,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` ParentHash []byte `protobuf:"bytes,3,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Proposer []byte `protobuf:"bytes,5,opt,name=proposer,proto3" json:"proposer,omitempty"` Proposer []byte `protobuf:"bytes,5,opt,name=proposer,proto3" json:"proposer,omitempty"`
AppRoot []byte `protobuf:"bytes,6,opt,name=app_root,json=appRoot,proto3" json:"app_root,omitempty"` // used to verify block is valid.
Signatures []byte `protobuf:"bytes,7,opt,name=signatures,proto3" json:"signatures,omitempty"` // used to verify block is mint by proposer.
} }
func (x *BlockHeader) Reset() { func (x *BlockHeader) Reset() {
...@@ -101,6 +103,20 @@ func (x *BlockHeader) GetProposer() []byte { ...@@ -101,6 +103,20 @@ func (x *BlockHeader) GetProposer() []byte {
return nil return nil
} }
func (x *BlockHeader) GetAppRoot() []byte {
if x != nil {
return x.AppRoot
}
return nil
}
func (x *BlockHeader) GetSignatures() []byte {
if x != nil {
return x.Signatures
}
return nil
}
type Block struct { type Block struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
...@@ -167,7 +183,7 @@ var file_nebula_v1_block_proto_rawDesc = []byte{ ...@@ -167,7 +183,7 @@ var file_nebula_v1_block_proto_rawDesc = []byte{
0x62, 0x75, 0x6c, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76,
0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68,
0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12,
...@@ -176,30 +192,33 @@ var file_nebula_v1_block_proto_rawDesc = []byte{ ...@@ -176,30 +192,33 @@ var file_nebula_v1_block_proto_rawDesc = []byte{
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20,
0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0x87, 0x01, 0x0a, 0x05, 0x42, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70,
0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x70, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x70,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x70, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61,
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0c, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x36, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61,
0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52,
0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x42, 0xd3, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x63, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42,
0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x78, 0x63, 0x68, 0xd3, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e,
0x61, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x62, 0x75, 0x6c, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x4e, 0x58, 0xaa, 0x02, 0x11, 0x45, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x67, 0x6f, 0x2d, 0x65,
0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x56, 0x31, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70,
0xca, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6e,
0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x76,
0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x4e, 0x58, 0xaa, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x6e, 0x2e, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x45, 0x78,
0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0xe2,
0x6f, 0x33, 0x02, 0x1d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61,
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x13, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x4e, 0x65, 0x62, 0x75, 0x6c,
0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
...@@ -22,15 +22,63 @@ const ( ...@@ -22,15 +22,63 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
type TransactionReceiptList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Receipts []*TransactionReceipt `protobuf:"bytes,1,rep,name=receipts,proto3" json:"receipts,omitempty"`
}
func (x *TransactionReceiptList) Reset() {
*x = TransactionReceiptList{}
if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransactionReceiptList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionReceiptList) ProtoMessage() {}
func (x *TransactionReceiptList) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TransactionReceiptList.ProtoReflect.Descriptor instead.
func (*TransactionReceiptList) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{0}
}
func (x *TransactionReceiptList) GetReceipts() []*TransactionReceipt {
if x != nil {
return x.Receipts
}
return nil
}
type TransactionReceipt struct { type TransactionReceipt struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
TxType TxType `protobuf:"varint,2,opt,name=tx_type,json=txType,proto3,enum=exchain.nebula.v1.TxType" json:"tx_type,omitempty"` TxType TxType `protobuf:"varint,2,opt,name=tx_type,json=txType,proto3,enum=exchain.nebula.v1.TxType" json:"tx_type,omitempty"`
Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"` Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` BlockHeight uint64 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
Timestamp uint64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Types that are assignable to Content: // Types that are assignable to Content:
// *TransactionReceipt_SignProxyR // *TransactionReceipt_SignProxyR
// *TransactionReceipt_DepositR // *TransactionReceipt_DepositR
...@@ -46,7 +94,7 @@ type TransactionReceipt struct { ...@@ -46,7 +94,7 @@ type TransactionReceipt struct {
func (x *TransactionReceipt) Reset() { func (x *TransactionReceipt) Reset() {
*x = TransactionReceipt{} *x = TransactionReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[0] mi := &file_nebula_v1_receipt_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -59,7 +107,7 @@ func (x *TransactionReceipt) String() string { ...@@ -59,7 +107,7 @@ func (x *TransactionReceipt) String() string {
func (*TransactionReceipt) ProtoMessage() {} func (*TransactionReceipt) ProtoMessage() {}
func (x *TransactionReceipt) ProtoReflect() protoreflect.Message { func (x *TransactionReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[0] mi := &file_nebula_v1_receipt_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -72,7 +120,7 @@ func (x *TransactionReceipt) ProtoReflect() protoreflect.Message { ...@@ -72,7 +120,7 @@ func (x *TransactionReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use TransactionReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use TransactionReceipt.ProtoReflect.Descriptor instead.
func (*TransactionReceipt) Descriptor() ([]byte, []int) { func (*TransactionReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{0} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{1}
} }
func (x *TransactionReceipt) GetHash() []byte { func (x *TransactionReceipt) GetHash() []byte {
...@@ -96,11 +144,18 @@ func (x *TransactionReceipt) GetSuccess() bool { ...@@ -96,11 +144,18 @@ func (x *TransactionReceipt) GetSuccess() bool {
return false return false
} }
func (x *TransactionReceipt) GetBlockHash() []byte { func (x *TransactionReceipt) GetBlockHeight() uint64 {
if x != nil { if x != nil {
return x.BlockHash return x.BlockHeight
} }
return nil return 0
}
func (x *TransactionReceipt) GetTimestamp() uint64 {
if x != nil {
return x.Timestamp
}
return 0
} }
func (m *TransactionReceipt) GetContent() isTransactionReceipt_Content { func (m *TransactionReceipt) GetContent() isTransactionReceipt_Content {
...@@ -171,35 +226,35 @@ type isTransactionReceipt_Content interface { ...@@ -171,35 +226,35 @@ type isTransactionReceipt_Content interface {
} }
type TransactionReceipt_SignProxyR struct { type TransactionReceipt_SignProxyR struct {
SignProxyR *SignProxyReceipt `protobuf:"bytes,5,opt,name=sign_proxy_r,json=signProxyR,proto3,oneof"` SignProxyR *SignProxyReceipt `protobuf:"bytes,6,opt,name=sign_proxy_r,json=signProxyR,proto3,oneof"`
} }
type TransactionReceipt_DepositR struct { type TransactionReceipt_DepositR struct {
DepositR *DepositReceipt `protobuf:"bytes,6,opt,name=deposit_r,json=depositR,proto3,oneof"` DepositR *DepositReceipt `protobuf:"bytes,7,opt,name=deposit_r,json=depositR,proto3,oneof"`
} }
type TransactionReceipt_WithdrawR struct { type TransactionReceipt_WithdrawR struct {
WithdrawR *WithdrawReceipt `protobuf:"bytes,7,opt,name=withdraw_r,json=withdrawR,proto3,oneof"` WithdrawR *WithdrawReceipt `protobuf:"bytes,8,opt,name=withdraw_r,json=withdrawR,proto3,oneof"`
} }
type TransactionReceipt_CreatePairR struct { type TransactionReceipt_CreatePairR struct {
CreatePairR *CreatePairReceipt `protobuf:"bytes,8,opt,name=create_pair_r,json=createPairR,proto3,oneof"` CreatePairR *CreatePairReceipt `protobuf:"bytes,9,opt,name=create_pair_r,json=createPairR,proto3,oneof"`
} }
type TransactionReceipt_DisablePairR struct { type TransactionReceipt_DisablePairR struct {
DisablePairR *DisablePairReceipt `protobuf:"bytes,9,opt,name=disable_pair_r,json=disablePairR,proto3,oneof"` DisablePairR *DisablePairReceipt `protobuf:"bytes,10,opt,name=disable_pair_r,json=disablePairR,proto3,oneof"`
} }
type TransactionReceipt_LimitR struct { type TransactionReceipt_LimitR struct {
LimitR *LimitOrderReceipt `protobuf:"bytes,10,opt,name=limit_r,json=limitR,proto3,oneof"` LimitR *LimitOrderReceipt `protobuf:"bytes,11,opt,name=limit_r,json=limitR,proto3,oneof"`
} }
type TransactionReceipt_MarketR struct { type TransactionReceipt_MarketR struct {
MarketR *MarketOrderReceipt `protobuf:"bytes,11,opt,name=market_r,json=marketR,proto3,oneof"` MarketR *MarketOrderReceipt `protobuf:"bytes,12,opt,name=market_r,json=marketR,proto3,oneof"`
} }
type TransactionReceipt_CancelR struct { type TransactionReceipt_CancelR struct {
CancelR *CancelOrderReceipt `protobuf:"bytes,12,opt,name=cancel_r,json=cancelR,proto3,oneof"` CancelR *CancelOrderReceipt `protobuf:"bytes,13,opt,name=cancel_r,json=cancelR,proto3,oneof"`
} }
func (*TransactionReceipt_SignProxyR) isTransactionReceipt_Content() {} func (*TransactionReceipt_SignProxyR) isTransactionReceipt_Content() {}
...@@ -227,7 +282,7 @@ type SignProxyReceipt struct { ...@@ -227,7 +282,7 @@ type SignProxyReceipt struct {
func (x *SignProxyReceipt) Reset() { func (x *SignProxyReceipt) Reset() {
*x = SignProxyReceipt{} *x = SignProxyReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[1] mi := &file_nebula_v1_receipt_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -240,7 +295,7 @@ func (x *SignProxyReceipt) String() string { ...@@ -240,7 +295,7 @@ func (x *SignProxyReceipt) String() string {
func (*SignProxyReceipt) ProtoMessage() {} func (*SignProxyReceipt) ProtoMessage() {}
func (x *SignProxyReceipt) ProtoReflect() protoreflect.Message { func (x *SignProxyReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[1] mi := &file_nebula_v1_receipt_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -253,7 +308,7 @@ func (x *SignProxyReceipt) ProtoReflect() protoreflect.Message { ...@@ -253,7 +308,7 @@ func (x *SignProxyReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignProxyReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use SignProxyReceipt.ProtoReflect.Descriptor instead.
func (*SignProxyReceipt) Descriptor() ([]byte, []int) { func (*SignProxyReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{1} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{2}
} }
type DepositReceipt struct { type DepositReceipt struct {
...@@ -265,7 +320,7 @@ type DepositReceipt struct { ...@@ -265,7 +320,7 @@ type DepositReceipt struct {
func (x *DepositReceipt) Reset() { func (x *DepositReceipt) Reset() {
*x = DepositReceipt{} *x = DepositReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[2] mi := &file_nebula_v1_receipt_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -278,7 +333,7 @@ func (x *DepositReceipt) String() string { ...@@ -278,7 +333,7 @@ func (x *DepositReceipt) String() string {
func (*DepositReceipt) ProtoMessage() {} func (*DepositReceipt) ProtoMessage() {}
func (x *DepositReceipt) ProtoReflect() protoreflect.Message { func (x *DepositReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[2] mi := &file_nebula_v1_receipt_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -291,7 +346,7 @@ func (x *DepositReceipt) ProtoReflect() protoreflect.Message { ...@@ -291,7 +346,7 @@ func (x *DepositReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use DepositReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use DepositReceipt.ProtoReflect.Descriptor instead.
func (*DepositReceipt) Descriptor() ([]byte, []int) { func (*DepositReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{2} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{3}
} }
type WithdrawReceipt struct { type WithdrawReceipt struct {
...@@ -303,7 +358,7 @@ type WithdrawReceipt struct { ...@@ -303,7 +358,7 @@ type WithdrawReceipt struct {
func (x *WithdrawReceipt) Reset() { func (x *WithdrawReceipt) Reset() {
*x = WithdrawReceipt{} *x = WithdrawReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[3] mi := &file_nebula_v1_receipt_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -316,7 +371,7 @@ func (x *WithdrawReceipt) String() string { ...@@ -316,7 +371,7 @@ func (x *WithdrawReceipt) String() string {
func (*WithdrawReceipt) ProtoMessage() {} func (*WithdrawReceipt) ProtoMessage() {}
func (x *WithdrawReceipt) ProtoReflect() protoreflect.Message { func (x *WithdrawReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[3] mi := &file_nebula_v1_receipt_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -329,7 +384,7 @@ func (x *WithdrawReceipt) ProtoReflect() protoreflect.Message { ...@@ -329,7 +384,7 @@ func (x *WithdrawReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use WithdrawReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use WithdrawReceipt.ProtoReflect.Descriptor instead.
func (*WithdrawReceipt) Descriptor() ([]byte, []int) { func (*WithdrawReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{3} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{4}
} }
type CreatePairReceipt struct { type CreatePairReceipt struct {
...@@ -341,7 +396,7 @@ type CreatePairReceipt struct { ...@@ -341,7 +396,7 @@ type CreatePairReceipt struct {
func (x *CreatePairReceipt) Reset() { func (x *CreatePairReceipt) Reset() {
*x = CreatePairReceipt{} *x = CreatePairReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[4] mi := &file_nebula_v1_receipt_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -354,7 +409,7 @@ func (x *CreatePairReceipt) String() string { ...@@ -354,7 +409,7 @@ func (x *CreatePairReceipt) String() string {
func (*CreatePairReceipt) ProtoMessage() {} func (*CreatePairReceipt) ProtoMessage() {}
func (x *CreatePairReceipt) ProtoReflect() protoreflect.Message { func (x *CreatePairReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[4] mi := &file_nebula_v1_receipt_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -367,7 +422,7 @@ func (x *CreatePairReceipt) ProtoReflect() protoreflect.Message { ...@@ -367,7 +422,7 @@ func (x *CreatePairReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreatePairReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use CreatePairReceipt.ProtoReflect.Descriptor instead.
func (*CreatePairReceipt) Descriptor() ([]byte, []int) { func (*CreatePairReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{4} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{5}
} }
type DisablePairReceipt struct { type DisablePairReceipt struct {
...@@ -379,7 +434,7 @@ type DisablePairReceipt struct { ...@@ -379,7 +434,7 @@ type DisablePairReceipt struct {
func (x *DisablePairReceipt) Reset() { func (x *DisablePairReceipt) Reset() {
*x = DisablePairReceipt{} *x = DisablePairReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[5] mi := &file_nebula_v1_receipt_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -392,7 +447,7 @@ func (x *DisablePairReceipt) String() string { ...@@ -392,7 +447,7 @@ func (x *DisablePairReceipt) String() string {
func (*DisablePairReceipt) ProtoMessage() {} func (*DisablePairReceipt) ProtoMessage() {}
func (x *DisablePairReceipt) ProtoReflect() protoreflect.Message { func (x *DisablePairReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[5] mi := &file_nebula_v1_receipt_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -405,7 +460,7 @@ func (x *DisablePairReceipt) ProtoReflect() protoreflect.Message { ...@@ -405,7 +460,7 @@ func (x *DisablePairReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use DisablePairReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use DisablePairReceipt.ProtoReflect.Descriptor instead.
func (*DisablePairReceipt) Descriptor() ([]byte, []int) { func (*DisablePairReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{5} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{6}
} }
type LimitOrderReceipt struct { type LimitOrderReceipt struct {
...@@ -420,7 +475,7 @@ type LimitOrderReceipt struct { ...@@ -420,7 +475,7 @@ type LimitOrderReceipt struct {
func (x *LimitOrderReceipt) Reset() { func (x *LimitOrderReceipt) Reset() {
*x = LimitOrderReceipt{} *x = LimitOrderReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[6] mi := &file_nebula_v1_receipt_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -433,7 +488,7 @@ func (x *LimitOrderReceipt) String() string { ...@@ -433,7 +488,7 @@ func (x *LimitOrderReceipt) String() string {
func (*LimitOrderReceipt) ProtoMessage() {} func (*LimitOrderReceipt) ProtoMessage() {}
func (x *LimitOrderReceipt) ProtoReflect() protoreflect.Message { func (x *LimitOrderReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[6] mi := &file_nebula_v1_receipt_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -446,7 +501,7 @@ func (x *LimitOrderReceipt) ProtoReflect() protoreflect.Message { ...@@ -446,7 +501,7 @@ func (x *LimitOrderReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use LimitOrderReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use LimitOrderReceipt.ProtoReflect.Descriptor instead.
func (*LimitOrderReceipt) Descriptor() ([]byte, []int) { func (*LimitOrderReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{6} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{7}
} }
func (x *LimitOrderReceipt) GetDoneOrders() []string { func (x *LimitOrderReceipt) GetDoneOrders() []string {
...@@ -475,7 +530,7 @@ type MarketOrderReceipt struct { ...@@ -475,7 +530,7 @@ type MarketOrderReceipt struct {
func (x *MarketOrderReceipt) Reset() { func (x *MarketOrderReceipt) Reset() {
*x = MarketOrderReceipt{} *x = MarketOrderReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[7] mi := &file_nebula_v1_receipt_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -488,7 +543,7 @@ func (x *MarketOrderReceipt) String() string { ...@@ -488,7 +543,7 @@ func (x *MarketOrderReceipt) String() string {
func (*MarketOrderReceipt) ProtoMessage() {} func (*MarketOrderReceipt) ProtoMessage() {}
func (x *MarketOrderReceipt) ProtoReflect() protoreflect.Message { func (x *MarketOrderReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[7] mi := &file_nebula_v1_receipt_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -501,7 +556,7 @@ func (x *MarketOrderReceipt) ProtoReflect() protoreflect.Message { ...@@ -501,7 +556,7 @@ func (x *MarketOrderReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use MarketOrderReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use MarketOrderReceipt.ProtoReflect.Descriptor instead.
func (*MarketOrderReceipt) Descriptor() ([]byte, []int) { func (*MarketOrderReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{7} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{8}
} }
func (x *MarketOrderReceipt) GetDoneOrders() []string { func (x *MarketOrderReceipt) GetDoneOrders() []string {
...@@ -529,7 +584,7 @@ type CancelOrderReceipt struct { ...@@ -529,7 +584,7 @@ type CancelOrderReceipt struct {
func (x *CancelOrderReceipt) Reset() { func (x *CancelOrderReceipt) Reset() {
*x = CancelOrderReceipt{} *x = CancelOrderReceipt{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_nebula_v1_receipt_proto_msgTypes[8] mi := &file_nebula_v1_receipt_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -542,7 +597,7 @@ func (x *CancelOrderReceipt) String() string { ...@@ -542,7 +597,7 @@ func (x *CancelOrderReceipt) String() string {
func (*CancelOrderReceipt) ProtoMessage() {} func (*CancelOrderReceipt) ProtoMessage() {}
func (x *CancelOrderReceipt) ProtoReflect() protoreflect.Message { func (x *CancelOrderReceipt) ProtoReflect() protoreflect.Message {
mi := &file_nebula_v1_receipt_proto_msgTypes[8] mi := &file_nebula_v1_receipt_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -555,7 +610,7 @@ func (x *CancelOrderReceipt) ProtoReflect() protoreflect.Message { ...@@ -555,7 +610,7 @@ func (x *CancelOrderReceipt) ProtoReflect() protoreflect.Message {
// Deprecated: Use CancelOrderReceipt.ProtoReflect.Descriptor instead. // Deprecated: Use CancelOrderReceipt.ProtoReflect.Descriptor instead.
func (*CancelOrderReceipt) Descriptor() ([]byte, []int) { func (*CancelOrderReceipt) Descriptor() ([]byte, []int) {
return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{8} return file_nebula_v1_receipt_proto_rawDescGZIP(), []int{9}
} }
func (x *CancelOrderReceipt) GetOrderId() string { func (x *CancelOrderReceipt) GetOrderId() string {
...@@ -576,86 +631,94 @@ var file_nebula_v1_receipt_proto_rawDesc = []byte{ ...@@ -576,86 +631,94 @@ var file_nebula_v1_receipt_proto_rawDesc = []byte{
0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61,
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x05, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x12, 0x32, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x19, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75,
0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78,
0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d,
0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x47, 0x0a,
0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65,
0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78,
0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e,
0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69,
0x74, 0x5f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x08,
0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x12, 0x43, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68,
0x64, 0x72, 0x61, 0x77, 0x5f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65,
0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31,
0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74,
0x48, 0x00, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x12, 0x4a, 0x0a,
0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x72, 0x18, 0x08,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e,
0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
0x61, 0x69, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x12, 0x4d, 0x0a, 0x0e, 0x64, 0x69, 0x73,
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x25, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75,
0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x69, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70,
0x62, 0x6c, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x12, 0x3f, 0x0a, 0x07, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0xf6, 0x05, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
0x74, 0x5f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73,
0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a,
0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19,
0x00, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x12, 0x42, 0x0a, 0x08, 0x6d, 0x61, 0x72, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e,
0x6b, 0x65, 0x74, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x78, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c,
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28,
0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x0c,
0x73, 0x69, 0x67, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x72, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62,
0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78, 0x79,
0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x50,
0x72, 0x6f, 0x78, 0x79, 0x52, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
0x5f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70,
0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x08, 0x64,
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x12, 0x43, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64,
0x72, 0x61, 0x77, 0x5f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x78,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e,
0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48,
0x70, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x12, 0x42, 0x0a, 0x00, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x12, 0x4a, 0x0a, 0x0d,
0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x72, 0x18, 0x09, 0x20,
0x25, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61,
0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x69, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x72, 0x65,
0x52, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x61, 0x74, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x12, 0x4d, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x61,
0x53, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b,
0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x32, 0x25, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c,
0x70, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x69, 0x72,
0x63, 0x65, 0x69, 0x70, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62,
0x61, 0x69, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x12, 0x3f, 0x0a, 0x07, 0x6c, 0x69, 0x6d, 0x69, 0x74,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61,
0x22, 0x51, 0x0a, 0x11, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6d,
0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00,
0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x6e, 0x65, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x12, 0x42, 0x0a, 0x08, 0x6d, 0x61, 0x72, 0x6b,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x72, 0x65, 0x74, 0x5f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x78, 0x63,
0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x72, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
0x64, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70,
0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x12, 0x42, 0x0a, 0x08,
0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
0x64, 0x6f, 0x6e, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65,
0x77, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e,
0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x63, 0x65,
0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x19, 0x0a,
0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x42, 0xd5, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d,
0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e,
0x76, 0x31, 0x42, 0x0c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52,
0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x53,
0x6e, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x22,
0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70,
0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x63,
0x4e, 0x58, 0xaa, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x62, 0x65, 0x69, 0x70, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61,
0x75, 0x6c, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x69, 0x73,
0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x45, 0x78, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x22,
0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x51, 0x0a, 0x11, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x78, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x72, 0x64,
0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x6e, 0x65, 0x4f,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x22, 0x52, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x6e, 0x65,
0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64,
0x6f, 0x6e, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77,
0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65,
0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x19, 0x0a, 0x08,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x42, 0xd5, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e,
0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76,
0x31, 0x42, 0x0c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e,
0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f,
0x76, 0x31, 0x3b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x4e,
0x58, 0xaa, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x62, 0x75,
0x6c, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c,
0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x45, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
...@@ -670,34 +733,36 @@ func file_nebula_v1_receipt_proto_rawDescGZIP() []byte { ...@@ -670,34 +733,36 @@ func file_nebula_v1_receipt_proto_rawDescGZIP() []byte {
return file_nebula_v1_receipt_proto_rawDescData return file_nebula_v1_receipt_proto_rawDescData
} }
var file_nebula_v1_receipt_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_nebula_v1_receipt_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_nebula_v1_receipt_proto_goTypes = []interface{}{ var file_nebula_v1_receipt_proto_goTypes = []interface{}{
(*TransactionReceipt)(nil), // 0: exchain.nebula.v1.TransactionReceipt (*TransactionReceiptList)(nil), // 0: exchain.nebula.v1.TransactionReceiptList
(*SignProxyReceipt)(nil), // 1: exchain.nebula.v1.SignProxyReceipt (*TransactionReceipt)(nil), // 1: exchain.nebula.v1.TransactionReceipt
(*DepositReceipt)(nil), // 2: exchain.nebula.v1.DepositReceipt (*SignProxyReceipt)(nil), // 2: exchain.nebula.v1.SignProxyReceipt
(*WithdrawReceipt)(nil), // 3: exchain.nebula.v1.WithdrawReceipt (*DepositReceipt)(nil), // 3: exchain.nebula.v1.DepositReceipt
(*CreatePairReceipt)(nil), // 4: exchain.nebula.v1.CreatePairReceipt (*WithdrawReceipt)(nil), // 4: exchain.nebula.v1.WithdrawReceipt
(*DisablePairReceipt)(nil), // 5: exchain.nebula.v1.DisablePairReceipt (*CreatePairReceipt)(nil), // 5: exchain.nebula.v1.CreatePairReceipt
(*LimitOrderReceipt)(nil), // 6: exchain.nebula.v1.LimitOrderReceipt (*DisablePairReceipt)(nil), // 6: exchain.nebula.v1.DisablePairReceipt
(*MarketOrderReceipt)(nil), // 7: exchain.nebula.v1.MarketOrderReceipt (*LimitOrderReceipt)(nil), // 7: exchain.nebula.v1.LimitOrderReceipt
(*CancelOrderReceipt)(nil), // 8: exchain.nebula.v1.CancelOrderReceipt (*MarketOrderReceipt)(nil), // 8: exchain.nebula.v1.MarketOrderReceipt
(TxType)(0), // 9: exchain.nebula.v1.TxType (*CancelOrderReceipt)(nil), // 9: exchain.nebula.v1.CancelOrderReceipt
(TxType)(0), // 10: exchain.nebula.v1.TxType
} }
var file_nebula_v1_receipt_proto_depIdxs = []int32{ var file_nebula_v1_receipt_proto_depIdxs = []int32{
9, // 0: exchain.nebula.v1.TransactionReceipt.tx_type:type_name -> exchain.nebula.v1.TxType 1, // 0: exchain.nebula.v1.TransactionReceiptList.receipts:type_name -> exchain.nebula.v1.TransactionReceipt
1, // 1: exchain.nebula.v1.TransactionReceipt.sign_proxy_r:type_name -> exchain.nebula.v1.SignProxyReceipt 10, // 1: exchain.nebula.v1.TransactionReceipt.tx_type:type_name -> exchain.nebula.v1.TxType
2, // 2: exchain.nebula.v1.TransactionReceipt.deposit_r:type_name -> exchain.nebula.v1.DepositReceipt 2, // 2: exchain.nebula.v1.TransactionReceipt.sign_proxy_r:type_name -> exchain.nebula.v1.SignProxyReceipt
3, // 3: exchain.nebula.v1.TransactionReceipt.withdraw_r:type_name -> exchain.nebula.v1.WithdrawReceipt 3, // 3: exchain.nebula.v1.TransactionReceipt.deposit_r:type_name -> exchain.nebula.v1.DepositReceipt
4, // 4: exchain.nebula.v1.TransactionReceipt.create_pair_r:type_name -> exchain.nebula.v1.CreatePairReceipt 4, // 4: exchain.nebula.v1.TransactionReceipt.withdraw_r:type_name -> exchain.nebula.v1.WithdrawReceipt
5, // 5: exchain.nebula.v1.TransactionReceipt.disable_pair_r:type_name -> exchain.nebula.v1.DisablePairReceipt 5, // 5: exchain.nebula.v1.TransactionReceipt.create_pair_r:type_name -> exchain.nebula.v1.CreatePairReceipt
6, // 6: exchain.nebula.v1.TransactionReceipt.limit_r:type_name -> exchain.nebula.v1.LimitOrderReceipt 6, // 6: exchain.nebula.v1.TransactionReceipt.disable_pair_r:type_name -> exchain.nebula.v1.DisablePairReceipt
7, // 7: exchain.nebula.v1.TransactionReceipt.market_r:type_name -> exchain.nebula.v1.MarketOrderReceipt 7, // 7: exchain.nebula.v1.TransactionReceipt.limit_r:type_name -> exchain.nebula.v1.LimitOrderReceipt
8, // 8: exchain.nebula.v1.TransactionReceipt.cancel_r:type_name -> exchain.nebula.v1.CancelOrderReceipt 8, // 8: exchain.nebula.v1.TransactionReceipt.market_r:type_name -> exchain.nebula.v1.MarketOrderReceipt
9, // [9:9] is the sub-list for method output_type 9, // 9: exchain.nebula.v1.TransactionReceipt.cancel_r:type_name -> exchain.nebula.v1.CancelOrderReceipt
9, // [9:9] is the sub-list for method input_type 10, // [10:10] is the sub-list for method output_type
9, // [9:9] is the sub-list for extension type_name 10, // [10:10] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension extendee 10, // [10:10] is the sub-list for extension type_name
0, // [0:9] is the sub-list for field type_name 10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
} }
func init() { file_nebula_v1_receipt_proto_init() } func init() { file_nebula_v1_receipt_proto_init() }
...@@ -708,7 +773,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -708,7 +773,7 @@ func file_nebula_v1_receipt_proto_init() {
file_nebula_v1_transaction_proto_init() file_nebula_v1_transaction_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_nebula_v1_receipt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionReceipt); i { switch v := v.(*TransactionReceiptList); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -720,7 +785,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -720,7 +785,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignProxyReceipt); i { switch v := v.(*TransactionReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -732,7 +797,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -732,7 +797,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DepositReceipt); i { switch v := v.(*SignProxyReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -744,7 +809,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -744,7 +809,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WithdrawReceipt); i { switch v := v.(*DepositReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -756,7 +821,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -756,7 +821,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreatePairReceipt); i { switch v := v.(*WithdrawReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -768,7 +833,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -768,7 +833,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DisablePairReceipt); i { switch v := v.(*CreatePairReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -780,7 +845,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -780,7 +845,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LimitOrderReceipt); i { switch v := v.(*DisablePairReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -792,7 +857,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -792,7 +857,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MarketOrderReceipt); i { switch v := v.(*LimitOrderReceipt); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -804,6 +869,18 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -804,6 +869,18 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
file_nebula_v1_receipt_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_nebula_v1_receipt_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MarketOrderReceipt); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_nebula_v1_receipt_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CancelOrderReceipt); i { switch v := v.(*CancelOrderReceipt); i {
case 0: case 0:
return &v.state return &v.state
...@@ -816,7 +893,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -816,7 +893,7 @@ func file_nebula_v1_receipt_proto_init() {
} }
} }
} }
file_nebula_v1_receipt_proto_msgTypes[0].OneofWrappers = []interface{}{ file_nebula_v1_receipt_proto_msgTypes[1].OneofWrappers = []interface{}{
(*TransactionReceipt_SignProxyR)(nil), (*TransactionReceipt_SignProxyR)(nil),
(*TransactionReceipt_DepositR)(nil), (*TransactionReceipt_DepositR)(nil),
(*TransactionReceipt_WithdrawR)(nil), (*TransactionReceipt_WithdrawR)(nil),
...@@ -832,7 +909,7 @@ func file_nebula_v1_receipt_proto_init() { ...@@ -832,7 +909,7 @@ func file_nebula_v1_receipt_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_nebula_v1_receipt_proto_rawDesc, RawDescriptor: file_nebula_v1_receipt_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 9, NumMessages: 10,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc (unknown)
// source: node/v1/engine.proto
package nodev1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/descriptorpb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PayloadParams struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Transactions [][]byte `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"`
}
func (x *PayloadParams) Reset() {
*x = PayloadParams{}
if protoimpl.UnsafeEnabled {
mi := &file_node_v1_engine_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayloadParams) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayloadParams) ProtoMessage() {}
func (x *PayloadParams) ProtoReflect() protoreflect.Message {
mi := &file_node_v1_engine_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PayloadParams.ProtoReflect.Descriptor instead.
func (*PayloadParams) Descriptor() ([]byte, []int) {
return file_node_v1_engine_proto_rawDescGZIP(), []int{0}
}
func (x *PayloadParams) GetParentHash() []byte {
if x != nil {
return x.ParentHash
}
return nil
}
func (x *PayloadParams) GetTimestamp() uint64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *PayloadParams) GetTransactions() [][]byte {
if x != nil {
return x.Transactions
}
return nil
}
type ExecutionPayload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
BlockNumber uint64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
StateRoot []byte `protobuf:"bytes,5,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"`
ReceiptsRoot []byte `protobuf:"bytes,6,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"`
ExtraData []byte `protobuf:"bytes,7,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
Transactions [][]byte `protobuf:"bytes,8,rep,name=transactions,proto3" json:"transactions,omitempty"`
}
func (x *ExecutionPayload) Reset() {
*x = ExecutionPayload{}
if protoimpl.UnsafeEnabled {
mi := &file_node_v1_engine_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExecutionPayload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecutionPayload) ProtoMessage() {}
func (x *ExecutionPayload) ProtoReflect() protoreflect.Message {
mi := &file_node_v1_engine_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExecutionPayload.ProtoReflect.Descriptor instead.
func (*ExecutionPayload) Descriptor() ([]byte, []int) {
return file_node_v1_engine_proto_rawDescGZIP(), []int{1}
}
func (x *ExecutionPayload) GetParentHash() []byte {
if x != nil {
return x.ParentHash
}
return nil
}
func (x *ExecutionPayload) GetBlockHash() []byte {
if x != nil {
return x.BlockHash
}
return nil
}
func (x *ExecutionPayload) GetBlockNumber() uint64 {
if x != nil {
return x.BlockNumber
}
return 0
}
func (x *ExecutionPayload) GetTimestamp() uint64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ExecutionPayload) GetStateRoot() []byte {
if x != nil {
return x.StateRoot
}
return nil
}
func (x *ExecutionPayload) GetReceiptsRoot() []byte {
if x != nil {
return x.ReceiptsRoot
}
return nil
}
func (x *ExecutionPayload) GetExtraData() []byte {
if x != nil {
return x.ExtraData
}
return nil
}
func (x *ExecutionPayload) GetTransactions() [][]byte {
if x != nil {
return x.Transactions
}
return nil
}
var File_node_v1_engine_proto protoreflect.FileDescriptor
var file_node_v1_engine_proto_rawDesc = []byte{
0x0a, 0x14, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e,
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e,
0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61,
0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x74, 0x72,
0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9a, 0x02, 0x0a, 0x10, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,
0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68,
0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12,
0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62,
0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12,
0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73,
0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61,
0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44,
0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73,
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xaa, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
0x12, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x1a, 0x21, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x21, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69,
0x6e, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x00, 0x42, 0xc6, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x63,
0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, 0x6e,
0x67, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f,
0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
0x67, 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76,
0x31, 0xa2, 0x02, 0x03, 0x45, 0x4e, 0x58, 0xaa, 0x02, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69,
0x6e, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x45, 0x78,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_node_v1_engine_proto_rawDescOnce sync.Once
file_node_v1_engine_proto_rawDescData = file_node_v1_engine_proto_rawDesc
)
func file_node_v1_engine_proto_rawDescGZIP() []byte {
file_node_v1_engine_proto_rawDescOnce.Do(func() {
file_node_v1_engine_proto_rawDescData = protoimpl.X.CompressGZIP(file_node_v1_engine_proto_rawDescData)
})
return file_node_v1_engine_proto_rawDescData
}
var file_node_v1_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_node_v1_engine_proto_goTypes = []interface{}{
(*PayloadParams)(nil), // 0: exchain.node.v1.PayloadParams
(*ExecutionPayload)(nil), // 1: exchain.node.v1.ExecutionPayload
(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_node_v1_engine_proto_depIdxs = []int32{
0, // 0: exchain.node.v1.Engine.NewPayload:input_type -> exchain.node.v1.PayloadParams
1, // 1: exchain.node.v1.Engine.ProcessPayload:input_type -> exchain.node.v1.ExecutionPayload
1, // 2: exchain.node.v1.Engine.NewPayload:output_type -> exchain.node.v1.ExecutionPayload
2, // 3: exchain.node.v1.Engine.ProcessPayload:output_type -> google.protobuf.Empty
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_node_v1_engine_proto_init() }
func file_node_v1_engine_proto_init() {
if File_node_v1_engine_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_node_v1_engine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayloadParams); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_node_v1_engine_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExecutionPayload); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_node_v1_engine_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_node_v1_engine_proto_goTypes,
DependencyIndexes: file_node_v1_engine_proto_depIdxs,
MessageInfos: file_node_v1_engine_proto_msgTypes,
}.Build()
File_node_v1_engine_proto = out.File
file_node_v1_engine_proto_rawDesc = nil
file_node_v1_engine_proto_goTypes = nil
file_node_v1_engine_proto_depIdxs = nil
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: node/v1/engine.proto
package nodev1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// EngineClient is the client API for Engine service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EngineClient interface {
// NewPayload generate a new execution payload.
NewPayload(ctx context.Context, in *PayloadParams, opts ...grpc.CallOption) (*ExecutionPayload, error)
// ProcessPayload execute a new execute payload that received from other node.
ProcessPayload(ctx context.Context, in *ExecutionPayload, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type engineClient struct {
cc grpc.ClientConnInterface
}
func NewEngineClient(cc grpc.ClientConnInterface) EngineClient {
return &engineClient{cc}
}
func (c *engineClient) NewPayload(ctx context.Context, in *PayloadParams, opts ...grpc.CallOption) (*ExecutionPayload, error) {
out := new(ExecutionPayload)
err := c.cc.Invoke(ctx, "/exchain.node.v1.Engine/NewPayload", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *engineClient) ProcessPayload(ctx context.Context, in *ExecutionPayload, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/exchain.node.v1.Engine/ProcessPayload", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EngineServer is the server API for Engine service.
// All implementations must embed UnimplementedEngineServer
// for forward compatibility
type EngineServer interface {
// NewPayload generate a new execution payload.
NewPayload(context.Context, *PayloadParams) (*ExecutionPayload, error)
// ProcessPayload execute a new execute payload that received from other node.
ProcessPayload(context.Context, *ExecutionPayload) (*emptypb.Empty, error)
mustEmbedUnimplementedEngineServer()
}
// UnimplementedEngineServer must be embedded to have forward compatible implementations.
type UnimplementedEngineServer struct {
}
func (UnimplementedEngineServer) NewPayload(context.Context, *PayloadParams) (*ExecutionPayload, error) {
return nil, status.Errorf(codes.Unimplemented, "method NewPayload not implemented")
}
func (UnimplementedEngineServer) ProcessPayload(context.Context, *ExecutionPayload) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProcessPayload not implemented")
}
func (UnimplementedEngineServer) mustEmbedUnimplementedEngineServer() {}
// UnsafeEngineServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EngineServer will
// result in compilation errors.
type UnsafeEngineServer interface {
mustEmbedUnimplementedEngineServer()
}
func RegisterEngineServer(s grpc.ServiceRegistrar, srv EngineServer) {
s.RegisterService(&Engine_ServiceDesc, srv)
}
func _Engine_NewPayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PayloadParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EngineServer).NewPayload(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/exchain.node.v1.Engine/NewPayload",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EngineServer).NewPayload(ctx, req.(*PayloadParams))
}
return interceptor(ctx, in, info, handler)
}
func _Engine_ProcessPayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExecutionPayload)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EngineServer).ProcessPayload(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/exchain.node.v1.Engine/ProcessPayload",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EngineServer).ProcessPayload(ctx, req.(*ExecutionPayload))
}
return interceptor(ctx, in, info, handler)
}
// Engine_ServiceDesc is the grpc.ServiceDesc for Engine service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Engine_ServiceDesc = grpc.ServiceDesc{
ServiceName: "exchain.node.v1.Engine",
HandlerType: (*EngineServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "NewPayload",
Handler: _Engine_NewPayload_Handler,
},
{
MethodName: "ProcessPayload",
Handler: _Engine_ProcessPayload_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "node/v1/engine.proto",
}
...@@ -19,6 +19,8 @@ message BlockHeader { ...@@ -19,6 +19,8 @@ message BlockHeader {
bytes parent_hash = 3; bytes parent_hash = 3;
uint64 timestamp = 4; uint64 timestamp = 4;
bytes proposer = 5; bytes proposer = 5;
bytes app_root = 6; // used to verify block is valid.
bytes signatures = 7; // used to verify block is mint by proposer.
} }
message Block { message Block {
......
...@@ -13,20 +13,25 @@ option java_outer_classname = "ReceiptProto"; ...@@ -13,20 +13,25 @@ option java_outer_classname = "ReceiptProto";
option java_package = "org.exchain.nebula.v1"; option java_package = "org.exchain.nebula.v1";
option php_namespace = "ExChain\\Nebula\\v1"; option php_namespace = "ExChain\\Nebula\\v1";
message TransactionReceiptList {
repeated TransactionReceipt receipts = 1;
}
message TransactionReceipt { message TransactionReceipt {
bytes hash = 1; bytes hash = 1;
TxType tx_type = 2; TxType tx_type = 2;
bool success = 3; bool success = 3;
bytes block_hash = 4; uint64 block_height = 4;
uint64 timestamp = 5;
oneof content { oneof content {
SignProxyReceipt sign_proxy_r = 5; SignProxyReceipt sign_proxy_r = 6;
DepositReceipt deposit_r = 6; DepositReceipt deposit_r = 7;
WithdrawReceipt withdraw_r = 7; WithdrawReceipt withdraw_r = 8;
CreatePairReceipt create_pair_r = 8; CreatePairReceipt create_pair_r = 9;
DisablePairReceipt disable_pair_r = 9; DisablePairReceipt disable_pair_r = 10;
LimitOrderReceipt limit_r = 10; LimitOrderReceipt limit_r = 11;
MarketOrderReceipt market_r = 11; MarketOrderReceipt market_r = 12;
CancelOrderReceipt cancel_r = 12; CancelOrderReceipt cancel_r = 13;
} }
} }
......
syntax = "proto3";
package exchain.node.v1;
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
option csharp_namespace = "ExChain.Node.V1";
option go_package = "github.com/exchain/go-exchain/exchain/protocol/node/v1";
option java_multiple_files = true;
option java_outer_classname = "EngineProto";
option java_package = "org.exchain.node.v1";
option php_namespace = "ExChain\\Node\\v1";
// define the engine service
service Engine {
// NewPayload generate a new execution payload.
rpc NewPayload(PayloadParams) returns (ExecutionPayload) {}
// ProcessPayload execute a new execute payload that received from other node.
rpc ProcessPayload(ExecutionPayload) returns (google.protobuf.Empty) {}
}
message PayloadParams {
bytes parent_hash = 1;
uint64 timestamp = 2;
repeated bytes transactions = 3;
}
message ExecutionPayload {
bytes parent_hash = 1;
bytes block_hash = 2;
uint64 block_number = 3;
uint64 timestamp = 4;
bytes state_root = 5;
bytes receipts_root = 6;
bytes extra_data = 7;
repeated bytes transactions = 8;
}
package exchain
import (
"github.com/ethereum/go-ethereum/common"
"github.com/holiman/uint256"
)
// ChainRPC define all rpc that provide the info on chain.
type ChainRPC interface {
// Account Reference
GetAccount(address common.Address) AccountInfo
// Block Reference
GetHeaderByNumber(number *uint256.Int)
GetBlockByNumber(number *uint256.Int)
GetBlockByHash(hash common.Hash)
// Tx Reference
SendRawTransaction(tx []byte) (common.Hash, error)
GetTransactionByHash(hash common.Hash) (Transaction, error)
GetTransactionReceipt(hash common.Hash) (TransactionReceipt, error)
}
package exchain package exchain
import ( // A wrapper for transaction defined in proto.
"encoding/json"
"github.com/exchain/go-exchain/op-service/eth"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
"math/big"
)
type TxType string
const (
SignProxyTx TxType = "sign_proxy" // update a signer proxy public key.
DepositTx TxType = "deposit" // deposit usdt/usdc from l1 to exchain.
WithdrawTx TxType = "withdraw" // withdraw usdt/usdc from exchain to l1.
CreateOrderBookTx TxType = "create_order_book" // create a new orderbook.
DisableOrderBookTx TxType = "disable_order_book" // disable an existing orderbook.
LimitTx TxType = "limit" // make a limit order.
MarketTx TxType = "market" // make a market order.
CancelTx TxType = "cancel" // cancel an order.
)
type Signature struct {
R *uint256.Int
S *uint256.Int
V byte
}
type Transaction struct {
User common.Address `json:"user"`
Nonce uint256.Int `json:"nonce"`
Type TxType `json:"type"`
Proxy bool `json:"proxy"`
Data json.RawMessage `json:"data"`
Signature Signature `json:"signature"`
}
type TransactionReceipt struct {
Hash common.Hash `json:"hash"`
TxType TxType `json:"txType"`
Status uint8 `json:"status"`
BlockHash common.Hash `json:"blockHash"`
Content []eth.Data `json:"content"` // content is difference by txType.
}
type DepositTxData struct {
// SourceHash uniquely identifies the source of the deposit
SourceHash common.Hash
// From is exposed through the types.Signer, not through TxData
From common.Address
// nil means contract creation
To *common.Address
// Mint is minted on L2, locked on L1, nil if no minting.
Mint *big.Int
// Value is transferred from L2 balance, executed after Mint (if any)
Value *big.Int
// Field indicating if this transaction is exempt from the L2 gas limit.
IsSystemTransaction bool
// Normal Tx data
Data []byte
}
type LimitTxData struct {
Symbol string `json:"symbol"`
Side uint8 `json:"side"`
Price uint256.Int `json:"price"`
Quantity uint256.Int `json:"quantity"`
}
type MarketTxData struct {
Symbol string `json:"symbol"`
Side uint8 `json:"side"`
Quantity uint256.Int `json:"quantity"`
}
func (tx Transaction) SigHash() common.Hash {
data := make([]byte, 0)
data = append(data, tx.User.Bytes()...)
data = append(data, tx.Nonce.Bytes()...)
data = append(data, tx.Type...)
if tx.Proxy {
data = append(data, byte(1))
} else {
data = append(data, byte(0))
}
txdata, _ := json.Marshal(tx.Data)
data = append(data, txdata...)
return crypto.Keccak256Hash(data)
}
func (tx Transaction) Verify() bool {
return true
//if tx.Proxy {
// // get user proxy public.
// var public ProxyPublickey
// pubkey, err := crypto.UnmarshalPubkey(public[:])
// if err != nil {
// return false
// } else {
// crypto.VerifySignature()
// }
//
//}
}
package exchain package exchain
import ( // todo: define some structs here.
"github.com/ethereum/go-ethereum/common"
"github.com/holiman/uint256"
)
type BlockHeader struct {
Height uint256.Int
Hash common.Hash
Parent common.Hash
Timestamp uint64
Proposer common.Address
}
type Coin struct{}
type ExPair struct{}
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