I have a physical product to sell. I want to have a digital asset representing each unit of my physical asset. I have created an ERC20 token contract and each token represents a unique instance of the product that I manufacture and want to sell. A new token is minted when a new product comes out of assembly line.
Note: I have selected a fungible token because the lifetime value of each unit of the product remains equal. This also enables trading of my ERC20 token, and by extension, my product, on the open market, as the value of each will be the same forever.
The problem is most of my business logic ended up in the main ERC20 contract. I want to keep the ERC20 token contract as lean as possible. If my business logic changes, I don't want to pause the token and create a new contract. The token should remain the same. To achieve this I want a way that an authorized contract (s) or me as the owner, should be able to call, for e.g. an issueToken function from my main ERC20. Think of having multiple storefronts and sales channels taking orders and on determining a valid order, fulfill it and issue the token to the buyer. This will also help me keep orders, the physical product data and associated metadata, separate from my main ERC20. However, I do want a one-to-one mapping of a unique product with a unique ERC20 token.
How can I best structure this behavior?