Hi,
So I have watched this screencast
as well as its companion blog article
http://hidskes.com/blog/2014/05/21/ethereum-dapp-development-for-web-developers/However, I can't create the contract, I get the error "Your contract could not be send over the network: line 0: syntax error: store"
What's going on, are these tutorials outdated already?
Comments
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
}
}
Note that tx.origin is now tx.sender. The exact code you are looking for is:
contract.storage[tx.sender()] = 10**30 return compile { var to = this.data[0] var from = tx.sender() var value = this.data[1] if contract.storage[from] > value { contract.storage[from] = contract.storage[from] - value contract.storage[to] = contract.storage[to] + value } }
Use 5000 gas at 10 szabo per gas and you should be good.
download the client 2 days ago, already outdated?
edit: I will try directly the master from github instead of the pre-compiled
The script itself doesn't work for me. app crashes with panic: open /Users/username/go/Resources/qml/wallet.qml: no such file or directory in both master and develop.
In the meanwhile, I'm trying my luck on a linux vm.
webapp.qml:194: getStorage: TypeError: Property 'storageAt' of object JSObject(0x1b1b7390) is not a function
I'll just move on to the cpp-ethereum and AlethZero....