Skip to content

Values & Variables

Use set to assign values and $name to reference them:

load token
set $recipient 0x4F2083f5fBede34C2714aFfb3105539775f7FE64
set $amount @token:amount(DAI 1000)
exec @token(DAI) "transfer(address,uint256)" $recipient $amount

The language supports these value types:

TypeExampleDescription
address0xAbCd...123420-byte Ethereum address
number42, 100e18, 1.5e6Integer or scientific notation
string"hello", 'it\'s fine'Quoted string (single or double); supports \', \", \\, \n, \r, \t, and \u{HHHH} escapes (any other \X is left literal); may span multiple lines
booltrue, falseBoolean
bytes0xdeadbeefHex-encoded bytes
bytes320x00...00132-byte value
array[1 2 3]Ordered collection — elements are space-separated, never commas

Numbers support scientific notation with e: 100e18 means 100 * 10^18. This is useful for token amounts with 18 decimals.

Use @num() for arithmetic and @bool() for boolean logic:

set $a 1
set $b 2
set $total @num($a + $b * 2)
set $x 5
set $y 50
set $isValid @bool($x > 0 and $y < 100)
  • Control Flow — use expressions to drive if and loop
  • Syntax — commands, helpers, and options