I am using the OpenZeppelin Clones Library so that users of my dapp can create clones of my implementation contract. My dapp will be following the EIP-1167 standard.
For functionality, I will need to save the deployer address (of implementation contract). The way one would traditionally do this would be in the constructor, however clone contracts do not read the 'creation-code' and they only view 'runtime-code', so if I save deployer address using a constructor, the cloned contracts will not be able to access that saved variable (as far as I know).
The reason I want to save the deployer address is because I would like to be paid out a certain percentage of the balance of all the cloned contracts.
Can someone please tell me how I would go about saving the deployer address so that I can be paid out from the cloned contracts. I am also open to other means of going about this, so long as I am able to receive payments to my deployer address.
One idea I have is to store my deployer address (or any other personal address) as a variable in the implementation contract and divert all payments to that address. This would remove the need of having to set a deployer address in the constructor.
Would this be a good way to go about it or is there a more 'correct' method which I can use for this?
Any help would be greatly appreciated! Thanks in advance!