Interaction
Basic Commands
| Command | Description |
|---|---|
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
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.
Specifying Fuel
Each deploy, invoke, and enlist accepts an optional trailing fuel <N> clause (after as/with) to override the session default for that call:
invoke F.Flip() fuel 100000
deploy F.Init() as alice with bob fuel 50000
If omitted, the call uses default.basefuel (see Default Fuel). A call that runs out of fuel reports meter exhausted.
Emitted Events
Events emitted during a deploy/invoke/enlist are printed inline beneath the result. They are shown even when the interaction fails (e.g. throw/revert or meter exhausted), so you can see what a failing transaction emitted before it aborted. Use get events afterward to re-query stored events with filters.