Skip to main content

Memory Variables

Session memory variables hold values for use in logic calls. Variables are lost when the session ends.

Commands

CommandDescription
set <name> <value>Set variable
get <name>Get variable
wipe <name>Delete variable
>>> set addr1 0x0faf...032c
addr1: "0x0faf...032c"

>>> get addr1
addr1: "0x0faf...032c"

>>> wipe addr1
addr1 var wiped!

Using Variables

Variables can be used as arguments in logic calls:

set recipient 0xabcd...
invoke Token.Transfer(to: recipient, amount: 100)

Supported Types

TypeExample
Integers100, -934343
Strings"Hello", "Fahrenheit 451"
Booleanstrue, false
Bytes/Address0xf6cd...6b34
Lists[256, 2345], ["foo", "bar"]
Mappings{"a": 123, "b": 345} (value keys)
Objects{a: 123, b: 345}, {name: "Darius", age: 45} (identifier keys)