Syntax
EVML is the domain-specific language EVMcrispr scripts are written in. It is line-oriented: each line is a command, and expressions produce the values commands consume. This page covers the basic shapes; the rest of this section goes deeper into each part of the language.
Comments
Section titled “Comments”Lines starting with # are comments:
# This is a commentset $x 42 # Inline comments work tooCommands
Section titled “Commands”Commands are the primary building blocks. They produce transactions or control program flow. Each command starts with its name followed by arguments:
exec 0x44fA8E6f47987339850636F88629646662444217 "transfer(address,uint256)" @me 100e18set $greeting "hello"print "The value is" $greetingArguments are separated by spaces, not commas — this applies everywhere in EVML: command arguments, helper arguments, and array elements.
Commands from non-default modules use the module name as a prefix:
load aragonosaragonos:connect my-dao.aragonid.eth ( aragonos:grant CREATE_VOTES_ROLE on voting to @me)To drop the prefix, import the command on the load line (see
Modules & Imports).
Helpers
Section titled “Helpers”Helpers are expressions that produce values. They are prefixed with @:
set $sender @me # No argumentsset $dai @token(DAI) # Single argumentset $bal @get($dai "balanceOf(address)(uint256)" @me) # Multiple arguments, space-separatedHelper arguments are space-separated: @token:balance(DAI @me) is correct,
@token:balance(DAI, @me) is a parse error.
Helpers can be nested and used as arguments to commands:
load token
exec @token(DAI) "transfer(address,uint256)" @me @token:amount(DAI 100)Options
Section titled “Options”Some commands accept options with --name value:
exec 0x44fA8E6f47987339850636F88629646662444217 "foo()" --value 1e18exec 0x44fA8E6f47987339850636F88629646662444217 "foo()" --from 0x4F2083f5fBede34C2714aFfb3105539775f7FE64A command and all of its options must be written on a single line — EVML
has no \ line continuation.
Next Steps
Section titled “Next Steps”- Values & Variables — types,
set, and expressions - ABI Signatures — how function signatures are written
- Modules & Imports — loading modules and dropping prefixes