You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
Tests must return to avoid executing code that exists after them. This issue arises when a function is declared in the contract, leading to all tests failing as they execute function code, resulting in stack underflows.
This can be resolved by including a return statement at the end of every test.
Copy file name to clipboardExpand all lines: src/get-started/huff-by-example/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -521,6 +521,12 @@ Available decorators include:
521
521
*`calldata` - Set the calldata for the transaction environment. Accepts a single string of calldata bytes.
522
522
*`value` - Set the callvalue for the transaction environment. Accepts a single literal.
523
523
524
+
#### Testing with functions
525
+
526
+
Huff functions are appended at the end of the contract bytecode, which may conflict with the execution of the tests, as function code may be executed after them.
527
+
528
+
Always include a return statement at the end of each of your tests to ensure compatibility with functions.
0 commit comments