I am trying to implement an app in Sophia, where one Contract needs to create other multiple Contracts? Is it possible in the current Aethernity/Sophia version? Same question for Oracle: can Contract create an Oracle on its own?
I am now trying to understand, whether my Contract, which also registered as an Oracle, can somehow be subscribed for open questions on the chain. I do not really understand how Oracle.get_question function supposed to work, since it requires me as an Oracle to know the query. How can I get the query then? I am completely lost at this point.
No, there is no on-chain subscription mechanism accessible from within the contract. That would open up for all sorts of weird behavior. You could certainly envision having an external service scanning the chain for oracle queries and then triggering the contract.
So, for a contract-oracle you need to feed it the QueryId of the question to it in a contract call, and then the contract-oracle can get the question and prepare and post an answer.