algorandfoundation / algokit-utils-py Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The existing docs needs to be updated to include AlgorandClient
and AlgokitComposer
. Using the AlgorandClient
should be the canonical way of doing most things when possible
This was reported by @cusma. The main reason is potential confusion that can be caused by the fact that user has ability to specify on complete in transaction parameters, yet its ignored in some scenarios like opt_in (where it overwrites the oncomplete to use OptInOC).
For instance:
app_client.opt_in( # this internally is actually going to ignore the on_compete from user and set it to OptInOC
transaction_parameters=OnCompleteCallParameters(
on_complete=OnComplete.DeleteApplicationOC
),
)
As seen above, the usage may be confusing, we either want to limit ability to use OnCompleteCallParameters (currently its a sub class of transaction params hence why it works) or account to prioritize taking the on_complete from transaction params if present.
Based on discussion with @daniel-makerx and proposed fix in #79, the OnCompleteCallParameters and CreateTransactionParameters are no longer subclassing from common TransactionParameters.
@neilcampbell noted down issues with the propagated fix as they had additional implications on the generator-py repo that were not caught as part of the 2.2.2 release. Originally, the fix was propagated under 2.2.2, we then reverted the changes under 2.3.0 given that a heap of upstream changes would require a more thorough release coordination on beaker, beaker and python template, algokit-cli repos that we didn't account for when tagging this as a minor fix. Hence, after re evaluating the initial issue report and higher priority items around puya at the moment we decided to revert the #79 changes, log it as a proper github issue on the repo and address with proper cross repo release coordination and smoke testing. This is also due to the fact that a proper semantic tag would require a breaking change in version (v3) and this would also imply additional release coordination.
@cusma will ping you as soon as the bug is resolved properly.
Version 3.22 of algod modified the error message when a LogicError occurs in a transaction, this change means the regex used to identify LogicErrors and extract the program count no longer works
Generate markdown api docs, similar to algokit-utils-ts
for consumption/ingestion into the dev portal.
We should also try create a standardised output across:
Template variables containing _
are not parsed correctly, raising DeploymentFailedError
in
def check_template_variables(approval_program: str, template_values: TemplateValueDict) -> None:
...
EXAMPLE
Template variable: TMPL_ASSET_ID
causes:
algokit_utils.deploy.DeploymentFailedError: The following template values were not provided: TMPL_ASSET
# Uncomment the following lines to enable auto generation of AVM Debugger compliant sourcemap and simulation trace file.
# Learn more about using AlgoKit AVM Debugger to debug your TEAL source codes and inspect various kinds of
# Algorand transactions in atomic groups -> https://github.com/algorandfoundation/algokit-avm-vscode-debugger
from algokit_utils.config import config
config.configure(debug=True, trace_all=True)
Can't seem to be able to generate sourcemaps and trace file from an algokit init project.
[tool.poetry.dependencies]
python = "^3.10"
beaker-pyteal = "^1.1.1"
algokit-utils = "^2.2.0"
python-dotenv = "^1.0.0"
The following program:
def program():
return pt.Seq(pt.Pop(pt.Bytes("//")), pt.Int(1))
Will generate
// GENERATED TEAL // PYTEAL PATH LINE PYTEAL
#pragma version 8 // commentary.py 30 Compilation(approval_program, mode=Mode.Application, version=8).compile(with_sourcemap=True, annotate_teal=True, annotate_teal_headers=True)
byte "//" // 21 pt.Bytes('//')
pop // pt.Pop(pt.Bytes('//'))
int 1 // pt.Int(1)
return // 30 Compilation(approval_program, mode=Mode.Application, version=8).compile(with_sourcemap=True, annotate_teal=True, annotate_teal_headers=True)
Which will break with our current approach to strip comments
https://github.com/algorandfoundation/algokit-utils-py/blob/main/src/algokit_utils/deploy.py#L310-L312
https://makerx-workspace.slack.com/archives/C049WVCMQAX/p1693376461329359
Detect larger number of extra pages as a breaking change event during appclient deploy.
Detect number of params changing and treat that as a breaking change event during appclient deploy.
Potentially have an option to override this behaviour in typescript in case extra growth room needed for app deploy
Needs to work the same in both ts and py.
utils-ts
has newly added support for specifying storage schema when calling deploy
or create
on the application client.
Whilst utils-py
has support for specifying extra pages, it doesn't support overriding the local or global state schema.
We need to also ensure this change flows through into the Python typed client generator.
Below are the reference TS PRs.
This should say TMPL_UPDATABLE
to match the param
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.