{
"data": {
"kida.near": {
"widget": {
"Untitled-0": {
"": "const { apiKey, component } = props;\nconst BASE_URL = \"https://api-v2.flipsidecrypto.xyz/json-rpc\";\n\nState.init({\n data: [],\n hasError: false,\n isLoading: false,\n isRunning: false,\n queryId: \"\",\n});\n\nif (!apiKey) {\n return <div>Empty apiKey!</div>;\n}\n\nconst getQueryResult = async () => {};\n\nconst getQueryStatus = async () => {};\n\nconst runQuery = (sql) => {\n console.log(\"here2\");\n let body = {\n jsonrpc: \"2.0\",\n method: \"createQueryRun\",\n params: [\n {\n resultTTLHours: 1,\n maxAgeMinutes: 0,\n sql: \"SELECT date_trunc('''hour''', block_timestamp) as hourly_datetime, count(distinct tx_hash) as tx_count from ethereum.core.fact_transactions where block_timestamp >= getdate() - interval'''1 month''' group by 1 order by 1 desc\",\n tags: {\n source: \"postman-demo\",\n env: \"test\",\n },\n dataSource: \"snowflake-default\",\n dataProvider: \"flipside\",\n },\n ],\n id: 1,\n };\n\n console.log(\"here\");\n asyncFetch(BASE_URL, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", \"x-api-key\": apiKey },\n body,\n }).then((res) => {\n console.log(res.body);\n });\n};\n\nconst cancelQuery = async () => {};\nreturn (\n <div>\n <div>Rendering Child: </div>\n <>\n {component({\n data,\n hasError,\n isLoading,\n isRunning,\n runQuery,\n cancelQuery,\n })}\n </>\n </div>\n);\n"
}
}
}
}
}