UNPKG

godprotocol

Version:

A distributed computing environment for Web 4.0 — integrating AI, decentralisation, and virtual computation.

21 lines (17 loc) 542 B
const render = async (args, { vm, config, uid, chain }) => { let { object, query_selector, parent } = args; let res = await object.get('__render__') let result = await vm.execute( { type: "call", identifier: res, arguments: parent ? [{ type: "address", value: parent.path }] : [], location: config.location || `${chain.physical_address}/_render`, }, { chain, uid: object.config.uid } ); console.log(result) await object.set_("__config__", result); return result; }; export default render;