Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Move more advanced content from learn to under the hood (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjove authored Jul 29, 2022
1 parent 7d3baad commit 79c6a88
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions docs/learn/interacting-with-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ to begin.

## Interacting with contracts in tests

[Debugging contracts](debugging-contracts.mdx) explains that it is much more
convenient to debug using native code than WASM. Given that you are testing
native code, it is tempting to interact with your contract directly using
function calls. If you attempt this approach, you will find that it doesn't
always work. Function call interactions do not set the environment into the
correct state for contract execution, so functions involving contract data and
determining the current or invoking contract will not work.
[Debugging contracts](../under-the-hood/debugging-contracts.mdx) explains that
it is much more convenient to debug using native code than WASM. Given that you
are testing native code, it is tempting to interact with your contract directly
using function calls. If you attempt this approach, you will find that it
doesn't always work. Function call interactions do not set the environment into
the correct state for contract execution, so functions involving contract data
and determining the current or invoking contract will not work.

When writing tests, it is important to always interact with contracts through
contract invocation. In a production setting, contract invocation will execute
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/under-the-hood/interacting-with-contracts.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 4
title: Interacting with contracts
---

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 79c6a88

Please sign in to comment.