wharfkit / contract

Access table data, create actions, and retrieve types for Antelope-based Smart Contracts
https://wharfkit.com
Other
1 stars 1 forks source link

[Contract kit] - get_table_by_scope query #47

Closed david-at-greymass closed 9 months ago

david-at-greymass commented 10 months ago

One thing we haven’t addressed in the Contract Kit is get_table_by_scope.

curl 'https://eos.greymass.com/v1/chain/get_table_by_scope' --data-raw '{"code":"eosio.msig","table":"proposal"}'

It returns all the scopes you could query from the table.

Image

Trying to think of what the syntax would be for this, which I imagine would be on a Table instance, like…

await contract.table('proposal').scopes().next()
aaroncox commented 10 months ago

Related PR: https://github.com/wharfkit/contract/pull/48