-
Notifications
You must be signed in to change notification settings - Fork 30
Add order management commands to wallet CLI; add commands/methods for obtaining existing orders to wallet CLI and RPC #2000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImplOfAnImpl
commented
Dec 16, 2025
|
|
||
| pub use basic_test_time_getter::BasicTestTimeGetter; | ||
|
|
||
| pub trait UnwrapInfallible { |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I ended up not needing this, but it's still better to have it in test-utils rather than in tests of some particular crate.
…ng token tickers and order-related rpc calls having been renamed
…s only affects RPC docs); pool_decommission_destination now returns RpcAddress<Destination> instead of Destination. General: a large TODO about RPC types was added; RpcCurrency was renamed to Currency and an actual RpcCurrency was introduced; Destination's value hint is now HEXIFIED_DEST instead of BECH32_STRING; `impl HasValueHint` for `Id` was removed, nowindividual Ids implement it separately, specifying the appropriate hint.
… listing for RPC and CLI
a9012b5 to
fa7349a
Compare
4da5d77 to
056c308
Compare
OBorce
approved these changes
Jan 13, 2026
| // Also, some of the types are quite generic, e.g. `TokenTotalSupply` (which should have been named | ||
| // `RpcTokenTotalSupplyIn` and moved out of the wallet). | ||
| // | ||
| // What should we do: |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
Base automatically changed from
chainstate_tokens_info_as_single_call
to
master
January 13, 2026 10:47
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
order-create,order-fill,order-freezeandorder-conclude, similar to the previously existing RPC methods (also, the RPC methods themselves were renamed -create_orderis noworder_createetc)order_list_own(RPC) andorder-list-own(CLI);order_list_all_active(RPC) andorder-list-all-active(CLI).Some minor changes:
account-balancenow also prints token tickers.String's that represent addresses toRpcAddress<TheCorrespondingId>. This only affects how those parameters are shown in the RPC docs (was: "string", now: "bech32 string").HasValueHintforDestination, so that it returns "hexified destination" instead of "bech32 string" (because it's how it's actually serialized).impl<T> HasValueHint for Id<T>, because most ids (pools/delegations/tokens/orders) are serialized as "hexified" (e.g. "HexifiedTokenId{0xcf...e0}")and only the rest (block and tx ids) are actually serializes as pure hex. Now each
IdimplementsHasValueHintindividually.I added
basic_serialization_testtocommon/src/lib.rs, which checks how various ids andDestination/VRFPublicKeyare serialized and how their rpc value hints look like.chainstate_pool_decommission_destinationto actually returnRpcAddress<Destination>.common/src/chain/currency.rs), let me know if you agree.(The TODO has nothing to do with the Currency type, I just didn't know where to put it).
Fixed warnings coming from clippy 1.92;This was moved to Fix CI, appease clippy 1.92 #2002conclude_and_recreate_in_same_tx_with_same_balancesandconclude_and_recreate_in_same_tx_with_different_balances(unrelated to this task, I just thought it was an interesting scenario to check)
P.S. the CLI commands for order listing just spit all the data out into the console; later we can add pagination, if needed.
Example of the
order-list-own's output:(orders are sorted by creation date, unconfirmed ones come at the end)
And this is what
order-list-all-activecurrently shows on testnet:Here orders are sorted first by give currency, then by ask currency, then by give/ask ratio.
order-list-all-activealso allows to filter the orders by a certain ask currency or give currency or both.E.g.
order-list-all-active --give-currency tmltk1aa3vvztufv5m054klp960p6f6pf59ugxp394x7n42v0clgwhrw3q3mpcq3will show: