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
Tx metadata support in CLI for creating transactions #2076
Comments
To be tackle at the very end I think or could even be moved in another story. |
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. 2136: Run existing pool DB property tests on model implementation. r=jonathanknowles a=jonathanknowles # Issue Number https://jira.iohk.io/browse/ADP-406 # Overview Over time, we've built up a fairly large suite of [property tests for the pool database](https://github.com/input-output-hk/cardano-wallet/blob/ff181966317b50083a61aa3e4f3dfd2ac1bff1a3/lib/core/test/unit/Cardano/Pool/DB/Properties.hs). However, up until now these tests were only ever run on the **SQLite** implementation. The **model** implementation was not tested. This PR fixes this by adjusting the test suite to test both the **SQLite** and **model** implementations. For example: ```hs ghcid \ --command "stack ghci cardano-wallet-core:lib cardano-wallet-core:test:unit" \ --test ':run Spec.main -m prop_listPoolLifeCycleData_multiplePools_multipleCerts' Cardano.Pool.DB.MVar MVar Stake Pool Properties prop_listPoolLifeCycleData_multiplePools_multipleCerts +++ OK, passed 100 tests. Cardano.Pool.DB.Sqlite Sqlite Stake Pool Properties prop_listPoolLifeCycleData_multiplePools_multipleCerts +++ OK, passed 100 tests. Finished in 40.3082 seconds 2 examples, 0 failures ``` ## Details This PR: 1. Generalizes the `Pool.DB.Properties` module to work with any implementation of `Pool.DBLayer`. 2. Adds a `Pool.DB.MVarSpec` module to handle the required setup for testing the model implementation. 3. Fixes the small number of resulting failures. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io> Co-authored-by: Jonathan Knowles <jonathan.knowles@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. 2135: Fix dylib references of bundled programs on macOS r=rvl a=rvl ### Issue Number Resolves #2134 ### Overview - On macOS rewrite dylib references from `/nix/store` to `@executable_path` - for every executable in the bundle. - Add linking tests to `check-bundle.rb` for macOS and Linux. 2141: Make Jörmungandr tests pass again r=rvl a=piotr-iohk # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> # Overview - 3665332 Disable STAKE_POOLS_* tests due to #2140 - 6e276af Remove hard-coded mnemonics in case not necessary in integration tests - 038c365 Remove Shelley specific transaction suite. Add few more basic transaction tests to Jormungandr suite. - 6e98d4b BYRON_MIGRATE_01 - make Jormungandr big wallet for migration smaller (the same as Shelley one) and adjust to pass on both backends - e3d6a55 adjust genMnemonics to be more standard # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io> Co-authored-by: Piotr Stachyra <piotr.stachyra@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=KtorZ a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=KtorZ a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com> Co-authored-by: IOHK <devops+stack-project@iohk.io>
2125: CLI: Add option "cardano-wallet transaction create --metadata=JSON" r=rvl a=rvl ### Issue Number ADP-307 / #2076 ### Overview - Adds `--metadata=JSON` option to transaction create and fee estimate commands. ### Comments Will update the CLI wiki page after merging. Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
lgtm. There is actually one issue that is related -> #2169. Also the way I have updated https://github.com/input-output-hk/cardano-wallet/wiki/TxMetadata#cli on how to use metadata in CLI (which worked for me) for Linux/Mac (putting metadata argument in single quotes) and Windows (metadata argument in double quotes and double quotes inside metadata JSON escaped). Updated Wallet Cmdline interface with metadata exemplary usage. |
Context
ADP-307
For completeness, the CLI should support metadata when creating transactions.
Decision
Add a
--metadata
option to the CLI:I considered supporting loading a JSON file, either a
--metadata-file
option, or through@
notation alacurl --data-raw
. But it should be ok in all cases to simply put the entire JSON data as a command-line argument.Acceptance Criteria
cardano-wallet transaction create
.Development
QA
lib/cli/test/unit/Cardano/CLISpec.hs
.lib/cli/test/unit/Cardano/CLISpec.hs
- "Tx Metadata JSON option".The text was updated successfully, but these errors were encountered: