using web3.eth.solidity in go-ethereum

as part of the dapp i'm working on I use the following:

var code = web3.eth.solidity(src); var addr = web3.eth.transact({code: code}); console.log(addr);

running this with go-ethereum gives:

"Error: Method not implemented eth_solidity"

my understanding is that go-ethereum will be the first stable client available. are there plans to support eth_solidity in go-ethereum when ethereum goes live?

Comments

  • taramanictaramanic Member Posts: 24
    cslarson: Did you ever figure out a wordaround for this?

    I did not get the same error you got, but I did get an error from the solidity function saying that "msg" is an unrecognized variable.

    I've been trying to get a simple JS program to communicate with a simple contract for months and I've had no luck.
    Either I'm a complete idiot or there's some critical piece of information that's being excluded from every tutorial I've read.

    I know that others have figured out how to communicate with contracts because I've seen a youtube video of Vitalik communicating with the "graph" contract -- unfortunately the specifics of how the contract got loaded were never mentioned.

    And I've heard several people say that if you just want to run contracts (without the network) then use pyethereum -- but apparently that only allows for serpent code, which I've been told is not longer the primary language of Ethereum.

    If you or anyone else would like to work on getting this stuff up and running I'd be happy to work with anyone on this. I would also post anything I learn on a public blog post because there's no reason for this to be such a mystery.
  • drcodedrcode Member Posts: 62 ✭✭
    edited February 2015
    Hi, my understanding is that solidity will NOT be supported by the go client on genesis day. If you doubt what I'm saying, run "find . -name *.go | xargs grep solidity" on the go-ethereum repo... you will be disappointed by the results.

    However, it's straightforward to compile ethereum either on the online compiler or the "solc" compiler from ethereum-cpp. Then, you can publish it to the blockchain via go-ethereum by just pushing the binary data via some javascript code. See my solidity contract and the documentation in this repo, and how it is published via go-ethereum using the binary data: https://github.com/drcode/ethereum-order-statistic-tree
  • cslarsoncslarson Member Posts: 11
    @taramanic: i was working under the assumption that this would be implemented in mist so for the time being i switched to alethzero (which supports compiling solidity).
    drcode: thanks very much for the info. i'll find another way :smile: i basically need figure out how to send parameters to the contract constructor. this would be a more robust approach anyway.
Sign In or Register to comment.