UNPKG

@effectai/sdk

Version:

Effect Network Javscript/Typescript SDK (for [https://effect.network](https://effect.network))

20 lines 634 B
import { useEFXContracts } from "../../utils/state"; export const getSubmissions = async ({ client, reverse = false, }) => { try { const { provider } = client; const { tasks } = useEFXContracts(client); const data = (await provider.v1.chain.get_table_rows({ code: tasks, table: "submission", json: true, reverse, })); const { rows } = data; return rows; } catch (e) { console.error("Error while fetching tasks:", e); throw new Error("Failed to fetch tasks"); } }; //# sourceMappingURL=getSubmissions.js.map