• Register
0 votes

Problem :

I am new to Etherdelta. I want to deposit the token on Etherdelta from the Myetherwallet wallet but I am facing below error. My token is already created and also my contract is validated. I can send the tokens from my address holding the tokens but if I try to send them from the receiver address, I get the error.

Warning! error encountered during contract execution [bad instruction]”

I am trying to fix this error from past 2 days but still unable to fix it. Can somebody guide me in fixing above error?

8 4 2
2,300 points

2 Answers

0 votes

Solution :

I have faced this issue earlier and I know it is very tough for beginners to fix it.

I guess your issue is related to EqualToken it assesses a fee for each transfer, so even if you have already approved EtherDelta to take some number of tokens but the concern here is that you can actually transfer only that number of tokens less your fee, which is I think just 1%.

I can tell you that based on the current balance that you have and a required 1% fee considering them you can still transfer the 29411.1564788 tokens to the EtherDelta. And you can try again with the amount you have.

5 2 1
4,980 points
0 votes


recipes is a dynamic storage array. You require to alter the size of the array to include new elements to it. You can either perform this by apparently increasing the length of the array or by shoving a new element into the array.

function addRecipe(uint256 _price, string _name, string _content) public {
    recipes[recipeCount].price = _price;
    recipes[recipeCount].name = _name;
    recipes[recipeCount].content = _content;
    recipes[recipeCount].recipeOwner = msg.sender;



function addRecipe(uint256 _price, string _name, string _content) public {
    Recipe memory r;
    r.price = _price;
    r.name = _name;
    r.content = _content;
    r.recipeOwner = msg.sender;



The code is so probably easy that the only issue would appear to be with onlyOwner. I would inspect the value of the owner variable. I bet it's not what you conceive it is. (It's either zero or the value of the sender who opened the contract). You didn't give the address of the contract, so I can't inspect the value of owner on Etherscan. In addition you're not giving the address of the calling account. In case they don't match, the transaction will throw, which (as is true of all Ethereum errors) will report out of gas. In case the code is truly as easy as you tell, the only probable issue is with owner

10 6 4
31,120 points

Related questions

0 votes
1 answer 1.4K views
Problem : I am a completely novice in the hibernate world and facing below error, WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement The ... hibernate 4 version all my code runs very well. I looked for many solutions but they are not working for me.
asked Feb 4 jwilliam 3.9k points
0 votes
1 answer 142 views
Problem : While doing the drupal 6 to 7 upgrade I am facing a not so helpful message "The website encountered an unexpected error. Please try again later." everytime I go to the certain pages. example) /admin/config What is a best way to find out what is causing ... it? All I can think of right now is to start disabling the contributed modules until that the page works or looking through a logs.
asked Jan 21 jwilliam 3.9k points
0 votes
1 answer 85 views
Problem : I am trying to run my registration jsp page with the servlet. But it is throwing following error: The server encountered an internal error that prevented it from fulfilling this request. java.lang.NullPointerException com.java.task11.utils.ValidateUtil.EmailVal( ... .tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:62) I am unable to figure out why this is happening? Any clues?
asked Dec 2, 2019 alecxe 7.5k points
0 votes
1 answer 739 views
Problem : I am trying to host the asp.net 5 application on the azure, the code is complied for the beta8, my application runs fine on the local environment but when i publish the code on the azure site. I am facing a common error as follows: "The specified CGI application encountered an error and the server terminated the process."
asked Nov 27, 2019 alecxe 7.5k points
0 votes
0 answers 2 views
4 I want pop out all the large values and its keys in a dictionary, and keep the smallest. Here is the part of my program for key,value in dictionary.items(): for key1, value1 in dictionary.items(): if key1!= key and value > value1: dictionary.pop(key) print (dictionary) Which results in RuntimeError: dictionary changed size during iteration How can I avoid this error?
asked 4 days ago psandprop 2.3k points