Elementrem Solidity Programming Language 0.4.2
Changes:
- Add payable to all functions that want to receive Element (including the constructor and the fallback function).
- Change _ to _; in modifiers.
- Functions that want to receive Element have to specify the new payable modifier (otherwise they throw).
- Contracts that want to receive Element with a plain "send" have to implement a fallback function with the payable modifier. Contracts now throw if no payable fallback function is defined and no function matches the signature.
- Failing contract creation through "new" throws.
- Division / modulus by zero throws.
- Function call throws if target contract does not have code
- Modifiers are required to contain _ (use if (false) _ as a workaround if needed).
- Modifiers: return does not skip part in modifier after _ .
- Placeholder statement _ in modifier now requires explicit ; .
- ecrecover now returns zero if the input is malformed (it previously returned garbage).
- The constant keyword cannot be used for constructors or the fallback function.
- Removed --interface (Solidity interface) output option
- JSON AST: General cleanup, renamed many nodes to match their C++ names.
- JSON output: srcmap-runtime renamed to srcmapRuntime .
- Moved (and reworked) standard library contracts from inside the compiler to github.com/elementrem/solidity/std ( import "std"; or import owned; do not work anymore).
- Confusing and undocumented keyword after was removed.
- New reserved words: abstract , hex , interface , payable , pure , static , view .
Features:
- Hexadecimal string literals: hex"ab1248fe"
- Internal: Inline assembly usable by the code generator.
- Commandline interface: Using - as filename allows reading from stdin.
- Interface JSON: Fallback function is now part of the ABI.
- Interface: Version string now semver compatible.
- Code generator: Do not provide "new account gas" if we know the called account exists.
Bugfixes:
- JSON AST: Nodes were added at wrong parent
- Why3 translator: Crash fix for exponentiation
- Commandline Interface: linking libraries with underscores in their name.
- Type Checker: Fallback function cannot return data anymore.
- Code Generator: Fix crash when sha3() was used on unsupported types.
- Code Generator: Manually set gas stipend for .send(0) .
- Code Generator: Fix library functions being called from payable functions.
- Type Checker: Fixed a crash about invalid array types.
You should make sure whether the solidity compiler is applied or not.
> ele.getCompilers()
["Solidity"]
If the solidity is not applied, You can apply it manually.
> admin.setSolc("./solc") //solc path
"solc, the solidity compiler commandline interface\nVersion: 0.4.2 develop.2016.10.2+commit.3ba4422c.Linux.g++\n\npath: ./solc"