Just so I understand, Ethereum Script is still in a work-on-progress stage at this point and there is no documentation for it at this point, right? Does anyone know when a 'Hello, World' example that is compilable will be available.
I would say don't bother learning ES. Learn E-CLL (the fake Python you see in the whitepaper) from the examples, and you can compile it to ES at http://multisig.info:3000 .
The ES output is: TXVALUE BASEFEE PUSH 200 MUL LT NOT PUSH 10 JMPI STOP PUSH 0 TXDATA SLOAD NOT PUSH 0 TXDATA PUSH 100 LT NOT MUL NOT NOT PUSH 28 JMPI STOP PUSH 1 TXDATA PUSH 0 TXDATA SSTORE
I can see why you might want to wait, but people are very interested now, if you leave it too long, people will move on to other things, and you will lose the current momentum.
Actually this is a good example for the point I was trying to make regarding fees.
Given that you have to iterate over all previous investors, the execution time (number of instructions) of the contract is unbounded, therefore, what prevents the fee required to activate the contract from going up to infinity?
Comments
if tx.value < 100 * block.basefee:
stop
It came out in ES as:
TXVALUE PUSH 100 BASEFEE MUL LT NOT PUSH 10 JMPI STOP
I see what you mean by dont bother learning ES, it's a little hard to follow:)
I tried compiling the Namecoin-like registration example from the whitepaper and I get a compilation error.
Here is the code I am attempting to compile to ES:
if tx.value < block.basefee * 200:
stop
if contract.storage[tx.data[0]] or tx.data[0] < 100:
stop
contract.storage[tx.data[0]] = tx.data[1]
Anyone know why this errors out?
-CJ
The ES output is:
TXVALUE BASEFEE PUSH 200 MUL LT NOT PUSH 10 JMPI STOP PUSH 0 TXDATA SLOAD NOT PUSH 0 TXDATA PUSH 100 LT NOT MUL NOT NOT PUSH 28 JMPI STOP PUSH 1 TXDATA PUSH 0 TXDATA SSTORE
The E-CLL script is much easier to read.
Also, a learning challenge for you guys:
Implement http://ponzi.io/ as an Ethereum contract.
Given that you have to iterate over all previous investors, the execution time (number of instructions) of the contract is unbounded, therefore, what prevents the fee required to activate the contract from going up to infinity?