MCPcopy
hub / github.com/subquery/subql / fetchNetworks

Function fetchNetworks

packages/cli/src/controller/init-controller.ts:79–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77// GET /networks
78// https://templates.subquery.network/networks
79export async function fetchNetworks(): Promise<Template[]> {
80 try {
81 const res = await axiosInstance.get<{results: Template[]}>('/networks');
82 return res.data.results;
83 } catch (e) {
84 throw errorHandle(e, `Update to reach endpoint '${BASE_TEMPLATE_URl}/networks`);
85 }
86}
87
88// The family query param must be an exact case-insensitive match otherwise an empty result will be returned
89export async function fetchExampleProjects(

Callers 3

runMethod · 0.90
initAdapterFunction · 0.90

Calls 1

errorHandleFunction · 0.90

Tested by

no test coverage detected