<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 11:43:32 Jun 27, 2021, and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

EtherScripter - a visual smart contract builder

24

Comments

  • garygary Member Posts: 6
    I would like a go at this.
  • kingbitcoinkingbitcoin Member Posts: 6 ✭✭
    I would like to beta this. Make it so!
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    Is it OK to post the URL live on our official twitter? Seems to work well enough :)
  • mode80mode80 Member Posts: 64 ✭✭
    Have a couple things to do first. Sending you pm.
  • matslatsmatslats Member Posts: 1
    I'm a scripter looking for an intro to contracts and a gui to play with would be very helpful!
  • martingalemartingale Member Posts: 1
    @mode80 Awesome! I would love to beta test it.
  • martingalemartingale Member Posts: 1
    Awesome! I would love to beta test it.
  • martingalemartingale Member Posts: 1
    Awesome! I would love to beta test it.
  • UnsoundUnsound San DiegoMember Posts: 6
    I would love to help beta test.
  • IVI3T4LIVI3T4L Member Posts: 10
    I would like to beta test this!
  • EricBlankEricBlank Member Posts: 5
    It's pretty awesome, although I can't figure out how to spend to a specific address
  • EricBlankEricBlank Member Posts: 5
    I'm trying to modify the coin flip script, just as a test, to send 1.5x the bet to the bettor, and 0.5 to a specific address
  • EricBlankEricBlank Member Posts: 5
    The idea is a basic way for a contract creator to collect "royalties" on his DAO
  • EricBlankEricBlank Member Posts: 5
    I have a feeling the math would make the contract defunded pretty quick, it's just for fun
  • mode80mode80 Member Posts: 64 ✭✭
    Ethereum doesn't do floating point... meaning you can't use numbers like 0.5. I'm going to push a fix so it won't let you type them in.

    Of course you can do the same thing by dividing by 2.
  • mode80mode80 Member Posts: 64 ✭✭
    here's how you could give the contract a 2% edge without using decimals

    image
  • triasttriast Member Posts: 3
    This is fantastic! I want to play with it.
  • mode80mode80 Member Posts: 64 ✭✭
    2% edge example above should say 196 / 100 but you get the idea.

    I'm aiming to make this generally available concurrent with POC-4. In the meantime, if you asked for an invite and didn't get one, please remind me and I'll send you the temporary link.
  • EricBlankEricBlank Member Posts: 5
    That two percent house edge, can the creator of a script make the script pay out to his personal address at intervals?
  • mode80mode80 Member Posts: 64 ✭✭
    edited April 2014
    Intervals are tricky. Ethereum contract code only runs when called (you send it a transaction or some other contract does). So you have to poke it to make it do something.

    But a simple way for the owner to draw down the contract balance would be to put in a check "when tx.sender = [your address] send 10ether to [your address]". (You can make that with just a few blocks. You could get fancier.)

    Post edited by mode80 on
  • ethergrokethergrok USMember Posts: 25
    Contracts that call other contracts, (contracts and subcontracts), imho, are the next big step for those developing contracts for Ethereum. A subcontract, in my mind, is very much like a function in a program, and the primary contract that calls contracts is "main".
  • jglazer75jglazer75 Member Posts: 1
    I'd be interested in this as well. I'll take a beta, please. Great idea! Looking forward to playing with it.
  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    @ethergrok Just on cll-sim, but did it with transaction exchanging for instance it could be used for trustlessly selling subcurrency, if the subcurrency script doesnt support it.(its just an example now, but silly for them not to support it, unless if it is not intended to be transferable at all) Users can also use across two instances of ethereum blockchains.

    Another idea is to make a 'egalitarianizer'. Basically instead of using a non-egalitarian contract(C) directly, you send messages to the egalitarianizer(E), the E then uses contracts for each person(PC) passing on the commands. The point is that when the contract sends coin to PC, it is send through to E but E doesnt send it straight to P, instead it sends for instance the total income of E divided by the number of persons using it.(instead of P↔C we have P↔E↔PC↔C, where PC is there because C probably identifies by-adress.) Of course that is the extreme case. You could also give people by 'weight', using for instance dw/dt = a√I + k(C - w) there, for constant I after t>>1/k, w=a√I/k+C, the parameter k makes sure the income doesnt change too quickly. (Note that the income is not proportional to w, its by w/∑w with the sum over all people) The square root damps income disparity, you could use any function instead.(or linear, and let the constant deal with it.Sorry i

    With contracts as 'closures' you can use contracts as parts of other contracts. Instead of a contract having a fixed set of options, it has a sort of protocol, and users of contracts can accept a closure, and for which the return value of another particular contract to be used to create behavior.

    A lot of this depends on how expensive calling and creating contracts is. I think it should be cheaper to call from a contract than to make a Tx that goes into a block. I think that is where this is heading, really i should read more. Havent gotten round to Gavin Woods paper yet.

    Uhm.. sorry from derailing from the topic. mode80 made a neat bit of software.
  • FreddyFenderFreddyFender Member Posts: 39
    @Jasper, we need to start a new thread for this issue of contract ETH CLL/LLL/SLL best practices (BP). I see some major simplicity and missteps during this early stage of contract development. mode80's etherscripter would be a good/great repository of BP: these ideas and the code blocks in each appropriate language, but we need to point out the obvious ones so that it becomes rote for everyone eventually.

    @mode80, I'm tearing through this code and the B***** creator mechanisms, but I am missing some basics so I'll PM later.
  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    edited April 2014
    @FreddyFender?, well it is pretty clear they're examples now :) Also, i'd rather code in ascii, i dont like using the mouse for that stuff. As cool as it is, the difference between this application and coding is pretty thin, the difference is that the application forces you to think of the objects as ... objects. (the gui approach is never going to be faster if tab completion is available)

    The term 'Best Practices' seems more arrogant than it should be. Should just be advice and checklists of ways to look at the code and tests to put it through. (edit: being a pita in mentioning that..)
    Post edited by Jasper on
  • mode80mode80 Member Posts: 64 ✭✭
    I'm a keyboard guy myself. EtherScripter is meant to be easier not faster. If it bridges users to a comfort level that they can bust out contracts in vim, that'd be great.
  • mode80mode80 Member Posts: 64 ✭✭
    I've sent out links to the updated beta of EtherScripter.

    This version lets you build smart contracts with an expanded set of blocks and generates LLL that you can paste into the POC-4 Ethereum client.

    I'm interested your feedback. Is EtherScripter useful to you are? Are you building smart contracts with it? What would make it better? And of course, what's broken that I need to fix?

    Thanks
  • ChristianPeelChristianPeel Member Posts: 26
    edited April 2014
    It looks very useful; here are a few comments and questions
    * The 'About' button doesn't work at the top of the page.
    * Do you plan to allow people to save contracts?
    * In the name registrar; it seems like the reverse hash (name to address) could be taken care of easily off the blockchain. Why are you putting both there?
    * Did you come up with the shapes yourself, or is there some standard form? A completely minor thing is why the notches on some of the blocks do not fit together; in the attached figure I'm wondering why the green block doesn't have a notch that the purple block fits into? This is very minor; so there's no need to change it if you just haven't fixed all the visual things; I'm just curious
    * I'm curious about the 'once' part of the data-feed contract. Is the 'once' thing something that is there in LLL or in Lisp?
  • ChristianPeelChristianPeel Member Posts: 26
    I guess the image refered to above didn't get attached. Here it is
  • mode80mode80 Member Posts: 64 ✭✭
    edited April 2014
    The About link should work. If not, please send me your browser & OS details and I'll look into it.

    Yes, "save" is high on the ToDo list. In the meantime it saves (just) your last work between sessions. You can also copy-paste the XML and stash it in a text file if you're going back and forth between contracts.

    The items currently under the sample menu are from Gavin's LLL samples at: https://github.com/ethereum/cpp-ethereum/wiki/LLL-Examples-for-PoC-4 . (I'm using them as tests to make sure the EtherScripter's generated LLL compiles to the same EVM as those samples.) I think Gav intended them as quick illustrations.

    A bottom puzzle tab indicates you can insert a block there. (Some blocks like [stop] don't have those naturally.)

    The block you mention with the 'once do' piece actually corresponds to a for-loop, and that piece is the loop initializer. (You can see the LLL it compiles to when you click the 'Show LLL' button.) I would have used a while-loop there myself, but these aim to be an exact match to the model contracts.

    I'm going to add new samples that might be better for learning basics.
Sign In or Register to comment.