Lỗi warning error encountered during contract execution bad instruction năm 2024

When a transaction is marked “Fail” on Etherscan.io, the funds the sender intended to send are not deducted but remain in the sender’s wallet. However, the “Gas Fee” will still be deducted. Below are the scenarios in where your transaction might fail:

Out of Gas

When a transaction has failed due to “Out of Gas,” this means the gas limit set during the transaction is below the required gas [computational cost – see here] needed to perform the transaction. The value of the transaction does not leave your address, but the gas fee is deducted because of the computational cost incurred. You will need to reinitiate the transaction with an appropriate gas limit. Wallet services will usually suggest a gas limit for your transactions. Alternatively, you can also look at similar/past transactions/contracts which have been successfully processed to find out the gas limit required.

Possible reasons for an “Out of Gas” error warning:

  • Insufficient amount of gas limit provided
  • If you are interacting with a Contract, the minimum amount of gas limit required is > 21,000 [try increasing your gas limit]
  • Contract execution exceeds the minimum gas limit required
  • Contract execution error occurred, but the VM execution continues until all of the gas limits is exhausted.

Reverted

In the event of a transaction marked as "Reverted," the transaction did not execute and all state has been reverted to the state before the transaction. Error messages may be included as defined in the contract.

Bad Jump Destination

In the event of "Bad Jump Destination," the errors are related to the nature of the contract. It may be a generic failure caused by technical elements in the code of the contract. Please contact the contract creator for further assistance.

Bad Instruction

In the event of "Bad Instruction," the errors are related to the nature of the contract. It may be a generic failure caused by technical elements in the code of the contract. Please contact the contract creator for further assistance.

A possible reason for a Bad instruction error indicates a logical error during contract execution; if interacting with a Token Contract, it's possible that the tokens are not transferable yet

I am just learning about solidity, I got this code and when I deploy it I got this error can you help me how to fix it?

I don't know where the error exists.

I am using BSC Test-net

    constructor [] {
    _rOwned[_msgSender[]] = _rTotal; // assigning the max reflection token to owner's address  
    ISummitSwapRouter01 _summitSwapRouter = ISummitSwapRouter01[0x10ED43C718714eb63d5aA57B78B54704E256024E];
     // Create a summitswap pair for this new token
    summitSwapPair = ISummitSwapFactory[_summitSwapRouter.factory[]]
        .createPair[address[this], _summitSwapRouter.WETH[]];    
    //exclude owner and this contract from fee
    _isExcludedFromFee[owner[]]             = true;
    _isExcludedFromFee[address[this]]       = true;
    _isExcludedFromFee[_CodradoLiquidityProviderAddress]   = true;
    //Exclude dead address from reflection
    _isExcludedFromReflection[address[0]] = true;
    _isExcludedFromReflection[0x000000000000000000000000000000000000dEaD] = true;
    emit Transfer[address[0], _msgSender[], _tTotal];
}

Mikko Ohtamaa

83.3k52 gold badges272 silver badges443 bronze badges

asked Nov 24, 2021 at 21:27

There's no contract on the 0x10ED... address on the BSC testnet.

When your code is calling the .factory[] function, it expects a response. But no response comes from the non-contract address, which causes the revert.

Guys, I have used metamask wallet when I transferred it. So It holds the address. And when the transaction failed it came back to my address. If you have transferred from Exchange, it is pretty difficult to get as Exchange would send from his Account pool. I feel sorry guys. Worst option try contact the exchange

On Wed, Sep 6, 2017 at 11:18 PM, Bunrith Seng ***@***.***> wrote: How did you get the coin back? This is ridiculous since mine is gone. THe coin should never leave the wallet but in the total states the coin left. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .

-- With Regards, Dinesh V

Chủ Đề