Skip to main content

Memory Variables

Memory Variable are session memory values that can be used for holding values that can be used during logic calls with the invoke and deploy commands. memory variables are lost after each session and can be manipulated with the following commands.

Session Memory Management

set [identifier] [value]Set the value of a memory variable with the identifier.

set addr1 0x0fafe52ec42a85db644d5cceba2bb89cf5b0166cc9158211f44ed1e60b06032c

addr1: "0x0fafe52ec42a85db644d5cceba2bb89cf5b0166cc9158211f44ed1e60b06032c"

get [identifier]Get the value of a memory variable with the identifier.

get addr1

addr1: "0x0fafe52ec42a85db644d5cceba2bb89cf5b0166cc9158211f44ed1e60b06032c”

wipe [identifier] Wipes addr1 variable value.

wipe addr1

addr1 var wiped!

Argument Values

Argument Value Rules are used when parsing the argument in logic function calls or when storing them to the environment session memory. Logic function calls can also use variables from the memory. Argument values can also contain references to memory variables by using the identifier as a value.

Supported types

  • Integers 100-934343329429352
  • Strings "Hello""Fahrenheit 451"
  • Booleans trueTrueTRUE, false, FalseFALSE
  • Bytes/Address 0xf6cd8ee6a29ec442dbbf9c6124dd3aeb833ef58052237d521654740857716b34
  • Lists - [256, 2345]["foo", "bar"]
  • Mappings - {"a": 123, "b": 345}{456: "foo", 123: "bar"} (uses value keys)
  • Object - {a: 123, b: 345}{name: "Darius", age: 45} (uses identifier keys)