OSDN Git Service

database struct (#401)
[bytom/vapor.git] / application / dex / common / type.go
diff --git a/application/dex/common/type.go b/application/dex/common/type.go
new file mode 100644 (file)
index 0000000..63baf2b
--- /dev/null
@@ -0,0 +1,28 @@
+package common
+
+import "github.com/vapor/protocol/bc"
+
+type DexUtxo struct {
+       SourceID       *bc.Hash
+       SourcePos      uint64
+       Amount         uint64
+       ControlProgram []byte
+}
+
+type Order struct {
+       FromAssetID *bc.AssetID
+       ToAssetID   *bc.AssetID
+       Utxo        *DexUtxo
+       Rate        float64
+}
+
+type TradePair struct {
+       FromAssetID *bc.AssetID
+       ToAssetID   *bc.AssetID
+       Count       uint64
+}
+
+type DexDatabaseState struct {
+       Height uint64
+       Hash   *bc.Hash
+}