If I want to create one top level contract for creating a bunch of other, similar contracts, lets say a top level Uniswap contract that creates liquidity pool contracts and keeps track of the total amount of LP tokens in each of the pool scripts below it. A pool can only be created by a "create" call to the top level contract, and everytime LP tokens are minted or burned, the top level contract updates its datum.
How exactly would I go about that?