I am following this tutorial:

I am working with go-ethereum 0.6. This is my first contract:
init {
this.store[this.origin()] = 10**20
}
I get the error:
Your contract could not be sent over the network: line 1: syntax error: store
What did I do wrong?
0 ·
Comments
initis deprecated since Mutan 0.2.See: https://github.com/ethereum/go-ethereum/wiki/Mutan-0.4
and
http://hidskes.com/blog/2014/05/21/ethereum-dapp-development-for-web-developers/
(in particular the note regarding changes since PoC5 RC17)
eth.getStorageAt()returns an empty string. Any suggestions welcome.return compileinstead ofexit compile. Not sure yet if that's the culprit. Testing with it now.It seems I can send the contract (at least it returns an address for it: "aeefdefa73ae6a207ca1ae52840ddf168b9b438d").
Now when trying to query the amount initially stored (i.e. at contract.storage[tx.origin()]), it does not seem to work.
The returned value from the callback to eth.getStorageAt seems to be empty.
Yet, based on the following console output, I believe the call to getStorageAt went through, no?
2014/08/13 23:07:28 wallet.qml:380: html
2014/08/13 23:07:28 webapp.qml:43: [onMessageReceived]: {"call":"getCoinBase","_seed":692754,"args":[]}
2014/08/13 23:07:28 webapp.qml:43: [onMessageReceived]: {"call":"getStorage","args":["aeefdefa73ae6a207ca1ae52840ddf168b9b438d","3036401729e171b4c1469871ec5303218a060938"],"_seed":422182}
2014/08/13 23:07:28 webapp.qml:43: [onMessageReceived]: {"call":"getStorage","args":["aeefdefa73ae6a207ca1ae52840ddf168b9b438d","3036401729e171b4c1469871ec5303218a060938"],"_seed":683014}
Any idea what did I miss?
Actually is there some tool with a friendly GUI to query the blockchain?
Check if the contract is there, etc...
@rapidos we seem to have run into the same error. In addition to that, the Go-Ethereum / Ethereal client currently fails to update the testnet blockchain.
There is a way to explore the blockchain more elaborately, including contract storage: cpp-ethereum/AlethZero. There are releases for Mac and Win. AlethZero doesn't allow contracts in Mutan syntax however, only LLL and Serpent. The JavaScript API is also slightly different. But it should be possible to get the "currency" tutorial working with some adaptations. See the currency example contract in LLL syntax.
I am indeed still stuck on the same problem (where the callback from getStorageAt returns an empty string).
Ironically other calls seem to work fine, such as:
eth.getBalanceAt
which does return indeed the right amount.
I have been trying the following, all failed (i.e. I observe the same issue):
1. Make a build from the git/develop branch (as opposed to the master branch).
2. To avoid the '25531 block error' on testnet, I did run my own blockchain from scratch, using also a connection to the seedless node on 107.178.217.2:30303.
Now I'm trying to gather more clues through AlethZero (I've simply downloaded the dmg build from git releases section).
I can have both Ethereal & AlethZero nicely talking to each other from the same machine (on OSX):
I simply run Ethereal on a different port:
ethereal -port 30301
Then launch AlethZero, nuke its blockchain, connect it to peer my_own_ip:30301
AlethZero does pick my Ethereal blockchain (the blockchain panel does list the correct blocks: same hashes).
But I do not know how to explore the blocks, states and contracts with AlethZero. Ok, will post my AlethZero related questions on the "Cpp Implementation" category of this forum.
From the current release versions, AlethZero the most usable / working in my experience. But things move fast.
A tip about the JavaScript API: use the following code in the JavaScript console (or in your HTML file) to find the methods of the magic object
eth: This will return a (long) JSON string with all properties and methods ofethin your current version of AlethZero (should work in Ethereal too), which you can turn into something readable by using for example JSBeautifier.Example output on the current development version (0.6.5) of Ethereal: Example output on a recent development version (0.6.4) of AlethZero:
- document.querySelector("#currentAmount") doesn't work for me, instead do document.getElementById("currentAmount")
- sometimes the ethereal client seems to cache the js code and doesn't reflect the code changes, changing the js filename works.
This , plus using my own Testnet, I can get the balance.
I've found the same w.r.t. caching the JS code (from a .js file loaded with a
<script>tag). What I do is add something unique as a query string after the file name, e.g.: Changing the part "123" after every change makes sure Ethereal picks up the new version.