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. Refer to the Argument Values Section for value syntax rules
Session Memory Management
Set Memory Variable
Set the value of a memory variable with the identifier
- Syntax
>> set [identifier] [value]
- Example
>> set addr1 0x0fafe52ec42a85db644d5cceba2bb89cf5b0166cc9158211f44ed1e60b06032c
'addr1' has been set to 0x0fafe52ec42a85db644d5cceba2bb89cf5b0166cc9158211f44ed1e60b06032c
Get Memory Variable
Get the value of a memory variable with the identifier
- Syntax
>> get [identifier]
- Example
>> get addr1
'addr1' is set to 0x0fafe52ec42a85db644d5cceba2bb89cf5b0166cc9158211f44ed1e60b06032c
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
,-934343
,329429352
- Strings
"Hello"
,"Fahrenheit 451"
- Booleans
true
,True
,TRUE
,false
,False
,FALSE
- 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)