Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adding simulate transaction with traces of debug mode #48

Merged
merged 23 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
365f772
fix: removing simulate transaction on 315 version
negar-abbasi Sep 7, 2023
2316a60
chore: updating project dependencies
negar-abbasi Sep 7, 2023
bcf9c3a
refactor: deleting unwanted modules and functions
negar-abbasi Sep 7, 2023
3be22dd
refactor: refactoring simulate readonly function
negar-abbasi Sep 7, 2023
98f57a2
fix: adding simulation on failed transactions and debug mode
negar-abbasi Sep 8, 2023
e9839df
fix: fixing the tests to use debug mode on default
negar-abbasi Sep 11, 2023
d0b1a2b
chore: removing unnecessary packages from dependency
negar-abbasi Sep 11, 2023
efe0402
chore: updating poetry lock file
negar-abbasi Sep 11, 2023
7789bec
chore: reformatting with black and fixing mypy errors
negar-abbasi Sep 11, 2023
f660de5
chore: updating poetry lock file
negar-abbasi Sep 11, 2023
59ca4a1
Revert "chore: updating poetry lock file"
negar-abbasi Sep 11, 2023
cae7f1f
chore: updating poetry lock file
negar-abbasi Sep 11, 2023
1a69ad9
refactor: removing redundant try except block
negar-abbasi Sep 11, 2023
304a75a
fix: using simulate response in failed transaction
negar-abbasi Sep 11, 2023
7be1379
chore: adding comments
negar-abbasi Sep 13, 2023
364fff4
chore: updating py-algorand-sdk to latest
negar-abbasi Sep 19, 2023
ca8f779
chore: adding simulate trace to error
negar-abbasi Sep 19, 2023
60113d4
fix: fixing simulate to work on debug mode and added tests
negar-abbasi Sep 20, 2023
8e610e0
docs: Adding document on debug mode and simulate
negar-abbasi Sep 20, 2023
6a8e4cf
chore: making config an actual mock; adding extra tests for non read …
aorumbayev Sep 21, 2023
f744af3
chore: fixing tests
aorumbayev Sep 21, 2023
98fcd89
Merge branch 'main' into simulate-transaction
aorumbayev Sep 22, 2023
ea72c6b
chore: lockfile conflicts
aorumbayev Sep 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/source/capabilities/app-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ When an error is thrown then the resulting error that is re-thrown will be a `Lo
* `transaction_id`: Transaction ID of failing transaction
* `message`: The error message
* `line_no`: The line number in the TEAL program that
* `traces`: A list of Trace objects providing additional insights on simulation when debug mode is active.

The function `trace()` will provide a formatted output of the surrounding TEAL where the error occurred.

Expand All @@ -147,3 +148,10 @@ The extended information will only show if the Application Client has a source m
3.) `approval_source_map` on `ApplicationClient` has been set from a previously compiled approval program OR
4.) A source map has been exported/imported using `export_source_map`/`import_source_map`"""
```

### Debug Mode and traces Field
When debug mode is active, the LogicError will contain a field named traces. This field will include raw simulate execution traces, providing a detailed account of the transaction simulation. These traces are crucial for diagnosing complex issues and are automatically included in all application client calls when debug mode is active.

```{note}
Remember to enable debug mode (`config.debug = True`) to include raw simulate execution traces in the `LogicError`.
```
28 changes: 4 additions & 24 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 0 additions & 73 deletions src/algokit_utils/_simulate_315_compat.py

This file was deleted.

Loading