Fetching Table
To fetch a table in zeus is easy, setup with:
Secondary index example
This is an example of using the getTableRowsSec
function to return a secondary index. This function takes the following arguments:
rpc — rpc for leap instance
code —The account who owns the table
table — The name of the table as specified by the contract abi
scope — The scope within the contract in which the table is found
keys —Keys to satisfy secondary index query
limit = 1 — limit of amount of rows to return
key_type — secondary index type,
i64, i128, i256, float64, float128, ripemd160, sha256
index_position — Index number, 1 — primary (first), 2 — secondary index (in order defined by multi_index), 3 — third index, etc
More details available in this article: https://medium.com/@NatPDeveloper/intro-to-antelope-smart-contract-unit-testing-with-zeus-50a6c1d7efce.
Last updated