#Ether 6: I don’t understand automatic selling….

You can understand some codes by reading them but sometimes you get proven wrong when you actually interact with them. “automatic-selling-and-buying” tutorial of Ethereum is one of these things. Here is my “not” walking through video…

What I thought I understood before was

  • You can set buy/sell price at “setPrice()” function.
  • If you select “buy()” function, it lets you exchange ETHER to your Token with the price you set.
  • If you select “sell(amount)” function, it lets you exchange your Token to EITHER with the price you set.

When I actully tried however, I could not excute “buy()” function due to some error message (see the screen capture below), and “sell()” did not seem to do anything.

Image for post

I would appreciate a lot if someone more experienced than me can spot where I’ve done wrong.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store