Closed pabloruiz55 closed 6 years ago
As per my understanding, you want to change the owner of the total supply (replace issuer -> STO contract address). If My understanding is correct then we can transfer total supply to STO contract in selectOfferingProposal()
. and for ownership do you think it will be safer to provide the ownership to the offering contract to call other functions as well.
Yes this is a bug, need to fix. It should transfer Security Tokens from the STO balance to the contributor.
We ended up not allowing a change of owner, but the ST must first be sent to the STO.
Picture the following scenario.
The problem here is that in reality, as with 99% of crowdsales, you want the STO to be the owner of the Security Token contract and have it posses the total supply of tokens in their control.
Ideally, The STO should be deployed first and it should handle the creation of the SecurityToken contract, but in my tests, doing that is not possible do to gas running out.
The problem here is that issueSecurityTokens function needs the SecurityToken total supply to be assigned to its owner (the Issuer) and even if the tokens were first transferred to the STO, this function will try to move them from the owner balance which is still the Issuer and there's no way to modify that.