Browser-based compiler can run code now

chrisethchriseth ✭✭✭Member Posts: 170 ✭✭✭
edited July 2015 in Solidity
The browser-based compiler can now run code, thanks to Martin and his ethereumjs-vm package!
Everything is in memory only and the interface is still really crude. For example it is not possible to give any function arguments yet, so all functions that take arguments will fail.
To start, click the "create" button, which will deploy the contract. Once it is deployed, you can use the buttons that appeared to call individual functions on the contract.
If you change the code (causing it to be recompiled), these buttons will vanish, so be careful.


Comments

  • pinoyyidpinoyyid Member Posts: 17
    This has the makings of an extremely useful tool. Is it the intention to continue development, eg. adding support for arguments, or is it more of an experiment?
  • chrisethchriseth ✭✭✭ Member Posts: 170 ✭✭✭
    Arguments were just added, but in general, it is more like a proof of concept to get you started easily. If you want to do more advanced things, you should switch to mix. My guess is that cosmo will also include this feature at some point.
  • CryptoFutureCryptoFuture Member Posts: 44
    This is fantastic! All it needs is fake mining so that we can run functions and push the blockchain further
  • mikkaaamikkaaa Member Posts: 34
    I created a simple contract for a test that should return the received transaction to the sender.
    contract Test {
        
    	function Test() {
    
    	}
    
            function() {
    		var ether = msg.value;
    		msg.sender.send(ether);
    	}
    }
    The tool compiled it and it went live: https://etherchain.org/account/0xbbf289d846208c16edc8474705c748aff07732db

    But the contract keep the ether and not sending back. What am I missing here?

    (I know that I should not test these things on live money, but maybe I can spare the 1.5 ether)

    If a contract is deployed with your tool, how to kill it?
  • chrisethchriseth ✭✭✭ Member Posts: 170 ✭✭✭
    edited August 2015
    Etherchain reports that there is no code deployed at that address.

    The browser-based compiler is completely offline, it does not deploy anything to the blockchain - note the line at the top that reads "Execution environment does not connect to any node, everyhing is in-memory only."
Sign In or Register to comment.