Why does Ethereal 0.6.0 freezes whenever I import my Dapp?

I used this tutorial: http://hidskes.com/blog/2014/05/21/ethereum-dapp-development-for-web-developers/
and wrote a contract for my "coin" which got the address 73ca233b59414fcab9deaba6bddc3f8de5ac21e3. I made sure the contract compiles in the latest release - the blog post is a little outdated. Here is the contract code I used:

contract.storage[tx.origin()] = 10**20

return compile {
var to = this.data[0]
var from = tx.origin()
var value = this.data[1]

if contract.storage[from] > value {
contract.storage[from] = contract.storage[from] - value
contract.storage[to] = contract.storage[to] + value
}
}
And here is my index.html for the Dapp's front end:

<html>
<head>
<script type="text/javascript" src="main.js"></script>

<script type="text/javascript">
function init(){
var coin = new UdiCoin(eth, debug);
coin.listenForChange()
}
window.onload = init;
</script>
</head>
<body>
<h4>Your current UdiCoin balance</h4>
<strong id="currentAmount"></strong>
</body>
</html>
And my main.js:

function UdiCoin(doc){
this.contractAddress = "73ca233b59414fcab9deaba6bddc3f8de5ac21e3";
}

UdiCoin.prototype.listenForChange = function(){
var self = this;
eth.getCoinBase(function(addr) {
eth.getStorageAt(self.contractAddress, addr, function(storage) {
document.querySelector("#currentAmount").innerHTML = storage
});
});
}
For some reason, whenever I import (Command-O) index.html into Ethereal 0.6.0 (on OS X Mavericks), Ethereal just freezes and nothing happens until I force it to close.

What's wrong?

Best Answer

Answers

  • udiWertheimerudiWertheimer Member Posts: 3
    Thanks, I actually just realized yesterday this is related to Qt.

    Apparently it's not just compiling though. I used the binary release so I didn't compile myself. I later tried to build the client myself, so I installed Qt. I had problems with the building process, so tried the *binary release* once again, and all of the sudden it worked as expected.
    It worked because I now had Qt 5.2.0 installed, but I didn't think I needed to install it for the binary release to work...

    Thanks again!
Sign In or Register to comment.