@@ -66,7 +66,7 @@ This is internal module, which cannot be used directly, use OrderBook instead.
6666
6767</dd >
6868<dt >
69- <code >tie_breaker: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a ></code >
69+ <code >tie_breaker: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a ></code >
7070</dt >
7171<dd >
7272
@@ -455,7 +455,7 @@ aborts if there are no sells
455455
456456
457457
458- <pre ><code ><b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_get_tie_breaker " >get_tie_breaker</a >(unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, is_bid: bool): <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >
458+ <pre ><code ><b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_get_tie_breaker " >get_tie_breaker</a >(unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, is_bid: bool): <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >
459459</code ></pre >
460460
461461
@@ -465,8 +465,8 @@ aborts if there are no sells
465465
466466
467467<pre ><code >inline <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_get_tie_breaker " >get_tie_breaker</a >(
468- unique_priority_idx: UniqueIdxType , is_bid: bool
469- ): UniqueIdxType {
468+ unique_priority_idx: IncreasingIdxType , is_bid: bool
469+ ): IncreasingIdxType {
470470 <b >if</b > (is_bid) {
471471 unique_priority_idx
472472 } <b >else</b > {
@@ -485,7 +485,7 @@ aborts if there are no sells
485485
486486
487487
488- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_cancel_active_order " >cancel_active_order</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, is_bid: bool): u64
488+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_cancel_active_order " >cancel_active_order</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, is_bid: bool): u64
489489</code ></pre >
490490
491491
@@ -497,7 +497,7 @@ aborts if there are no sells
497497<pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_cancel_active_order " >cancel_active_order</a >(
498498 self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >ActiveOrderBook</a >,
499499 price: u64,
500- unique_priority_idx: UniqueIdxType ,
500+ unique_priority_idx: IncreasingIdxType ,
501501 is_bid: bool
502502): u64 {
503503 <b >let</b > tie_breaker = <a href =" active_order_book.md#0x7_active_order_book_get_tie_breaker " >get_tie_breaker</a >(unique_priority_idx, is_bid);
@@ -522,7 +522,7 @@ aborts if there are no sells
522522
523523
524524
525- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_cancel_if_active_order " >cancel_if_active_order</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, is_bid: bool)
525+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_cancel_if_active_order " >cancel_if_active_order</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, is_bid: bool)
526526</code ></pre >
527527
528528
@@ -534,7 +534,7 @@ aborts if there are no sells
534534<pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_cancel_if_active_order " >cancel_if_active_order</a >(
535535 self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >ActiveOrderBook</a >,
536536 price: u64,
537- unique_priority_idx: UniqueIdxType ,
537+ unique_priority_idx: IncreasingIdxType ,
538538 is_bid: bool
539539){
540540 <b >let</b > tie_breaker = <a href =" active_order_book.md#0x7_active_order_book_get_tie_breaker " >get_tie_breaker</a >(unique_priority_idx, is_bid);
@@ -561,7 +561,7 @@ aborts if there are no sells
561561
562562
563563
564- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_is_active_order " >is_active_order</a >(self: &<a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, is_bid: bool): bool
564+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_is_active_order " >is_active_order</a >(self: &<a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, is_bid: bool): bool
565565</code ></pre >
566566
567567
@@ -573,7 +573,7 @@ aborts if there are no sells
573573<pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_is_active_order " >is_active_order</a >(
574574 self: &<a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >ActiveOrderBook</a >,
575575 price: u64,
576- unique_priority_idx: UniqueIdxType ,
576+ unique_priority_idx: IncreasingIdxType ,
577577 is_bid: bool
578578): bool {
579579 <b >let</b > tie_breaker = <a href =" active_order_book.md#0x7_active_order_book_get_tie_breaker " >get_tie_breaker</a >(unique_priority_idx, is_bid);
@@ -780,7 +780,7 @@ Check if the order is a taker order - i.e. if it can be immediately matched with
780780Increase the size of the order in the orderbook without altering its position in the price-time priority.
781781
782782
783- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_increase_order_size " >increase_order_size</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, size_delta: u64, is_bid: bool)
783+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_increase_order_size " >increase_order_size</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, size_delta: u64, is_bid: bool)
784784</code ></pre >
785785
786786
@@ -792,7 +792,7 @@ Increase the size of the order in the orderbook without altering its position in
792792<pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_increase_order_size " >increase_order_size</a >(
793793 self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >ActiveOrderBook</a >,
794794 price: u64,
795- unique_priority_idx: UniqueIdxType ,
795+ unique_priority_idx: IncreasingIdxType ,
796796 size_delta: u64,
797797 is_bid: bool
798798) {
@@ -817,7 +817,7 @@ Increase the size of the order in the orderbook without altering its position in
817817Decrease the size of the order in the order book without altering its position in the price-time priority.
818818
819819
820- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_decrease_order_size " >decrease_order_size</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, size_delta: u64, is_bid: bool)
820+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_decrease_order_size " >decrease_order_size</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, size_delta: u64, is_bid: bool)
821821</code ></pre >
822822
823823
@@ -829,7 +829,7 @@ Decrease the size of the order in the order book without altering its position i
829829<pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_decrease_order_size " >decrease_order_size</a >(
830830 self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >ActiveOrderBook</a >,
831831 price: u64,
832- unique_priority_idx: UniqueIdxType ,
832+ unique_priority_idx: IncreasingIdxType ,
833833 size_delta: u64,
834834 is_bid: bool
835835) {
@@ -853,7 +853,7 @@ Decrease the size of the order in the order book without altering its position i
853853
854854
855855
856- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_place_maker_order " >place_maker_order</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, order_id: <a href =" order_book_types.md#0x7_order_book_types_OrderIdType " >order_book_types::OrderIdType</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::UniqueIdxType </a >, size: u64, is_bid: bool)
856+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" active_order_book.md#0x7_active_order_book_place_maker_order " >place_maker_order</a >(self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >active_order_book::ActiveOrderBook</a >, order_id: <a href =" order_book_types.md#0x7_order_book_types_OrderIdType " >order_book_types::OrderIdType</a >, price: u64, unique_priority_idx: <a href =" order_book_types.md#0x7_order_book_types_UniqueIdxType " >order_book_types::IncreasingIdxType </a >, size: u64, is_bid: bool)
857857</code ></pre >
858858
859859
@@ -866,7 +866,7 @@ Decrease the size of the order in the order book without altering its position i
866866 self: &<b >mut</b > <a href =" active_order_book.md#0x7_active_order_book_ActiveOrderBook " >ActiveOrderBook</a >,
867867 order_id: OrderIdType,
868868 price: u64,
869- unique_priority_idx: UniqueIdxType ,
869+ unique_priority_idx: IncreasingIdxType ,
870870 size: u64,
871871 is_bid: bool
872872) {
0 commit comments