Skip to content

Commit

Permalink
explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
pmikolajczyk41 committed Nov 22, 2023
1 parent e5a2467 commit a684ddb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/runtime-interaction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ You can always switch from `Session` to `Sandbox` with:
let sandbox = session.sandbox(); // `sandbox` has type `&mut Sandbox<Runtime>`
```

`Sandbox` is just a runtime wrapper, which enables you to interact directly with the runtime.
On the other hand, `Session` is a wrapper around `Sandbox` which also provides a useful context for working with contracts.

A rule of thumb is: if you are working with contracts, use `Session`, otherwise use `Sandbox`.

0 comments on commit a684ddb

Please sign in to comment.