@nventuro - seeking additional help on the topic about ERC884 Crowdsales I previously posted about here:
For context, this crowdsale should revert when calling buyTokens()
from an unverified account on the ERC884 contract, but deliver tokens when calling buyTokens()
from a verified account.
In my truffle tests, I am able to verify a thirdParty account, then send ETH from that account to the crowdsale to successfully acquire tokens.
However when I deploy to Rinkeby and verify a thirdParty account after deployment, the function buyTokens()
reverts. What is interesting here is that, accounts verified at the point of deployment can buy tokens by sending ETH or calling _buyTokens
, however accounts verified after deployment are unable to be beneficiaries of these tokens.
The issue seems to come from the function _deliverTokens()
calling the token.safeTransfer()
method. However the transfer
method is overwritten in the ERC884 specification to check if the address is approved first.
What would be the best way to troubleshoot this? I am antsy about overriding the _deliverTokens method, but I think this may be the issue here.