Issue To Be Solved
It's possible to instruct emulator to predeploy some specific contract, when it starts.
One of the basic case is to deploy NonFungibleToken, NFTStorefront and FUSD contracts by passing "--contracts" flag.
But CLI can also deploy other contracts specified in flow.json file.
The problem is that none of those contracts are registered in FlowManager contract and thus can't be properly resolved later in transactions and scripts.
Suggest A Solution
Since FlowManager is deployed after other contracts, we can't listen for events from those contracts. I suggest creating a "system" which will parse flow.json file to figure out, where said contracts could have been deployed. Then checking those accounts and updating the FlowManager entries.
Issue To Be Solved
It's possible to instruct emulator to predeploy some specific contract, when it starts.
One of the basic case is to deploy NonFungibleToken, NFTStorefront and FUSD contracts by passing "--contracts" flag.
But CLI can also deploy other contracts specified in
flow.jsonfile.The problem is that none of those contracts are registered in
FlowManagercontract and thus can't be properly resolved later in transactions and scripts.Suggest A Solution
Since
FlowManageris deployed after other contracts, we can't listen for events from those contracts. I suggest creating a "system" which will parseflow.jsonfile to figure out, where said contracts could have been deployed. Then checking those accounts and updating the FlowManager entries.