UNPKG

godprotocol

Version:

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

24 lines (19 loc) 737 B
const super_ = async(args, {vm, call_config, thread, chain})=>{ let {object} = args if (object.config.inherited.includes(call_config.cls)){ console.warn('Cyclic inheritance, truncating now!', call_config.cls) return; }else { console.log(call_config.cls) object.config.inherited.push(call_config.cls) await (await vm.account.manager.ds.folder(object.config.location)).write(object.config, {replace: true}) } let cls = await vm.variable(call_config.cls, {chain, obj: true}) let args_ = [] for (let a in args.args){ if (a=='object') continue args_.push(await args.args[a].to_address()) } await cls.run_init({vm, args: args_, ins: await object.to_address(), thread}) } export default super_