This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
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.
Change Description
Cleos needs to be updated to use this new get_kv_table_rows API similarly to how the current cleos get table command uses get_table_rows.
Change Type
Select ONE
Consensus Changes
API Changes
Documentation Additions
Syntax)
Positionals:
account TEXT REQUIRED The account who owns the table
table TEXT REQUIRED The name of the kv_table as specified by the contract abi
index_name TEXT REQUIRED The name of the kv_table index as specified by the contract abi
Options:
-h,--help Print this help message and exit
-l,--limit UINT The maximum number of rows to return
-k,--key TEXT Deprecated
-L,--lower TEXT JSON representation of lower bound value of key, defaults to first
-U,--upper TEXT JSON representation of upper bound value of key, defaults to last
--encode-type TEXT The encoding type of index_value, lower bound, upper bound 'bytes' for arbitrary hexdecimal bytes 'dec' for decimal encoding string of (uint64t , uint128_t , float64, float128) 'hex' for hexdecimal encoding string
-b,--binary Return the value as BINARY rather than using abi to interpret as JSON
-r,--reverse Iterate in reverse order
--show-payer Show RAM payer
ex)
cleos get kv_table --encode-type name -L boba -U bobj kvtable kvtable primarykey
cleos get kv_table --encode-type name -k boba kvtable kvtable primarykey
cleos get kv_table --encode-type hex -k 1 kvtable kvtable foo
cleos get kv_table --encode-type dec -k 1 kvtable kvtable foo
cleos get kv_table --encode-type dec -L 2 -U 5 kvtable kvtable foo
cleos get kv_table -r -b --encode-type dec -L 2 -U 5 kvtable kvtable foo