algorand-python-testing 0.3.0b7__tar.gz → 0.3.0b9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/CHANGELOG.md +8 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/PKG-INFO +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/arc4-types.md +0 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/avm-types.md +0 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/opcodes.md +23 -28
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/signature-testing.md +0 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/state-management.md +0 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/transactions.md +2 -2
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/pyproject.toml +9 -10
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/__init__.py +7 -7
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/arc4.py +14 -31
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/context.py +2 -2
- algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers/__init__.py +13 -0
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers → algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers}/context_storage.py +6 -6
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers → algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers}/ledger_context.py +21 -21
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers → algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers}/txn_context.py +37 -27
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/decorators/arc4.py +45 -41
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/gtxn.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/itxn.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/account.py +2 -2
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/application.py +9 -17
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/asset.py +12 -31
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/contract.py +22 -23
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/template_variable.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/txn_fields.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/block.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/crypto.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/global_values.py +3 -5
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/itxn.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/misc.py +8 -10
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/txn.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/box.py +2 -2
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/global_state.py +2 -2
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/local_state.py +2 -2
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/utils.py +2 -3
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utilities/log.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utils.py +22 -0
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/avm.py +8 -8
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/txn.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/__init__.py +1 -1
- algorand_python_testing-0.3.0b9/src/algopy_testing/__init__.py +25 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_asset.py +1 -3
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_box.py +18 -18
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_box_map.py +4 -5
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_box_ref.py +4 -5
- algorand_python_testing-0.3.0b9/tests/models/test_contract.py +108 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/test_global_state.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/test_local_state.py +1 -1
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/test_context.py +9 -9
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/test_op.py +40 -45
- algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers/__init__.py +0 -13
- algorand_python_testing-0.3.0b7/src/algopy_testing/__init__.py +0 -25
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.coveragerc +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.editorconfig +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/pull_request_template.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/workflows/cd.yaml +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/workflows/ci.yaml +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/workflows/gh-pages.yaml +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.gitignore +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.pre-commit-config.yaml +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.vscode/extensions.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.vscode/launch.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.vscode/settings.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/CONTRIBUTING.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/LICENSE +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/README.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/Makefile +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/_static/custom.css +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/algopy.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/api.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/conf.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/coverage.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/examples.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/glossary.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/index.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/make.bat +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/concepts.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/contract-testing.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/index.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/subroutines.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/README.md +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/auction/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/auction/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/auction/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/htlc_logicsig/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/htlc_logicsig/signature.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/htlc_logicsig/test_signature.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/marketplace/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/marketplace/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/marketplace/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/proof_of_attendance/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/proof_of_attendance/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/proof_of_attendance/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/scratch_storage/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/scratch_storage/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/scratch_storage/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/simple_voting/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/simple_voting/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/simple_voting/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/zk_whitelist/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/zk_whitelist/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/zk_whitelist/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/check_stubs_cov.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/refresh_test_artifacts.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/validate_examples.py +0 -0
- /algorand_python_testing-0.3.0b7/src/_algopy_testing/_compiled.py → /algorand_python_testing-0.3.0b9/src/_algopy_testing/compiled.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/constants.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/decorators/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/decorators/subroutine.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/enums.py +0 -0
- /algorand_python_testing-0.3.0b7/src/_algopy_testing/_itxn_loader.py → /algorand_python_testing-0.3.0b9/src/_algopy_testing/itxn_loader.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/logicsig.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/unsigned_builtins.py +0 -0
- /algorand_python_testing-0.3.0b7/src/_algopy_testing/_mutable.py → /algorand_python_testing-0.3.0b9/src/_algopy_testing/mutable.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/constants.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/pure.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/biguint.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/bytes.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/string.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/uint64.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/protocols.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utilities/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utilities/budget.py +0 -0
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/arc4.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/arc4.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/gtxn.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/itxn.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/op.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/py.typed +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/templates/.macros.j2 +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/templates/.release_notes.md.j2 +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/templates/CHANGELOG.md.j2 +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/conftest.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_abi_call.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_address.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_arc4_method_signature.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_bool.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_dynamic_array.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_dynamic_bytes.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_emit.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_static_array.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_string.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_struct.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_tuple.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_ufixednxm.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_uintn.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/data/BoxContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/data/BoxContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/data/BoxContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/data/CryptoOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/data/CryptoOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/data/CryptoOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/data/Contract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/data/Contract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/data/Contract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/statemutations.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/GlobalStateContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/ITxnOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/ITxnOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/ITxnOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGet.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGet.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGet.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalExContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalExContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalExContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalExContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalExContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalExContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppParamsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppParamsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppParamsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetHoldingContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetHoldingContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetHoldingContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetParamsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetParamsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetParamsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/common.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/conftest.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/contexts/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_uenumerate.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_urange.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/conftest.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_biguint.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_bytes.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_string.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_uint64.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/conftest.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/test_mutations.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/test_miscellaneous_op.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/util.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/utilities/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/utilities/conftest.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/utilities/test_log.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/value_generators/__init__.py +0 -0
- {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/value_generators/test_avm.py +0 -0
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
|
+
## v0.3.0-beta.9 (2024-08-22)
|
|
3
|
+
|
|
4
|
+
## v0.3.0-beta.8 (2024-08-22)
|
|
5
|
+
|
|
6
|
+
### Feature
|
|
7
|
+
|
|
8
|
+
* include ARC4 results in log, and handle > 15 ARC4 arguments (#18) ([`fd83ee8`](https://github.com/algorandfoundation/algorand-python-testing/commit/fd83ee8525a393d4a1a66f20acdb661906d84b51))
|
|
9
|
+
|
|
2
10
|
## v0.3.0-beta.7 (2024-08-21)
|
|
3
11
|
|
|
4
12
|
## v0.3.0-beta.6 (2024-08-21)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: algorand-python-testing
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.0b9
|
|
4
4
|
Summary: Algorand Python testing library
|
|
5
5
|
Project-URL: Documentation, https://github.com/algorandfoundation/puya/tree/main/algopy_testing#README.md
|
|
6
6
|
Project-URL: Issues, https://github.com/algorandfoundation/puya/issues
|
{algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/opcodes.md
RENAMED
|
@@ -6,7 +6,6 @@ The [coverage](coverage.md) file provides a comprehensive list of all opcodes an
|
|
|
6
6
|
|
|
7
7
|
```{testsetup}
|
|
8
8
|
import algopy
|
|
9
|
-
import algopy_testing
|
|
10
9
|
from algopy_testing import algopy_testing_context
|
|
11
10
|
|
|
12
11
|
# Create the context manager for snippets below
|
|
@@ -29,7 +28,7 @@ The following opcodes are demonstrated:
|
|
|
29
28
|
- `op.ecdsa_verify`
|
|
30
29
|
|
|
31
30
|
```{testcode}
|
|
32
|
-
|
|
31
|
+
from algopy import op
|
|
33
32
|
|
|
34
33
|
# SHA256 hash
|
|
35
34
|
data = algopy.Bytes(b"Hello, World!")
|
|
@@ -59,7 +58,7 @@ The following opcodes are demonstrated:
|
|
|
59
58
|
- `op.setbit_uint64`
|
|
60
59
|
|
|
61
60
|
```{testcode}
|
|
62
|
-
|
|
61
|
+
from algopy import op
|
|
63
62
|
|
|
64
63
|
# Addition with carry
|
|
65
64
|
result, carry = op.addw(algopy.UInt64(2**63), algopy.UInt64(2**63))
|
|
@@ -80,7 +79,7 @@ These types necessitate interaction with the transaction context:
|
|
|
80
79
|
### algopy.op.Global
|
|
81
80
|
|
|
82
81
|
```{testcode}
|
|
83
|
-
|
|
82
|
+
from algopy import op
|
|
84
83
|
|
|
85
84
|
class MyContract(algopy.ARC4Contract):
|
|
86
85
|
@algopy.arc4.abimethod
|
|
@@ -102,12 +101,12 @@ assert result == algopy.UInt64(101000)
|
|
|
102
101
|
### algopy.op.Txn
|
|
103
102
|
|
|
104
103
|
```{testcode}
|
|
105
|
-
|
|
104
|
+
from algopy import op
|
|
106
105
|
|
|
107
106
|
class MyContract(algopy.ARC4Contract):
|
|
108
107
|
@algopy.arc4.abimethod
|
|
109
|
-
def check_txn_fields(self) -> algopy.
|
|
110
|
-
return op.Txn.sender
|
|
108
|
+
def check_txn_fields(self) -> algopy.arc4.Address:
|
|
109
|
+
return algopy.arc4.Address(op.Txn.sender)
|
|
111
110
|
|
|
112
111
|
... # setup context (below assumes available under 'ctx' variable)
|
|
113
112
|
|
|
@@ -121,7 +120,7 @@ assert result == custom_sender
|
|
|
121
120
|
### algopy.op.AssetHoldingGet
|
|
122
121
|
|
|
123
122
|
```{testcode}
|
|
124
|
-
|
|
123
|
+
from algopy import op
|
|
125
124
|
|
|
126
125
|
class AssetContract(algopy.ARC4Contract):
|
|
127
126
|
@algopy.arc4.abimethod
|
|
@@ -141,7 +140,7 @@ assert result == algopy.UInt64(5000)
|
|
|
141
140
|
### algopy.op.AppGlobal
|
|
142
141
|
|
|
143
142
|
```{testcode}
|
|
144
|
-
|
|
143
|
+
from algopy import op
|
|
145
144
|
|
|
146
145
|
class StateContract(algopy.ARC4Contract):
|
|
147
146
|
@algopy.arc4.abimethod
|
|
@@ -162,7 +161,7 @@ assert stored_value == 42
|
|
|
162
161
|
### algopy.op.Block
|
|
163
162
|
|
|
164
163
|
```{testcode}
|
|
165
|
-
|
|
164
|
+
from algopy import op
|
|
166
165
|
|
|
167
166
|
class BlockInfoContract(algopy.ARC4Contract):
|
|
168
167
|
@algopy.arc4.abimethod
|
|
@@ -180,7 +179,7 @@ assert seed == algopy.op.itob(123456)
|
|
|
180
179
|
### algopy.op.AcctParamsGet
|
|
181
180
|
|
|
182
181
|
```{testcode}
|
|
183
|
-
|
|
182
|
+
from algopy import op
|
|
184
183
|
|
|
185
184
|
class AccountParamsContract(algopy.ARC4Contract):
|
|
186
185
|
@algopy.arc4.abimethod
|
|
@@ -205,7 +204,7 @@ class AppParamsContract(algopy.ARC4Contract):
|
|
|
205
204
|
def get_app_creator(self, app_id: algopy.Application) -> algopy.arc4.Address:
|
|
206
205
|
creator, exists = algopy.op.AppParamsGet.app_creator(app_id)
|
|
207
206
|
assert exists
|
|
208
|
-
return creator
|
|
207
|
+
return algopy.arc4.Address(creator)
|
|
209
208
|
|
|
210
209
|
... # setup context (below assumes available under 'ctx' variable)
|
|
211
210
|
|
|
@@ -218,8 +217,7 @@ assert creator == context.default_sender
|
|
|
218
217
|
### algopy.op.AssetParamsGet
|
|
219
218
|
|
|
220
219
|
```{testcode}
|
|
221
|
-
from
|
|
222
|
-
import algopy.op as op
|
|
220
|
+
from algopy import op
|
|
223
221
|
|
|
224
222
|
class AssetParamsContract(algopy.ARC4Contract):
|
|
225
223
|
@algopy.arc4.abimethod
|
|
@@ -239,8 +237,7 @@ assert total == algopy.UInt64(1000000)
|
|
|
239
237
|
### algopy.op.Box
|
|
240
238
|
|
|
241
239
|
```{testcode}
|
|
242
|
-
from
|
|
243
|
-
import algopy.op as op
|
|
240
|
+
from algopy import op
|
|
244
241
|
|
|
245
242
|
class BoxStorageContract(algopy.ARC4Contract):
|
|
246
243
|
@algopy.arc4.abimethod
|
|
@@ -329,23 +326,22 @@ assert result == 11
|
|
|
329
326
|
```{testcode}
|
|
330
327
|
from unittest.mock import patch, MagicMock
|
|
331
328
|
import algopy
|
|
332
|
-
from algopy_testing.primitives import Bytes
|
|
333
329
|
|
|
334
330
|
def test_mock_vrf_verify():
|
|
335
|
-
mock_result = (Bytes(b'mock_output'), True)
|
|
331
|
+
mock_result = (algopy.Bytes(b'mock_output'), True)
|
|
336
332
|
with patch('algopy.op.vrf_verify', return_value=mock_result) as mock_vrf_verify:
|
|
337
333
|
result = algopy.op.vrf_verify(
|
|
338
334
|
algopy.op.VrfVerify.VrfAlgorand,
|
|
339
|
-
Bytes(b'proof'),
|
|
340
|
-
Bytes(b'message'),
|
|
341
|
-
Bytes(b'public_key')
|
|
335
|
+
algopy.Bytes(b'proof'),
|
|
336
|
+
algopy.Bytes(b'message'),
|
|
337
|
+
algopy.Bytes(b'public_key')
|
|
342
338
|
)
|
|
343
339
|
assert result == mock_result
|
|
344
340
|
mock_vrf_verify.assert_called_once_with(
|
|
345
341
|
algopy.op.VrfVerify.VrfAlgorand,
|
|
346
|
-
Bytes(b'proof'),
|
|
347
|
-
Bytes(b'message'),
|
|
348
|
-
Bytes(b'public_key')
|
|
342
|
+
algopy.Bytes(b'proof'),
|
|
343
|
+
algopy.Bytes(b'message'),
|
|
344
|
+
algopy.Bytes(b'public_key')
|
|
349
345
|
)
|
|
350
346
|
|
|
351
347
|
test_mock_vrf_verify()
|
|
@@ -356,19 +352,18 @@ test_mock_vrf_verify()
|
|
|
356
352
|
```{testcode}
|
|
357
353
|
from unittest.mock import patch, MagicMock
|
|
358
354
|
import algopy
|
|
359
|
-
from algopy_testing.primitives import Bytes
|
|
360
355
|
|
|
361
356
|
def test_mock_elliptic_curve_decompress():
|
|
362
|
-
mock_result = (Bytes(b'x_coord'), Bytes(b'y_coord'))
|
|
357
|
+
mock_result = (algopy.Bytes(b'x_coord'), algopy.Bytes(b'y_coord'))
|
|
363
358
|
with patch('algopy.op.EllipticCurve.decompress', return_value=mock_result) as mock_decompress:
|
|
364
359
|
result = algopy.op.EllipticCurve.decompress(
|
|
365
360
|
algopy.op.EC.BN254g1,
|
|
366
|
-
Bytes(b'compressed_point')
|
|
361
|
+
algopy.Bytes(b'compressed_point')
|
|
367
362
|
)
|
|
368
363
|
assert result == mock_result
|
|
369
364
|
mock_decompress.assert_called_once_with(
|
|
370
365
|
algopy.op.EC.BN254g1,
|
|
371
|
-
Bytes(b'compressed_point')
|
|
366
|
+
algopy.Bytes(b'compressed_point')
|
|
372
367
|
)
|
|
373
368
|
|
|
374
369
|
test_mock_elliptic_curve_decompress()
|
|
@@ -115,8 +115,8 @@ from algopy_testing import AlgopyTestContext, algopy_testing_context
|
|
|
115
115
|
|
|
116
116
|
class SimpleContract(algopy.ARC4Contract):
|
|
117
117
|
@algopy.arc4.abimethod
|
|
118
|
-
def check_sender(self) -> algopy.
|
|
119
|
-
return algopy.Txn.sender
|
|
118
|
+
def check_sender(self) -> algopy.arc4.Address:
|
|
119
|
+
return algopy.arc4.Address(algopy.Txn.sender)
|
|
120
120
|
...
|
|
121
121
|
|
|
122
122
|
# Create a contract instance
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "algorand-python-testing"
|
|
7
|
-
version = "0.3.0-beta.
|
|
7
|
+
version = "0.3.0-beta.9"
|
|
8
8
|
description = 'Algorand Python testing library'
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
@@ -41,7 +41,7 @@ Source = "https://github.com/algorandfoundation/puya/tree/main/algopy_testing"
|
|
|
41
41
|
allow-direct-references = true
|
|
42
42
|
|
|
43
43
|
[tool.hatch.build.targets.wheel]
|
|
44
|
-
packages = ["src/algopy", 'src/algopy_testing']
|
|
44
|
+
packages = ["src/algopy", 'src/algopy_testing', 'src/_algopy_testing']
|
|
45
45
|
|
|
46
46
|
[[tool.hatch.envs.all.matrix]]
|
|
47
47
|
python = ["3.12"]
|
|
@@ -126,7 +126,6 @@ clean_dist = "rm -rf dist"
|
|
|
126
126
|
|
|
127
127
|
# docs environment
|
|
128
128
|
[tool.hatch.envs.docs]
|
|
129
|
-
detached = true
|
|
130
129
|
path = ".venv.docs"
|
|
131
130
|
type = "virtual"
|
|
132
131
|
python = "3.12"
|
|
@@ -141,13 +140,13 @@ dependencies = [
|
|
|
141
140
|
"ipykernel",
|
|
142
141
|
"pytest",
|
|
143
142
|
"py-algorand-sdk",
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
143
|
+
]
|
|
144
|
+
# environment has algopy_testing included as an editable dependency
|
|
145
|
+
# however it also includes the package dependencies
|
|
146
|
+
# the stubs can't be in the same as the project when it is editable
|
|
147
|
+
# so explicitly remove them
|
|
148
|
+
post-install-commands = [
|
|
149
|
+
"hatch run docs:pip uninstall -y algorand-python",
|
|
151
150
|
]
|
|
152
151
|
|
|
153
152
|
[tool.hatch.envs.docs.scripts]
|
{algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/__init__.py
RENAMED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
from _algopy_testing import arc4, gtxn, itxn
|
|
2
|
-
from _algopy_testing._context_helpers.context_storage import algopy_testing_context
|
|
3
|
-
from _algopy_testing._context_helpers.ledger_context import LedgerContext
|
|
4
|
-
from _algopy_testing._context_helpers.txn_context import TransactionContext
|
|
5
|
-
from _algopy_testing._itxn_loader import ITxnGroupLoader, ITxnLoader
|
|
6
|
-
from _algopy_testing._value_generators.arc4 import ARC4ValueGenerator
|
|
7
|
-
from _algopy_testing._value_generators.avm import AVMValueGenerator
|
|
8
|
-
from _algopy_testing._value_generators.txn import TxnValueGenerator
|
|
9
2
|
from _algopy_testing.context import AlgopyTestContext
|
|
3
|
+
from _algopy_testing.context_helpers.context_storage import algopy_testing_context
|
|
4
|
+
from _algopy_testing.context_helpers.ledger_context import LedgerContext
|
|
5
|
+
from _algopy_testing.context_helpers.txn_context import TransactionContext
|
|
10
6
|
from _algopy_testing.decorators.subroutine import subroutine
|
|
11
7
|
from _algopy_testing.enums import OnCompleteAction, TransactionType
|
|
8
|
+
from _algopy_testing.itxn_loader import ITxnGroupLoader, ITxnLoader
|
|
12
9
|
from _algopy_testing.models import (
|
|
13
10
|
Account,
|
|
14
11
|
Application,
|
|
@@ -24,6 +21,9 @@ from _algopy_testing.models import (
|
|
|
24
21
|
)
|
|
25
22
|
from _algopy_testing.primitives import BigUInt, Bytes, String, UInt64
|
|
26
23
|
from _algopy_testing.state import Box, BoxMap, BoxRef, GlobalState, LocalState
|
|
24
|
+
from _algopy_testing.value_generators.arc4 import ARC4ValueGenerator
|
|
25
|
+
from _algopy_testing.value_generators.avm import AVMValueGenerator
|
|
26
|
+
from _algopy_testing.value_generators.txn import TxnValueGenerator
|
|
27
27
|
|
|
28
28
|
# TODO: clean up and ensure only algopy_testing namespace specific user facing abstractions
|
|
29
29
|
# are exposed Only keep the _value_generators, ledger_context, txn_context,
|
{algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/arc4.py
RENAMED
|
@@ -8,11 +8,6 @@ import typing
|
|
|
8
8
|
import algosdk
|
|
9
9
|
from Cryptodome.Hash import SHA512
|
|
10
10
|
|
|
11
|
-
from _algopy_testing._mutable import (
|
|
12
|
-
MutableBytes,
|
|
13
|
-
add_mutable_callback,
|
|
14
|
-
set_item_on_mutate,
|
|
15
|
-
)
|
|
16
11
|
from _algopy_testing.constants import (
|
|
17
12
|
ARC4_RETURN_PREFIX,
|
|
18
13
|
BITS_IN_BYTE,
|
|
@@ -21,6 +16,11 @@ from _algopy_testing.constants import (
|
|
|
21
16
|
UINT512_SIZE,
|
|
22
17
|
)
|
|
23
18
|
from _algopy_testing.models.account import Account
|
|
19
|
+
from _algopy_testing.mutable import (
|
|
20
|
+
MutableBytes,
|
|
21
|
+
add_mutable_callback,
|
|
22
|
+
set_item_on_mutate,
|
|
23
|
+
)
|
|
24
24
|
from _algopy_testing.primitives import Bytes
|
|
25
25
|
from _algopy_testing.protocols import BytesBacked
|
|
26
26
|
from _algopy_testing.utils import (
|
|
@@ -62,6 +62,8 @@ __all__ = [
|
|
|
62
62
|
"UInt8",
|
|
63
63
|
"UIntN",
|
|
64
64
|
"abi_call",
|
|
65
|
+
"arc4_create",
|
|
66
|
+
"arc4_update",
|
|
65
67
|
"arc4_signature",
|
|
66
68
|
"emit",
|
|
67
69
|
]
|
|
@@ -216,7 +218,7 @@ class String(_ABIEncoded):
|
|
|
216
218
|
f"value must be a string or String type, not {type(value).__name__!r}"
|
|
217
219
|
)
|
|
218
220
|
|
|
219
|
-
self._value = len(bytes_value)
|
|
221
|
+
self._value = as_bytes(_encode_length(len(bytes_value)) + bytes_value)
|
|
220
222
|
|
|
221
223
|
@property
|
|
222
224
|
def native(self) -> algopy.String:
|
|
@@ -533,25 +535,12 @@ class Byte(UIntN[typing.Literal[8]]):
|
|
|
533
535
|
|
|
534
536
|
|
|
535
537
|
UInt8: typing.TypeAlias = UIntN[typing.Literal[8]]
|
|
536
|
-
"""An ARC4 UInt8."""
|
|
537
|
-
|
|
538
538
|
UInt16: typing.TypeAlias = UIntN[typing.Literal[16]]
|
|
539
|
-
"""An ARC4 UInt16."""
|
|
540
|
-
|
|
541
539
|
UInt32: typing.TypeAlias = UIntN[typing.Literal[32]]
|
|
542
|
-
"""An ARC4 UInt32."""
|
|
543
|
-
|
|
544
540
|
UInt64: typing.TypeAlias = UIntN[typing.Literal[64]]
|
|
545
|
-
"""An ARC4 UInt64."""
|
|
546
|
-
|
|
547
541
|
UInt128: typing.TypeAlias = BigUIntN[typing.Literal[128]]
|
|
548
|
-
"""An ARC4 UInt128."""
|
|
549
|
-
|
|
550
542
|
UInt256: typing.TypeAlias = BigUIntN[typing.Literal[256]]
|
|
551
|
-
"""An ARC4 UInt256."""
|
|
552
|
-
|
|
553
543
|
UInt512: typing.TypeAlias = BigUIntN[typing.Literal[512]]
|
|
554
|
-
"""An ARC4 UInt512."""
|
|
555
544
|
|
|
556
545
|
|
|
557
546
|
class _BoolTypeInfo(_TypeInfo):
|
|
@@ -665,6 +654,8 @@ class StaticArray(
|
|
|
665
654
|
super().__init__()
|
|
666
655
|
items = _check_is_arc4(_items)
|
|
667
656
|
for item in items:
|
|
657
|
+
if len(items) != self._type_info.size:
|
|
658
|
+
raise TypeError(f"expected {self._type_info.size} items, not {len(items)}")
|
|
668
659
|
if self._type_info.item_type != item._type_info:
|
|
669
660
|
raise TypeError(
|
|
670
661
|
f"item must be of type {self._type_info.item_type!r}, not {item._type_info!r}"
|
|
@@ -735,10 +726,10 @@ class Address(StaticArray[Byte, typing.Literal[32]]):
|
|
|
735
726
|
bytes_value = algosdk.encoding.decode_address(value)
|
|
736
727
|
except Exception as e:
|
|
737
728
|
raise ValueError(f"cannot encode the following address: {value!r}") from e
|
|
729
|
+
elif isinstance(value, Account):
|
|
730
|
+
bytes_value = value.bytes.value
|
|
738
731
|
else:
|
|
739
|
-
bytes_value = (
|
|
740
|
-
value.bytes.value if isinstance(value, Account) else as_bytes(value, max_size=32)
|
|
741
|
-
)
|
|
732
|
+
bytes_value = as_bytes(value)
|
|
742
733
|
if len(bytes_value) != 32:
|
|
743
734
|
raise ValueError(f"expected 32 bytes, got: {len(bytes_value)}")
|
|
744
735
|
self._value = bytes_value
|
|
@@ -1124,14 +1115,6 @@ class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta): # type: ignore[
|
|
|
1124
1115
|
tuple_value = tuple_type.from_bytes(value)
|
|
1125
1116
|
return cls(*tuple_value.native)
|
|
1126
1117
|
|
|
1127
|
-
@classmethod
|
|
1128
|
-
def from_log(cls, log: algopy.Bytes, /) -> typing.Self:
|
|
1129
|
-
"""Load an ABI type from application logs, checking for the ABI return prefix
|
|
1130
|
-
`0x151f7c75`"""
|
|
1131
|
-
if log[:4] == ARC4_RETURN_PREFIX:
|
|
1132
|
-
return cls.from_bytes(log[4:])
|
|
1133
|
-
raise ValueError("ABI return prefix not found")
|
|
1134
|
-
|
|
1135
1118
|
@property
|
|
1136
1119
|
def bytes(self) -> algopy.Bytes:
|
|
1137
1120
|
"""Get the underlying bytes[]"""
|
|
@@ -1212,7 +1195,7 @@ def native_value_to_arc4(value: object) -> _ABIEncoded: # noqa: PLR0911
|
|
|
1212
1195
|
if isinstance(value, algopy.String):
|
|
1213
1196
|
return String(value)
|
|
1214
1197
|
if isinstance(value, tuple):
|
|
1215
|
-
return Tuple(value)
|
|
1198
|
+
return Tuple(tuple(map(native_value_to_arc4, value)))
|
|
1216
1199
|
raise TypeError(f"Unsupported type: {type(value).__name__}")
|
|
1217
1200
|
|
|
1218
1201
|
|
{algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/context.py
RENAMED
|
@@ -4,8 +4,8 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import algosdk
|
|
6
6
|
|
|
7
|
-
from _algopy_testing.
|
|
8
|
-
from _algopy_testing.
|
|
7
|
+
from _algopy_testing.context_helpers import LedgerContext, TransactionContext
|
|
8
|
+
from _algopy_testing.value_generators import AlgopyValueGenerator
|
|
9
9
|
|
|
10
10
|
if typing.TYPE_CHECKING:
|
|
11
11
|
from collections.abc import Sequence
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from _algopy_testing.context_helpers.context_storage import (
|
|
2
|
+
algopy_testing_context,
|
|
3
|
+
lazy_context,
|
|
4
|
+
)
|
|
5
|
+
from _algopy_testing.context_helpers.ledger_context import LedgerContext
|
|
6
|
+
from _algopy_testing.context_helpers.txn_context import TransactionContext
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"LedgerContext",
|
|
10
|
+
"TransactionContext",
|
|
11
|
+
"algopy_testing_context",
|
|
12
|
+
"lazy_context",
|
|
13
|
+
]
|
|
@@ -9,13 +9,13 @@ if typing.TYPE_CHECKING:
|
|
|
9
9
|
|
|
10
10
|
import algopy
|
|
11
11
|
|
|
12
|
-
from _algopy_testing._context_helpers.ledger_context import LedgerContext
|
|
13
|
-
from _algopy_testing._context_helpers.txn_context import TransactionContext, TransactionGroup
|
|
14
|
-
from _algopy_testing._value_generators import AlgopyValueGenerator
|
|
15
12
|
from _algopy_testing.context import AlgopyTestContext
|
|
13
|
+
from _algopy_testing.context_helpers.ledger_context import LedgerContext
|
|
14
|
+
from _algopy_testing.context_helpers.txn_context import TransactionContext, TransactionGroup
|
|
16
15
|
from _algopy_testing.models.account import AccountContextData
|
|
17
16
|
from _algopy_testing.models.application import ApplicationContextData
|
|
18
17
|
from _algopy_testing.models.asset import AssetFields
|
|
18
|
+
from _algopy_testing.value_generators import AlgopyValueGenerator
|
|
19
19
|
|
|
20
20
|
_var: ContextVar[AlgopyTestContext] = ContextVar("_var")
|
|
21
21
|
|
|
@@ -47,7 +47,7 @@ class _InternalContext:
|
|
|
47
47
|
def any(self) -> AlgopyValueGenerator:
|
|
48
48
|
return self.value.any
|
|
49
49
|
|
|
50
|
-
def
|
|
50
|
+
def get_active_txn_overrides(self) -> dict[str, typing.Any]:
|
|
51
51
|
active_group = self.txn._active_group
|
|
52
52
|
if active_group is None:
|
|
53
53
|
return {}
|
|
@@ -78,13 +78,13 @@ class _InternalContext:
|
|
|
78
78
|
|
|
79
79
|
def get_asset_data(self, asset_id: int | algopy.UInt64) -> AssetFields:
|
|
80
80
|
try:
|
|
81
|
-
return self.ledger.
|
|
81
|
+
return self.ledger._asset_data[int(asset_id)]
|
|
82
82
|
except KeyError:
|
|
83
83
|
raise ValueError("Unknown asset, check correct testing context is active") from None
|
|
84
84
|
|
|
85
85
|
def get_account_data(self, account_public_key: str) -> AccountContextData:
|
|
86
86
|
try:
|
|
87
|
-
return self.ledger.
|
|
87
|
+
return self.ledger._account_data[account_public_key]
|
|
88
88
|
except KeyError:
|
|
89
89
|
raise ValueError("Unknown account, check correct testing context is active") from None
|
|
90
90
|
|
|
@@ -23,25 +23,25 @@ class LedgerContext:
|
|
|
23
23
|
def __init__(self) -> None:
|
|
24
24
|
from _algopy_testing.models.account import AccountContextData, get_empty_account
|
|
25
25
|
|
|
26
|
-
self.
|
|
27
|
-
self.
|
|
28
|
-
self.
|
|
29
|
-
self.
|
|
30
|
-
self.
|
|
26
|
+
self._account_data = defaultdict[str, AccountContextData](get_empty_account)
|
|
27
|
+
self._app_data: dict[int, ApplicationContextData] = {}
|
|
28
|
+
self._asset_data: dict[int, AssetFields] = {}
|
|
29
|
+
self._blocks: dict[int, dict[str, int]] = {}
|
|
30
|
+
self._global_fields: GlobalFields = get_default_global_fields()
|
|
31
31
|
|
|
32
32
|
self._asset_id = iter(range(1001, 2**64))
|
|
33
33
|
self._app_id = iter(range(1001, 2**64))
|
|
34
34
|
|
|
35
|
-
def
|
|
35
|
+
def _get_next_asset_id(self) -> int:
|
|
36
36
|
while True:
|
|
37
37
|
asset_id = next(self._asset_id)
|
|
38
|
-
if asset_id not in self.
|
|
38
|
+
if asset_id not in self._asset_data:
|
|
39
39
|
return asset_id
|
|
40
40
|
|
|
41
|
-
def
|
|
41
|
+
def _get_next_app_id(self) -> int:
|
|
42
42
|
while True:
|
|
43
43
|
app_id = next(self._app_id)
|
|
44
|
-
if app_id not in self.
|
|
44
|
+
if app_id not in self._app_data:
|
|
45
45
|
return app_id
|
|
46
46
|
|
|
47
47
|
def get_account(self, address: str) -> algopy.Account:
|
|
@@ -68,7 +68,7 @@ class LedgerContext:
|
|
|
68
68
|
bool: True if the account exists, False otherwise.
|
|
69
69
|
"""
|
|
70
70
|
assert_address_is_valid(address)
|
|
71
|
-
return address in self.
|
|
71
|
+
return address in self._account_data
|
|
72
72
|
|
|
73
73
|
def update_account(
|
|
74
74
|
self,
|
|
@@ -84,11 +84,11 @@ class LedgerContext:
|
|
|
84
84
|
**account_fields: The fields to update.
|
|
85
85
|
"""
|
|
86
86
|
assert_address_is_valid(address)
|
|
87
|
-
self.
|
|
87
|
+
self._account_data[address].fields.update(account_fields)
|
|
88
88
|
|
|
89
89
|
if opted_asset_balances is not None:
|
|
90
90
|
for asset_id, balance in opted_asset_balances.items():
|
|
91
|
-
self.
|
|
91
|
+
self._account_data[address].opted_asset_balances[UInt64(asset_id)] = balance
|
|
92
92
|
|
|
93
93
|
def get_asset(self, asset_id: algopy.UInt64 | int) -> algopy.Asset:
|
|
94
94
|
"""Get an asset by ID.
|
|
@@ -105,7 +105,7 @@ class LedgerContext:
|
|
|
105
105
|
import algopy
|
|
106
106
|
|
|
107
107
|
asset_id = int(asset_id) if isinstance(asset_id, algopy.UInt64) else asset_id
|
|
108
|
-
if asset_id not in self.
|
|
108
|
+
if asset_id not in self._asset_data:
|
|
109
109
|
raise ValueError("Asset not found in testing context!")
|
|
110
110
|
|
|
111
111
|
return algopy.Asset(asset_id)
|
|
@@ -122,7 +122,7 @@ class LedgerContext:
|
|
|
122
122
|
import algopy
|
|
123
123
|
|
|
124
124
|
asset_id = int(asset_id) if isinstance(asset_id, algopy.UInt64) else asset_id
|
|
125
|
-
return asset_id in self.
|
|
125
|
+
return asset_id in self._asset_data
|
|
126
126
|
|
|
127
127
|
def update_asset(self, asset_id: int, **asset_fields: typing.Unpack[AssetFields]) -> None:
|
|
128
128
|
"""Update asset fields.
|
|
@@ -134,9 +134,9 @@ class LedgerContext:
|
|
|
134
134
|
Raises:
|
|
135
135
|
ValueError: If the asset is not found.
|
|
136
136
|
"""
|
|
137
|
-
if asset_id not in self.
|
|
137
|
+
if asset_id not in self._asset_data:
|
|
138
138
|
raise ValueError("Asset not found in testing context!")
|
|
139
|
-
self.
|
|
139
|
+
self._asset_data[asset_id].update(asset_fields)
|
|
140
140
|
|
|
141
141
|
def get_app(
|
|
142
142
|
self, app_id: algopy.Contract | algopy.Application | algopy.UInt64 | int
|
|
@@ -164,7 +164,7 @@ class LedgerContext:
|
|
|
164
164
|
bool: True if the application exists, False otherwise.
|
|
165
165
|
"""
|
|
166
166
|
app_id = _get_app_id(app_id)
|
|
167
|
-
return app_id in self.
|
|
167
|
+
return app_id in self._app_data
|
|
168
168
|
|
|
169
169
|
def update_app(
|
|
170
170
|
self, app_id: int, **application_fields: typing.Unpack[ApplicationFields]
|
|
@@ -343,7 +343,7 @@ class LedgerContext:
|
|
|
343
343
|
seed (algopy.UInt64 | int): The block seed.
|
|
344
344
|
timestamp (algopy.UInt64 | int): The block timestamp.
|
|
345
345
|
"""
|
|
346
|
-
self.
|
|
346
|
+
self._blocks[index] = {"seed": int(seed), "timestamp": int(timestamp)}
|
|
347
347
|
|
|
348
348
|
def get_block_content(self, index: int, key: str) -> int:
|
|
349
349
|
"""Get block content.
|
|
@@ -358,7 +358,7 @@ class LedgerContext:
|
|
|
358
358
|
Raises:
|
|
359
359
|
ValueError: If the block content is not found.
|
|
360
360
|
"""
|
|
361
|
-
content = self.
|
|
361
|
+
content = self._blocks.get(index, {}).get(key, None)
|
|
362
362
|
if content is None:
|
|
363
363
|
raise KeyError(
|
|
364
364
|
f"Block content for index {index} and key {key} not found in testing context!"
|
|
@@ -383,7 +383,7 @@ class LedgerContext:
|
|
|
383
383
|
f"Invalid field(s) found during patch for `Global`: {', '.join(invalid_keys)}"
|
|
384
384
|
)
|
|
385
385
|
|
|
386
|
-
self.
|
|
386
|
+
self._global_fields.update(global_fields)
|
|
387
387
|
|
|
388
388
|
def _get_app_data(
|
|
389
389
|
self, app: algopy.UInt64 | algopy.Application | algopy.Contract | int
|
|
@@ -401,7 +401,7 @@ class LedgerContext:
|
|
|
401
401
|
"""
|
|
402
402
|
app_id = _get_app_id(app)
|
|
403
403
|
try:
|
|
404
|
-
return self.
|
|
404
|
+
return self._app_data[app_id]
|
|
405
405
|
except KeyError:
|
|
406
406
|
raise ValueError("Unknown app id, is there an active transaction?") from None
|
|
407
407
|
|