0

My ICO crowdsale contract had

Contract Warning! Error encountered during contract execution [Reverted]

https://etherscan.io/tx/0xfe4349d2e054fb7d48a7383d7145afe8852974f702f8a99c08daadc4d706c3ba

https://etherscan.io/address/0x1b2f1ddb9696bb6869999636121277c271f6f23c#code

Does anyone know what issue and help ?

New contributor
Kevin Ng is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Can you share the Solidity code and the code that calls the smart contract? – Rosco Kalis Jan 11 at 11:27
  • Most likely, the require condition in contract function failed. If you put custom error message in require condition, you will see that in remix that which condition failed. – Yogesh - EtherAuthority.io Jan 11 at 12:04
  • Here is the Solidity code etherscan.io/address/… – Kevin Ng Jan 11 at 13:01
0

From the parity's transaction trace

Action [6]  
    CallType:   call
    From:    0x1b2f1ddb9696bb6869999636121277c271f6f23c
    Gas:    3849695 Gwei
    To:  0xfc72bf8cba2a82fd887f35ce36fbec5d8ed97465
    Value:  0 Ether
    BlockHash:  0xbf2163124c4db9200787f305e03025ad4bf174d3107b7f116c43c28f7fc4e6b9
    BlockNumber:    7047218
    Error:  Reverted
    Subtraces:  0
    TraceAddress:   [ 4 ]
    TransactionHash:    0xfe4349d2e054fb7d48a7383d7145afe8852974f702f8a99c08daadc4d706c3ba
    TransactionPosition:    167
    Type:   call

It reverts when calling the BtcexToken

Checking the balance of BtcexCrowdsale the problems is obvious, it has zero tokens.

The failure is caused in _deliverTokens function

  function _deliverTokens(
    address _beneficiary,
    uint256 _tokenAmount
  )
    internal
  {
    token.safeTransfer(_beneficiary, _tokenAmount);
  }

The crowdsale tries to transfer tokens to the beneficiary but it doesn't have enough tokens.

Perhaps the tokens wasn't correctly initialized it seemd transferOwnershipAndTotalBalance() should be called and it wasn't (also that function is missing a Transfer() event so I can't be sure).

Your Answer

Kevin Ng is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.