Skip to main content

Interaction

Basic Commands

CommandDescription
deploy <logic>.<endpoint>(args)Run deploy endpoint (one-time, initializes logic)
enlist <logic>.<endpoint>(args)Run enlist endpoint (one-time per actor)
invoke <logic>.<endpoint>(args)Run regular endpoint
create <logic>(args)Create an asset on an asset logic
>>> deploy estore2.Init2()
Execution Complete! [133 FUEL] [0xebe7...ae5b]

>>> enlist estore2.EnL(name: "akash", supply: 999)
Execution Complete! [337 FUEL] [0xa445...c3ff]

>>> invoke estore2.GetName()
Execution Complete! [301 FUEL] [0x527a...247c]
Execution Outputs ||| name:akash
note

Deploy must run before enlist. After enlist, only invoke calls are allowed.

Invoke as Different Sender

Use as to invoke as a different user:

register robert
invoke F.Flip() as robert

Controlling Participants

By default, all registered users are participants with write access. Use with to restrict:

# Restrict robert to read-only
invoke F.Flip() as robert with robert/read
# → error: unable to store bool: slot is read-only

Access levels: write, read, none

# Only include specific participants
invoke Logic.Transfer() with alice/write, bob/read

If with is not specified, all registered users are participants.