diff --git a/docs/doctrees/environment.pickle b/docs/doctrees/environment.pickle index c932d85e..df7d1133 100644 Binary files a/docs/doctrees/environment.pickle and b/docs/doctrees/environment.pickle differ diff --git a/docs/doctrees/usage.doctree b/docs/doctrees/usage.doctree index e831cac8..46a5c72c 100644 Binary files a/docs/doctrees/usage.doctree and b/docs/doctrees/usage.doctree differ diff --git a/docs/html/_modules/beaker/decorators.html b/docs/html/_modules/beaker/decorators.html index 5f74cd71..6981a332 100644 --- a/docs/html/_modules/beaker/decorators.html +++ b/docs/html/_modules/beaker/decorators.html @@ -173,7 +173,7 @@
return hc.method_spec.dictify()
-[docs]@dataclass
+@dataclass
class ParameterAnnotation:
descr: Optional[str] = field(kw_only=True, default=None)
default: Optional[DefaultArgument] = field(kw_only=True, default=None)
@@ -188,7 +188,7 @@ Source code for beaker.decorators
str(self.default.resolvable_class): self.default.resolve_hint()
}
- return ret
+ return ret
@dataclass
diff --git a/docs/html/_sources/usage.rst.txt b/docs/html/_sources/usage.rst.txt
index 390f38f2..1bf30440 100644
--- a/docs/html/_sources/usage.rst.txt
+++ b/docs/html/_sources/usage.rst.txt
@@ -130,42 +130,31 @@ Here we subclassed the ``OpUp`` contract which provides functionality to create
We inherit the methods and class variables that ``OpUp`` defined, allowing us to encapsulate and compose behavior.
-
-.. _parameter_annotations:
-
-Parameter Annotations
----------------------
-
-.. currentmodule:: beaker.decorators
-.. autoclass:: ParameterAnnotation
- :members:
-
-
-A caller of our application should be provided with all the information they might need in order to make a successful application call.
-
-One example of this of information is of course the parameter name and type. These bits of information are already provided by the normal method definition.
+Also note that the ``opup_app`` argument specifies a default value. This is a bit of magic that serves only to produce a hint for the caller in the resulting Application Spec.
.. _parameter_default:
Parameter Default Value
^^^^^^^^^^^^^^^^^^^^^^^
-In the ``OpUp`` example the argument ``opup_app`` should be the id of the application that we use to increase our budget via inner app calls. This value should not change frequently, if at all, but is still required to be passed by the caller so we may _use_ it in our logic.
+In the ``OpUp`` example above, the argument ``opup_app`` should be the id of the application that we use to increase our budget via inner app calls.
+This value should not change frequently, if at all, but is still required to be passed by the caller so we may **use** it in our logic, namely to execute an application call against it.
-Using the ``default`` field of the ``ParameterAnnotation``, we can specify a default value for the parameter.
-
-This allows the caller to know this pseudo-magic number ahead of time and makes calling your application easier. The information is communicated through the full ApplicationSpec as a hint the caller can use to figure out what the value should be.
+By specifying the default value of the argument in the method signature, we can communicate to the caller, through the hints of the Application Spec, what the value **should** be.
Options for default arguments are:
-- A constant, `bytes | int | str`
-- State Values, `ApplicationStateValue | AccountStateValue`
-- A read-only ABI method
+- A constant: one of ``bytes | int | str | Bytes | Int``
+- State Values: one of ``ApplicationStateValue | AccountStateValue``
+- A read-only ABI method: a method defined to produce some more complex value than a state value or constant would be able to produce.
+
-The result is that we can call the method, omitting the `opup_app` argument:
+The result of specifying the default value here is that we can call the method, omitting the `opup_app` argument:
.. code-block:: python
result = app_client.call(app.hash_it, input="hashme", iters=10)
-When invoked, the `ApplicationClient` consults the method definition to check that all the expected arguments are passed. If it finds one missing, it will check for hints for the method that may be resolvable. Upon finding a resolvable it will look up the state value, call the method, or return the constant value. The resolved value is passed in for argument.
\ No newline at end of file
+When invoked, the ``ApplicationClient`` consults the method definition to check that all the expected arguments are passed.
+If it finds that an argument is not passed, it will check the hints for a default argument for the method that may be used directly (constant) or resolved (need to look it up on chain or call method).
+Upon finding a resolvable it will look up the state value, call the method. The resulting value is passed in for argument to the application call.
\ No newline at end of file
diff --git a/docs/html/decorators.html b/docs/html/decorators.html
index 91ac137f..587993d0 100644
--- a/docs/html/decorators.html
+++ b/docs/html/decorators.html
@@ -176,11 +176,11 @@ DecoratorsMethod Hints
-
-class beaker.decorators.MethodHints(*, read_only: bool = False, structs: Optional[dict[str, dict[str, str | list[tuple[str, str]]]]] = None, param_annotations: Optional[dict[str, beaker.decorators.ParameterAnnotation]] = None)[source]
+class beaker.decorators.MethodHints(*, read_only: bool = False, structs: Optional[dict[str, dict[str, str | list[tuple[str, str]]]]] = None, param_annotations: Optional[dict[str, beaker.decorators.ParameterAnnotation]] = None)[source]
MethodHints provides hints to the caller about how to call the method
-
-param_annotations: Optional[dict[str, beaker.decorators.ParameterAnnotation]] = None
+param_annotations: Optional[dict[str, beaker.decorators.ParameterAnnotation]] = None
annotations
diff --git a/docs/html/genindex.html b/docs/html/genindex.html
index 0a2fc191..9e481a19 100644
--- a/docs/html/genindex.html
+++ b/docs/html/genindex.html
@@ -448,17 +448,15 @@ P
-
+
- Precompile (class in beaker.precompile)
- PrecompileTemplateValue (class in beaker.precompile)
diff --git a/docs/html/objects.inv b/docs/html/objects.inv
index 17687d3c..36c71efe 100644
Binary files a/docs/html/objects.inv and b/docs/html/objects.inv differ
diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js
index 08dc61a5..93893c04 100644
--- a/docs/html/searchindex.js
+++ b/docs/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["application", "application_client", "contracts", "decorators", "index", "lsig", "precompile", "sandbox", "state", "testing", "usage"], "filenames": ["application.rst", "application_client.rst", "contracts.rst", "decorators.rst", "index.rst", "lsig.rst", "precompile.rst", "sandbox.rst", "state.rst", "testing.rst", "usage.rst"], "titles": ["Application", "Application Client", "Contracts", "Decorators", "Beaker", "Logic Signatures", "Precompile", "Sandbox", "State", "Testing", "Usage"], "terms": {"thi": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "base": [0, 3, 5, 9, 10], "class": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "all": [0, 5, 7, 9, 10], "beaker": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], "should": [0, 1, 3, 5, 6, 8, 10], "inherit": [0, 2, 5], "from": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "_not_": [0, 5], "initi": [0, 2, 5, 8, 9, 10], "directli": [0, 4, 5, 8, 10], "version": [0, 2, 4, 5], "int": [0, 1, 2, 3, 5, 6, 8, 9, 10], "7": [0, 2, 5], "sourc": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], "contain": [0, 3, 9, 10], "logic": [0, 3, 6, 10], "detect": [0, 8], "state": [0, 1, 2], "variabl": [0, 3, 5, 6, 8, 10], "bare": [0, 10], "method": [0, 1, 2, 4, 5, 7, 8, 9, 10], "abi": [0, 1, 4, 8, 9, 10], "intern": [0, 2, 10], "subroutin": [0, 3, 5], "It": [0, 6], "subclass": [0, 4, 5, 9, 10], "provid": [0, 1, 3, 7, 8, 10], "basic": [0, 9], "behavior": [0, 5, 10], "custom": [0, 9], "application_spec": 0, "dict": [0, 1, 3, 8, 9], "str": [0, 1, 3, 5, 6, 7, 8, 9, 10], "ani": [0, 1, 2, 3, 5, 6, 8, 9, 10], "return": [0, 1, 3, 4, 5, 6, 8, 9, 10], "dictionari": 0, "help": 0, "caller": [0, 3, 10], "inform": [0, 3, 4, 10], "about": [0, 3, 10], "specif": [0, 1, 3, 10], "initialize_application_st": [0, 1, 8, 10], "expr": [0, 1, 2, 3, 6, 8, 9, 10], "declar": [0, 6, 8], "The": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], "type": [0, 1, 3, 6, 8, 9, 10], "pyteal": [0, 1, 2, 4, 8, 10], "initialize_account_st": [0, 1, 8], "addr": [0, 3, 10], "txnexpr": [0, 8], "object": [0, 2, 8], "account": [0, 1, 3, 9, 10], "paramet": [0, 1, 3, 7, 8, 9], "option": [0, 1, 3, 5, 8, 9, 10], "address": [0, 1, 3, 4, 6, 7, 10], "overrid": [0, 5, 9], "creat": [0, 1, 2, 3, 4, 7, 8, 9, 10], "defin": [0, 3, 5, 8, 10], "applicationcli": [1, 4, 6, 10], "conveni": [1, 10], "wai": [1, 9, 10], "interact": 1, "our": [1, 2, 3, 9, 10], "main": [1, 5], "point": [1, 5], "done": [1, 10], "us": [1, 3, 4, 5, 6, 7, 8, 9, 10], "call": [1, 2, 3, 4, 5, 6, 9, 10], "If": [1, 3, 5, 8, 10], "ar": [1, 3, 6, 9, 10], "multipl": 1, "signer": [1, 4, 6, 7, 10], "you": [1, 3, 4, 9, 10], "want": [1, 3, 10], "re": [1, 9], "some": [1, 3, 5, 6, 8, 9, 10], "suggest": 1, "prepar": 1, "mai": [1, 3, 4, 5, 9, 10], "differ": [1, 9], "argument": [1, 3, 6, 8, 9, 10], "copi": 1, "updat": [1, 3], "algodcli": [1, 7, 9], "app": [1, 2, 3, 4, 8, 9, 10], "app_id": [1, 3, 4, 10], "0": [1, 3, 6, 8, 9, 10], "transactionsign": [1, 7], "none": [1, 3, 5, 8, 9, 10], "sender": [1, 3, 6, 8], "suggested_param": 1, "suggestedparam": 1, "union": [1, 3], "callabl": [1, 3, 10], "on_complet": 1, "oncomplet": [1, 3, 10], "noopoc": 1, "local_schema": 1, "stateschema": [1, 8], "global_schema": 1, "approval_program": [1, 8, 10], "byte": [1, 4, 6, 8, 9, 10], "clear_program": [1, 10], "extra_pag": 1, "list": [1, 3, 7, 8, 9], "foreign_app": 1, "foreign_asset": 1, "note": 1, "leas": 1, "rekey_to": 1, "kwarg": [1, 8], "abiresult": 1, "handl": [1, 3, 5, 10], "add_method_cal": 1, "atc": 1, "atomictransactioncompos": [1, 6], "add": [1, 3, 4, 7, 10], "transact": [1, 2, 3, 8, 9], "pass": [1, 3, 4, 6, 8, 9, 10], "make": [1, 2, 9, 10], "current": [1, 10], "field": [1, 8, 10], "arg": [1, 6, 8, 9, 10], "tupl": [1, 3], "submit": [1, 10], "sign": 1, "applicationcalltransact": [1, 10], "id": [1, 2, 3, 4, 10], "schema": [1, 8], "delet": [1, 3, 8], "set": [1, 3, 4, 6, 8, 10], "deleteappl": [1, 3], "updateappl": [1, 3], "opt_in": [1, 3, 8, 10], "optin": [1, 3], "close_out": [1, 3], "closeout": [1, 3], "clear_stat": [1, 3], "clearstat": [1, 3], "fund": 1, "amt": 1, "pai": 1, "amount": 1, "get_application_st": 1, "raw": 1, "fals": [1, 3, 6, 8], "get": [1, 4, 7, 8, 9, 10], "global": [1, 3, 8, 10], "info": 1, "get_application_account_info": 1, "get_account_st": 1, "bool": [1, 3, 6, 8], "local": [1, 7, 8, 10], "specifi": [1, 9, 10], "import": [1, 3, 4, 8, 10], "final": [1, 2, 8, 10], "tealtyp": [1, 3, 5, 8, 10], "approv": [1, 6], "accountstatevalu": [1, 10], "applicationstatevalu": [1, 2, 3, 8, 10], "author": [1, 10], "extern": [1, 4, 8, 10], "sandbox": [1, 4, 10], "const": [1, 3], "logic_error": 1, "logicexcept": 1, "clientexampl": 1, "manag": 1, "stack_typ": [1, 3, 5, 8, 10], "default": [1, 4, 7, 8], "creator_address": [1, 3, 10], "nicknam": 1, "descr": [1, 8, 10], "what": [1, 8, 9, 10], "user": 1, "prefer": 1, "def": [1, 3, 4, 8, 10], "self": [1, 3, 4, 8, 10], "onli": [1, 3, 6, 8, 10], "set_manag": 1, "new_manag": 1, "set_nick": 1, "nick": 1, "string": [1, 3, 4, 8, 10], "read_onli": [1, 3, 8], "true": [1, 3, 8], "get_nick": 1, "output": [1, 2, 3, 4, 5, 8, 9, 10], "demo": [1, 4, 8], "up": [1, 10], "we": [1, 3, 10], "ll": 1, "acct": [1, 3, 4, 8, 9, 10], "get_account": [1, 4, 7, 10], "acct1": 1, "pop": [1, 4, 10], "acct2": 1, "app_client1": 1, "get_algod_cli": [1, 4, 7, 10], "chain": [1, 4, 10], "signer1": 1, "print": [1, 4, 8, 10], "f": [1, 4, 10], "1": [1, 3, 8, 10], "algo": [1, 3], "try": [1, 6], "both": [1, 8, 10], "after": [1, 9], "opt": [1, 3, 8], "first": [1, 10], "_after_": 1, "ve": [1, 10], "app_client2": 1, "without": 1, "second": 1, "except": 1, "e": [1, 10], "n": [1, 2], "each": [1, 8, 9], "shouldn": 1, "t": [1, 3, 10], "here": [1, 4, 10], "fail": [1, 6, 8], "expect": [1, 6, 9, 10], "addr1": 1, "have": [1, 2, 3, 6, 10], "addr2": 1, "back": 1, "__name__": [1, 4, 8], "__main__": [1, 4, 8], "These": [2, 10], "NOT": 2, "been": 2, "audit": 2, "pleas": 2, "report": 2, "issu": 2, "A": [2, 3, 5, 6, 8, 9, 10], "avail": [2, 9, 10], "target": 2, "applic": [2, 3, 4, 5, 6, 9, 10], "against": [2, 9], "order": [2, 6, 10], "increas": [2, 9, 10], "opcod": 2, "budget": [2, 6, 9, 10], "call_opup": [2, 10], "create_opup": 2, "min_bal": 2, "minimum": 2, "balanc": [2, 3], "requir": [2, 3, 8, 10], "opup_app_id": [2, 10], "dure": [2, 8], "bootstrap": 2, "opup_bootstrap": 2, "uint64": [2, 3, 6, 8, 10], "appli": 3, "configur": [3, 10], "thei": [3, 8, 10], "allow": [3, 5, 6, 8, 10], "know": [3, 10], "how": [3, 10], "expos": [3, 10], "them": [3, 8, 10], "can": [3, 6, 7, 8, 10], "tag": [3, 10], "router": [3, 10], "whatev": 3, "fn": 3, "subroutinefnwrapp": [3, 8], "method_config": 3, "methodconfig": 3, "an": [3, 4, 5, 6, 7, 8, 9, 10], "function": [3, 9, 10], "being": [3, 10], "wrap": 3, "input": [3, 9, 10], "txn": [3, 8], "interpret": 3, "take": [3, 10], "evalu": [3, 5, 8], "depend": 3, "mark": [3, 10], "fee": 3, "dryrun": 3, "place": [], "holder": [], "until": 8, "arc22": 3, "merg": [], "origin": 3, "addit": [3, 9], "element": 3, "its": [3, 6, 9, 10], "__handler_config__": 3, "attribut": [3, 5, 6, 10], "often": 3, "would": 3, "like": [3, 10], "restrict": 3, "certain": 3, "valu": [3, 6, 9], "keyword": 3, "let": [3, 10], "creator": 3, "increment": [3, 8, 10], "seq": [3, 10], "counter": [3, 8, 10], "accept": [3, 8], "integ": 3, "pre": [3, 10], "check": [3, 4, 8, 10], "static": [3, 8], "match": [3, 9, 10], "exactli": 3, "holds_token": 3, "asset_id": 3, "hold": [3, 7, 8], "asset": 3, "opted_in": 3, "ha": [3, 6, 10], "alreadi": [3, 10], "given": [3, 6, 8], "But": 3, "own": 3, "is_whal": 3, "1mm": 3, "1_000_000": 3, "greet": 3, "hello": 3, "whale": 3, "methodhint": 3, "struct": 3, "param_annot": 3, "parameterannot": [3, 10], "annot": 3, "indic": 3, "through": [3, 10], "name": [3, 4, 5, 6, 9, 10], "see": [3, 4, 8, 9, 10], "more": [3, 8, 10], "read": [3, 8, 10], "meant": 3, "produc": [3, 8], "side": 3, "effect": [3, 10], "flag": [3, 8], "detail": [3, 7, 8], "count": 3, "get_count": 3, "id_of_th": 3, "uint8": [3, 8], "need": [3, 5, 8, 10], "number": [3, 6, 9, 10], "util": 3, "common": 3, "don": [3, 10], "do": [3, 8, 10], "access": [3, 8, 10], "instanc": [3, 9, 10], "express": [3, 6, 8], "trigger": 3, "callsub": 3, "omit": [3, 8, 10], "inlin": 3, "return_typ": 3, "s": [3, 10], "do_log": 3, "10": [3, 10], "send_asset": 3, "arc4": 3, "spec": 3, "rout": [3, 10], "whether": [3, 6], "one": [3, 10], "helper": [3, 7, 8, 9], "noop": 3, "applicationid": 3, "chang": [3, 10], "made": 3, "signatur": [3, 4], "action": 3, "bare_extern": 3, "no_op": 3, "callconfig": 3, "delete_appl": 3, "update_appl": 3, "python": [4, 10], "framework": 4, "build": 4, "smart": 4, "contract": [4, 6, 10], "algorand": [4, 8, 10], "project": 4, "under": 4, "activ": 4, "develop": [4, 8], "pip": 4, "venv": 4, "Or": 4, "github": 4, "git": 4, "http": [4, 7], "com": 4, "devrel": 4, "hellobeak": 4, "result": [4, 6, 10], "concat": 4, "client": [4, 9, 10], "app_client": [4, 10], "algod": [4, 10], "instanti": [4, 10], "program": [4, 5, 6, 8, 10], "max_teal_vers": 4, "6": 4, "deploi": [4, 10], "app_addr": [4, 10], "txid": [4, 10], "return_valu": [4, 10], "out": [4, 8, 10], "section": 4, "further": 4, "full": [4, 10], "exampl": [4, 6, 9, 10], "index": [4, 8], "modul": 4, "search": 4, "page": 4, "work": [7, 10], "sandboxaccount": 7, "private_kei": 7, "accounttransactionsign": 7, "simpl": [7, 10], "dataclass": 7, "base64": 7, "encod": [7, 8, 9], "privat": 7, "kei": [7, 8, 9, 10], "kmd_token": 7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 7, "wallet_nam": 7, "unencrypt": 7, "wallet": 7, "wallet_password": 7, "kmd": 7, "network": 7, "automat": [7, 8, 10], "add_account": 7, "kmd_address": 7, "localhost": 7, "4002": 7, "new": [7, 10], "token": 7, "get_indexer_cli": 7, "indexercli": 7, "maintain": 8, "part": 8, "doc": 8, "refer": [8, 10], "applicationst": [8, 10], "map": 8, "dynamicapplicationstatevalu": 8, "dictifi": [8, 10], "convert": 8, "gener": [6, 8], "num": 8, "uint": 8, "val": 8, "cnt": 8, "decrement": [8, 10], "store": [8, 10], "get_mayb": 8, "maybevalu": 8, "exist": 8, "get_must": 8, "assert": [8, 10], "get_els": 8, "compil": [6, 8, 10], "time": [8, 10], "error": 8, "is_default": 8, "equal": 8, "max_kei": 8, "key_gen": 8, "__getitem__": 8, "key_se": 8, "basetyp": 8, "seed": 8, "your": [8, 10], "storag": [8, 10], "level": 8, "accountst": [8, 10], "stateexampl": 8, "declared_app_valu": 8, "protect": 8, "noth": 8, "protocol": 8, "dynamic_app_valu": 8, "63": [], "possibl": 8, "declared_account_valu": 8, "dynamic_account_valu": 8, "8": 8, "reserv": 8, "case": 8, "set_app_state_v": 8, "v": 8, "sinc": 8, "wa": [5, 8], "get_app_state_v": 8, "set_dynamic_app_state_v": 8, "k": 8, "squar": 8, "bracket": 8, "must": [5, 8, 10], "get_dynamic_app_state_v": 8, "set_account_state_v": 8, "redund": 8, "clear": [6, 8], "happen": 8, "incr_account_state_v": 8, "just": 8, "purpos": 8, "get_account_state_v": 8, "set_dynamic_account_state_v": 8, "get_dynamic_account_state_v": 8, "se": 8, "lib": 9, "directori": 9, "unittestingapp": 9, "expr_to_test": 9, "testabl": 9, "There": 9, "2": [9, 10], "singl": [6, 8, 9], "unit_test": 9, "respons": 9, "incom": [9, 10], "assert_output": 9, "opup": [9, 10], "compar": [6, 9], "where": [6, 8, 9], "entri": [5, 9], "correspond": 9, "retriev": 9, "involv": 9, "amm": 9, "amm_test": 9, "py": 9, "usag": 9, "get_bal": 9, "get_delta": 9, "acct_balances_befor": 9, "acct_balances_aft": 9, "between": 9, "befor": 9, "event": 9, "todo": 9, "assum": 10, "instal": 10, "run": 10, "config": 10, "commit": 10, "write": [8, 10], "calcul": 10, "repres": [8, 10], "though": 10, "doesn": 10, "much": 10, "look": 10, "calc": 10, "json": 10, "dump": 10, "nice": 10, "enough": 10, "teal": [5, 6, 10], "b": 10, "mul": 10, "multipli": 10, "sub": 10, "subtract": 10, "div": 10, "divid": 10, "includ": [5, 6, 10], "kind": 10, "invok": 10, "when": 10, "doe": 10, "mysickapp": 10, "do_th": 10, "data": 10, "now": 10, "tx": 10, "Thats": 10, "To": 10, "summar": 10, "wrote": 10, "By": 10, "ad": 10, "assembl": [6, 10], "binari": [6, 10], "send": 10, "endpoint": 10, "which": [6, 10], "onc": 10, "subsequ": 10, "direct": 10, "constructor": 10, "also": 10, "i": 10, "pars": 10, "nativ": 10, "mirror": 10, "abov": 10, "off": 10, "other": 10, "insid": 10, "handler": 10, "g": 10, "etc": 10, "throughout": 10, "encapsul": 10, "associ": 10, "tend": 10, "sole": 10, "good": 10, "practic": 10, "parlanc": 10, "counterapp": 10, "show": 10, "sever": 10, "perform": 10, "even": 10, "dynam": 10, "For": 10, "extend": 10, "expensiveapp": 10, "expens": 10, "demonstr": 10, "hash_it": 10, "hash": [], "iter": 10, "opup_app": 10, "reququest": [], "staticarrai": [], "liter": 10, "32": [8, 10], "application_id": 10, "255": 10, "scratchvar": 10, "load": 10, "sha256": 10, "decod": 10, "compos": 10, "nonetyp": [], "might": [6, 10], "success": 10, "One": 10, "cours": 10, "bit": 10, "normal": 10, "definit": [5, 10], "anoth": [], "harder": [], "plain": [], "english": [], "explan": [], "_should_": [], "quit": [], "determin": [], "unhelpful_method_nam": [], "magic": 10, "prime": [], "els": [], "is_prim": [], "figur": 10, "appropri": [], "In": 10, "via": 10, "inner": 10, "frequent": 10, "still": 10, "so": 10, "_use_": 10, "pseudo": 10, "ahead": 10, "easier": 10, "commun": 10, "applicationspec": 10, "hint": 10, "constant": [5, 10], "hashm": 10, "consult": 10, "find": 10, "miss": 10, "resolv": 10, "upon": 10, "simul": 3, "method_nam": 3, "param_nam": 3, "return_type_or_handl": 3, "applicationstateblob": 8, "accountstateblob": 8, "application_blob": 8, "16": 8, "account_blob": 8, "3": 8, "write_acct_blob": 8, "read_acct_blob": 8, "dynamicbyt": 8, "blob": [], "max_byt": 8, "write_app_blob": 8, "read_app_blob": 8, "logicsignatur": [5, 6], "logic_signatur": 5, "templatevari": 5, "templat": [5, 6], "hardcod": 5, "well": 5, "ref": 5, "evaulu": 5, "overridden": 5, "necessari": 5, "lsig": [5, 6], "arbitrari": 5, "get_nam": 5, "present": [5, 6], "has_return": [], "alwai": [], "type_of": [], "suppli": 5, "assign": 5, "signal": 6, "fulli": 6, "prior": 6, "construct": 6, "precompiletemplatevalu": 6, "pc": 6, "is_byt": 6, "line": 6, "bytecod": 6, "template_valu": 6, "populate_templ": 6, "patch": 6, "blank": 6, "same": 6, "populate_template_expr": 6, "template_address": 6, "logicsigtransactionsign": 6, "non": 6, "itself": 6, "offload": 6, "comput": 6, "max": 6, "20k": 6, "op": 6, "700": 6, "start": 8, "stop": 8, "buffer": 8, "read_byt": 8, "idx": 8, "buff": 8, "write_byt": 8, "That": 8, "staticbyt": 10, "defaultargu": 10}, "objects": {"": [[4, 0, 0, "-", "beaker"]], "beaker": [[0, 0, 0, "-", "application"], [2, 0, 0, "-", "contracts"], [3, 0, 0, "-", "decorators"], [5, 0, 0, "-", "logic_signature"], [6, 0, 0, "-", "precompile"]], "beaker.application": [[0, 1, 1, "", "Application"]], "beaker.application.Application": [[0, 2, 1, "", "application_spec"], [0, 2, 1, "", "create"], [0, 2, 1, "", "initialize_account_state"], [0, 2, 1, "", "initialize_application_state"]], "beaker.client": [[1, 1, 1, "", "ApplicationClient"]], "beaker.client.ApplicationClient": [[1, 2, 1, "", "add_method_call"], [1, 2, 1, "", "call"], [1, 2, 1, "", "clear_state"], [1, 2, 1, "", "close_out"], [1, 2, 1, "", "create"], [1, 2, 1, "", "delete"], [1, 2, 1, "", "fund"], [1, 2, 1, "", "get_account_state"], [1, 2, 1, "", "get_application_account_info"], [1, 2, 1, "", "get_application_state"], [1, 2, 1, "", "opt_in"], [1, 2, 1, "", "prepare"], [1, 2, 1, "", "update"]], "beaker.contracts": [[2, 1, 1, "", "OpUp"]], "beaker.contracts.OpUp": [[2, 2, 1, "", "call_opup"], [2, 2, 1, "", "create_opup"], [2, 3, 1, "", "min_balance"], [2, 3, 1, "", "opup_app_id"], [2, 2, 1, "", "opup_bootstrap"]], "beaker.decorators": [[3, 1, 1, "", "Authorize"], [3, 1, 1, "", "MethodHints"], [10, 1, 1, "", "ParameterAnnotation"], [3, 4, 1, "", "bare_external"], [3, 4, 1, "", "clear_state"], [3, 4, 1, "", "close_out"], [3, 4, 1, "", "create"], [3, 4, 1, "", "delete"], [3, 4, 1, "", "external"], [3, 4, 1, "", "internal"], [3, 4, 1, "", "opt_in"], [3, 4, 1, "", "update"]], "beaker.decorators.Authorize": [[3, 2, 1, "", "holds_token"], [3, 2, 1, "", "only"], [3, 2, 1, "", "opted_in"]], "beaker.decorators.MethodHints": [[3, 3, 1, "", "param_annotations"], [3, 3, 1, "", "read_only"], [3, 3, 1, "", "structs"]], "beaker.logic_signature": [[5, 1, 1, "", "LogicSignature"], [5, 1, 1, "", "TemplateVariable"]], "beaker.logic_signature.LogicSignature": [[5, 2, 1, "", "evaluate"]], "beaker.logic_signature.TemplateVariable": [[5, 2, 1, "", "get_name"]], "beaker.precompile": [[6, 1, 1, "", "Precompile"], [6, 1, 1, "", "PrecompileTemplateValue"]], "beaker.precompile.Precompile": [[6, 2, 1, "", "address"], [6, 2, 1, "", "populate_template"], [6, 2, 1, "", "populate_template_expr"], [6, 2, 1, "", "signer"], [6, 2, 1, "", "template_address"]], "beaker.precompile.PrecompileTemplateValue": [[6, 3, 1, "", "is_bytes"], [6, 3, 1, "", "line"], [6, 3, 1, "", "name"], [6, 3, 1, "", "pc"]], "beaker.sandbox": [[7, 1, 1, "", "SandboxAccount"], [7, 2, 1, "", "add_account"], [7, 2, 1, "", "get_accounts"], [7, 2, 1, "", "get_algod_client"], [7, 2, 1, "", "get_indexer_client"]], "beaker.sandbox.SandboxAccount": [[7, 3, 1, "", "address"], [7, 3, 1, "", "private_key"], [7, 3, 1, "", "signer"]], "beaker.state": [[8, 1, 1, "", "AccountState"], [8, 1, 1, "", "AccountStateBlob"], [8, 1, 1, "", "AccountStateValue"], [8, 1, 1, "", "ApplicationState"], [8, 1, 1, "", "ApplicationStateBlob"], [8, 1, 1, "", "ApplicationStateValue"], [8, 1, 1, "", "DynamicAccountStateValue"], [8, 1, 1, "", "DynamicApplicationStateValue"]], "beaker.state.AccountState": [[8, 2, 1, "", "dictify"], [8, 2, 1, "", "initialize"], [8, 2, 1, "", "schema"]], "beaker.state.AccountStateBlob": [[8, 2, 1, "", "read"], [8, 2, 1, "", "read_byte"], [8, 2, 1, "", "write"], [8, 2, 1, "", "write_byte"]], "beaker.state.AccountStateValue": [[8, 2, 1, "", "delete"], [8, 2, 1, "", "get"], [8, 2, 1, "", "get_else"], [8, 2, 1, "", "get_maybe"], [8, 2, 1, "", "get_must"], [8, 2, 1, "", "is_default"], [8, 2, 1, "", "set"]], "beaker.state.ApplicationState": [[8, 2, 1, "", "dictify"], [8, 2, 1, "", "initialize"], [8, 2, 1, "", "schema"]], "beaker.state.ApplicationStateBlob": [[8, 2, 1, "", "read"], [8, 2, 1, "", "read_byte"], [8, 2, 1, "", "write"], [8, 2, 1, "", "write_byte"]], "beaker.state.ApplicationStateValue": [[8, 2, 1, "", "decrement"], [8, 2, 1, "", "delete"], [8, 2, 1, "", "get"], [8, 2, 1, "", "get_else"], [8, 2, 1, "", "get_maybe"], [8, 2, 1, "", "get_must"], [8, 2, 1, "", "increment"], [8, 2, 1, "", "is_default"], [8, 2, 1, "", "set"]], "beaker.state.DynamicAccountStateValue": [[8, 2, 1, "", "__getitem__"]], "beaker.state.DynamicApplicationStateValue": [[8, 2, 1, "", "__getitem__"]], "beaker.testing": [[9, 1, 1, "", "UnitTestingApp"], [9, 4, 1, "", "assert_output"], [9, 4, 1, "", "get_balances"], [9, 4, 1, "", "get_deltas"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"applic": [0, 1, 8], "client": [1, 7], "full": [1, 8], "exampl": [1, 8], "contract": 2, "util": 2, "opup": 2, "decor": [3, 10], "abi": 3, "method": 3, "extern": 3, "author": 3, "hint": 3, "intern": 3, "bare": 3, "singl": 3, "multipl": 3, "beaker": 4, "instal": 4, "hello": 4, "usag": [4, 10], "indic": 4, "tabl": 4, "sandbox": 7, "account": [7, 8], "algod": 7, "index": 7, "state": [8, 9, 10], "valu": [8, 10], "dynam": 8, "accountstatevalu": 8, "dynamicaccountstatevalu": 8, "test": 9, "unit": 9, "balanc": 9, "check": 9, "tutori": 10, "manag": 10, "inherit": 10, "paramet": 10, "annot": 10, "descript": [], "default": 10, "logic": 5, "signatur": 5, "precompil": 6, "blob": 8}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["application", "application_client", "contracts", "decorators", "index", "lsig", "precompile", "sandbox", "state", "testing", "usage"], "filenames": ["application.rst", "application_client.rst", "contracts.rst", "decorators.rst", "index.rst", "lsig.rst", "precompile.rst", "sandbox.rst", "state.rst", "testing.rst", "usage.rst"], "titles": ["Application", "Application Client", "Contracts", "Decorators", "Beaker", "Logic Signatures", "Precompile", "Sandbox", "State", "Testing", "Usage"], "terms": {"thi": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "base": [0, 3, 5, 9, 10], "class": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "all": [0, 5, 7, 9, 10], "beaker": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], "should": [0, 1, 3, 5, 6, 8, 10], "inherit": [0, 2, 5], "from": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "_not_": [0, 5], "initi": [0, 2, 5, 8, 9, 10], "directli": [0, 4, 5, 8, 10], "version": [0, 2, 4, 5], "int": [0, 1, 2, 3, 5, 6, 8, 9, 10], "7": [0, 2, 5], "sourc": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], "contain": [0, 3, 9, 10], "logic": [0, 3, 6, 10], "detect": [0, 8], "state": [0, 1, 2], "variabl": [0, 3, 5, 6, 8, 10], "bare": [0, 10], "method": [0, 1, 2, 4, 5, 7, 8, 9, 10], "abi": [0, 1, 4, 8, 9, 10], "intern": [0, 2, 10], "subroutin": [0, 3, 5], "It": [0, 6], "subclass": [0, 4, 5, 9, 10], "provid": [0, 1, 3, 7, 8, 10], "basic": [0, 9], "behavior": [0, 5, 10], "custom": [0, 9], "application_spec": 0, "dict": [0, 1, 3, 8, 9], "str": [0, 1, 3, 5, 6, 7, 8, 9, 10], "ani": [0, 1, 2, 3, 5, 6, 8, 9, 10], "return": [0, 1, 3, 4, 5, 6, 8, 9, 10], "dictionari": 0, "help": 0, "caller": [0, 3, 10], "inform": [0, 3, 4], "about": [0, 3, 10], "specif": [0, 1, 3, 10], "initialize_application_st": [0, 1, 8, 10], "expr": [0, 1, 2, 3, 6, 8, 9, 10], "declar": [0, 6, 8], "The": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], "type": [0, 1, 3, 6, 8, 9, 10], "pyteal": [0, 1, 2, 4, 8, 10], "initialize_account_st": [0, 1, 8], "addr": [0, 3, 10], "txnexpr": [0, 8], "object": [0, 2, 8], "account": [0, 1, 3, 9, 10], "paramet": [0, 1, 3, 7, 8, 9], "option": [0, 1, 3, 5, 8, 9, 10], "address": [0, 1, 3, 4, 6, 7, 10], "overrid": [0, 5, 9], "creat": [0, 1, 2, 3, 4, 7, 8, 9, 10], "defin": [0, 3, 5, 8, 10], "applicationcli": [1, 4, 6, 10], "conveni": [1, 10], "wai": [1, 9, 10], "interact": 1, "our": [1, 2, 3, 9, 10], "main": [1, 5], "point": [1, 5], "done": [1, 10], "us": [1, 3, 4, 5, 6, 7, 8, 9, 10], "call": [1, 2, 3, 4, 5, 6, 9, 10], "If": [1, 3, 5, 8, 10], "ar": [1, 3, 6, 9, 10], "multipl": 1, "signer": [1, 4, 6, 7, 10], "you": [1, 3, 4, 9, 10], "want": [1, 3, 10], "re": [1, 9], "some": [1, 3, 5, 6, 8, 9, 10], "suggest": 1, "prepar": 1, "mai": [1, 3, 4, 5, 9, 10], "differ": [1, 9], "argument": [1, 3, 6, 8, 9, 10], "copi": 1, "updat": [1, 3], "algodcli": [1, 7, 9], "app": [1, 2, 3, 4, 8, 9, 10], "app_id": [1, 3, 4, 10], "0": [1, 3, 6, 8, 9, 10], "transactionsign": [1, 7], "none": [1, 3, 5, 8, 9], "sender": [1, 3, 6, 8], "suggested_param": 1, "suggestedparam": 1, "union": [1, 3], "callabl": [1, 3, 10], "on_complet": 1, "oncomplet": [1, 3, 10], "noopoc": 1, "local_schema": 1, "stateschema": [1, 8], "global_schema": 1, "approval_program": [1, 8, 10], "byte": [1, 4, 6, 8, 9, 10], "clear_program": [1, 10], "extra_pag": 1, "list": [1, 3, 7, 8, 9], "foreign_app": 1, "foreign_asset": 1, "note": [1, 10], "leas": 1, "rekey_to": 1, "kwarg": [1, 8], "abiresult": 1, "handl": [1, 3, 5, 10], "add_method_cal": 1, "atc": 1, "atomictransactioncompos": [1, 6], "add": [1, 3, 4, 7, 10], "transact": [1, 2, 3, 8, 9], "pass": [1, 3, 4, 6, 8, 9, 10], "make": [1, 2, 9], "current": [1, 10], "field": [1, 8, 10], "arg": [1, 6, 8, 9, 10], "tupl": [1, 3], "submit": [1, 10], "sign": 1, "applicationcalltransact": [1, 10], "id": [1, 2, 3, 4, 10], "schema": [1, 8], "delet": [1, 3, 8], "set": [1, 3, 4, 6, 8, 10], "deleteappl": [1, 3], "updateappl": [1, 3], "opt_in": [1, 3, 8, 10], "optin": [1, 3], "close_out": [1, 3], "closeout": [1, 3], "clear_stat": [1, 3], "clearstat": [1, 3], "fund": 1, "amt": 1, "pai": 1, "amount": 1, "get_application_st": 1, "raw": 1, "fals": [1, 3, 6, 8], "get": [1, 4, 7, 8, 9, 10], "global": [1, 3, 8, 10], "info": 1, "get_application_account_info": 1, "get_account_st": 1, "bool": [1, 3, 6, 8], "local": [1, 7, 8, 10], "specifi": [1, 9, 10], "import": [1, 3, 4, 8, 10], "final": [1, 2, 8, 10], "tealtyp": [1, 3, 5, 8, 10], "approv": [1, 6], "accountstatevalu": [1, 10], "applicationstatevalu": [1, 2, 3, 8, 10], "author": [1, 10], "extern": [1, 4, 8, 10], "sandbox": [1, 4, 10], "const": [1, 3], "logic_error": 1, "logicexcept": 1, "clientexampl": 1, "manag": 1, "stack_typ": [1, 3, 5, 8, 10], "default": [1, 4, 7, 8], "creator_address": [1, 3, 10], "nicknam": 1, "descr": [1, 8, 10], "what": [1, 8, 9, 10], "user": 1, "prefer": 1, "def": [1, 3, 4, 8, 10], "self": [1, 3, 4, 8, 10], "onli": [1, 3, 6, 8, 10], "set_manag": 1, "new_manag": 1, "set_nick": 1, "nick": 1, "string": [1, 3, 4, 8, 10], "read_onli": [1, 3, 8], "true": [1, 3, 8], "get_nick": 1, "output": [1, 2, 3, 4, 5, 8, 9, 10], "demo": [1, 4, 8], "up": [1, 10], "we": [1, 3, 10], "ll": 1, "acct": [1, 3, 4, 8, 9, 10], "get_account": [1, 4, 7, 10], "acct1": 1, "pop": [1, 4, 10], "acct2": 1, "app_client1": 1, "get_algod_cli": [1, 4, 7, 10], "chain": [1, 4, 10], "signer1": 1, "print": [1, 4, 8, 10], "f": [1, 4, 10], "1": [1, 3, 8, 10], "algo": [1, 3], "try": [1, 6], "both": [1, 8, 10], "after": [1, 9], "opt": [1, 3, 8], "first": [1, 10], "_after_": 1, "ve": [1, 10], "app_client2": 1, "without": 1, "second": 1, "except": 1, "e": [1, 10], "n": [1, 2], "each": [1, 8, 9], "shouldn": 1, "t": [1, 3, 10], "here": [1, 4, 10], "fail": [1, 6, 8], "expect": [1, 6, 9, 10], "addr1": 1, "have": [1, 2, 3, 6, 10], "addr2": 1, "back": 1, "__name__": [1, 4, 8], "__main__": [1, 4, 8], "These": 2, "NOT": 2, "been": 2, "audit": 2, "pleas": 2, "report": 2, "issu": 2, "A": [2, 3, 5, 6, 8, 9, 10], "avail": [2, 9, 10], "target": 2, "applic": [2, 3, 4, 5, 6, 9, 10], "against": [2, 9, 10], "order": [2, 6], "increas": [2, 9, 10], "opcod": 2, "budget": [2, 6, 9, 10], "call_opup": [2, 10], "create_opup": 2, "min_bal": 2, "minimum": 2, "balanc": [2, 3], "requir": [2, 3, 8, 10], "opup_app_id": [2, 10], "dure": [2, 8], "bootstrap": 2, "opup_bootstrap": 2, "uint64": [2, 3, 6, 8, 10], "appli": 3, "configur": [3, 10], "thei": [3, 8], "allow": [3, 5, 6, 8, 10], "know": 3, "how": [3, 10], "expos": [3, 10], "them": [3, 8, 10], "can": [3, 6, 7, 8, 10], "tag": [3, 10], "router": [3, 10], "whatev": 3, "fn": 3, "subroutinefnwrapp": [3, 8], "method_config": 3, "methodconfig": 3, "an": [3, 4, 5, 6, 7, 8, 9, 10], "function": [3, 9, 10], "being": [3, 10], "wrap": 3, "input": [3, 9, 10], "txn": [3, 8], "interpret": 3, "take": [3, 10], "evalu": [3, 5, 8], "depend": 3, "mark": [3, 10], "fee": 3, "dryrun": 3, "place": [], "holder": [], "until": 8, "arc22": 3, "merg": [], "origin": 3, "addit": [3, 9], "element": 3, "its": [3, 6, 9, 10], "__handler_config__": 3, "attribut": [3, 5, 6, 10], "often": 3, "would": [3, 10], "like": [3, 10], "restrict": 3, "certain": 3, "valu": [3, 6, 9], "keyword": 3, "let": [3, 10], "creator": 3, "increment": [3, 8, 10], "seq": [3, 10], "counter": [3, 8, 10], "accept": [3, 8], "integ": 3, "pre": [3, 10], "check": [3, 4, 8, 10], "static": [3, 8], "match": [3, 9, 10], "exactli": 3, "holds_token": 3, "asset_id": 3, "hold": [3, 7, 8], "asset": 3, "opted_in": 3, "ha": [3, 6, 10], "alreadi": [3, 10], "given": [3, 6, 8], "But": 3, "own": 3, "is_whal": 3, "1mm": 3, "1_000_000": 3, "greet": 3, "hello": 3, "whale": 3, "methodhint": 3, "struct": 3, "param_annot": 3, "parameterannot": 3, "annot": 3, "indic": 3, "through": [3, 10], "name": [3, 4, 5, 6, 9, 10], "see": [3, 4, 8, 9, 10], "more": [3, 8, 10], "read": [3, 8, 10], "meant": 3, "produc": [3, 8, 10], "side": 3, "effect": [3, 10], "flag": [3, 8], "detail": [3, 7, 8], "count": 3, "get_count": 3, "id_of_th": 3, "uint8": [3, 8], "need": [3, 5, 8, 10], "number": [3, 6, 9], "util": 3, "common": 3, "don": [3, 10], "do": [3, 8, 10], "access": [3, 8, 10], "instanc": [3, 9, 10], "express": [3, 6, 8], "trigger": 3, "callsub": 3, "omit": [3, 8, 10], "inlin": 3, "return_typ": 3, "s": [3, 10], "do_log": 3, "10": [3, 10], "send_asset": 3, "arc4": 3, "spec": [3, 10], "rout": [3, 10], "whether": [3, 6], "one": [3, 10], "helper": [3, 7, 8, 9], "noop": 3, "applicationid": 3, "chang": [3, 10], "made": 3, "signatur": [3, 4, 10], "action": 3, "bare_extern": 3, "no_op": 3, "callconfig": 3, "delete_appl": 3, "update_appl": 3, "python": [4, 10], "framework": 4, "build": 4, "smart": 4, "contract": [4, 6, 10], "algorand": [4, 8, 10], "project": 4, "under": 4, "activ": 4, "develop": [4, 8], "pip": 4, "venv": 4, "Or": 4, "github": 4, "git": 4, "http": [4, 7], "com": 4, "devrel": 4, "hellobeak": 4, "result": [4, 6, 10], "concat": 4, "client": [4, 9, 10], "app_client": [4, 10], "algod": [4, 10], "instanti": [4, 10], "program": [4, 5, 6, 8, 10], "max_teal_vers": 4, "6": 4, "deploi": [4, 10], "app_addr": [4, 10], "txid": [4, 10], "return_valu": [4, 10], "out": [4, 8], "section": 4, "further": 4, "full": [4, 10], "exampl": [4, 6, 9, 10], "index": [4, 8], "modul": 4, "search": 4, "page": 4, "work": [7, 10], "sandboxaccount": 7, "private_kei": 7, "accounttransactionsign": 7, "simpl": [7, 10], "dataclass": 7, "base64": 7, "encod": [7, 8, 9], "privat": 7, "kei": [7, 8, 9, 10], "kmd_token": 7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 7, "wallet_nam": 7, "unencrypt": 7, "wallet": 7, "wallet_password": 7, "kmd": 7, "network": 7, "automat": [7, 8, 10], "add_account": 7, "kmd_address": 7, "localhost": 7, "4002": 7, "new": [7, 10], "token": 7, "get_indexer_cli": 7, "indexercli": 7, "maintain": 8, "part": 8, "doc": 8, "refer": [8, 10], "applicationst": [8, 10], "map": 8, "dynamicapplicationstatevalu": 8, "dictifi": [8, 10], "convert": 8, "gener": [6, 8], "num": 8, "uint": 8, "val": 8, "cnt": 8, "decrement": [8, 10], "store": [8, 10], "get_mayb": 8, "maybevalu": 8, "exist": 8, "get_must": 8, "assert": [8, 10], "get_els": 8, "compil": [6, 8, 10], "time": 8, "error": 8, "is_default": 8, "equal": 8, "max_kei": 8, "key_gen": 8, "__getitem__": 8, "key_se": 8, "basetyp": 8, "seed": 8, "your": 8, "storag": [8, 10], "level": 8, "accountst": [8, 10], "stateexampl": 8, "declared_app_valu": 8, "protect": 8, "noth": 8, "protocol": 8, "dynamic_app_valu": 8, "63": [], "possibl": 8, "declared_account_valu": 8, "dynamic_account_valu": 8, "8": 8, "reserv": 8, "case": 8, "set_app_state_v": 8, "v": 8, "sinc": 8, "wa": [5, 8], "get_app_state_v": 8, "set_dynamic_app_state_v": 8, "k": 8, "squar": 8, "bracket": 8, "must": [5, 8, 10], "get_dynamic_app_state_v": 8, "set_account_state_v": 8, "redund": 8, "clear": [6, 8], "happen": 8, "incr_account_state_v": 8, "just": 8, "purpos": 8, "get_account_state_v": 8, "set_dynamic_account_state_v": 8, "get_dynamic_account_state_v": 8, "se": 8, "lib": 9, "directori": 9, "unittestingapp": 9, "expr_to_test": 9, "testabl": 9, "There": 9, "2": [9, 10], "singl": [6, 8, 9], "unit_test": 9, "respons": 9, "incom": [9, 10], "assert_output": 9, "opup": [9, 10], "compar": [6, 9], "where": [6, 8, 9], "entri": [5, 9], "correspond": 9, "retriev": 9, "involv": 9, "amm": 9, "amm_test": 9, "py": 9, "usag": 9, "get_bal": 9, "get_delta": 9, "acct_balances_befor": 9, "acct_balances_aft": 9, "between": 9, "befor": 9, "event": 9, "todo": 9, "assum": 10, "instal": 10, "run": 10, "config": 10, "commit": 10, "write": [8, 10], "calcul": 10, "repres": [8, 10], "though": 10, "doesn": 10, "much": 10, "look": 10, "calc": 10, "json": 10, "dump": 10, "nice": 10, "enough": 10, "teal": [5, 6, 10], "b": 10, "mul": 10, "multipli": 10, "sub": 10, "subtract": 10, "div": 10, "divid": 10, "includ": [5, 6, 10], "kind": 10, "invok": 10, "when": 10, "doe": 10, "mysickapp": 10, "do_th": 10, "data": 10, "now": 10, "tx": 10, "Thats": 10, "To": 10, "summar": 10, "wrote": 10, "By": 10, "ad": 10, "assembl": [6, 10], "binari": [6, 10], "send": 10, "endpoint": 10, "which": [6, 10], "onc": 10, "subsequ": 10, "direct": 10, "constructor": 10, "also": 10, "i": 10, "pars": 10, "nativ": 10, "mirror": 10, "abov": 10, "off": 10, "other": 10, "insid": 10, "handler": 10, "g": 10, "etc": 10, "throughout": 10, "encapsul": 10, "associ": 10, "tend": 10, "sole": 10, "good": 10, "practic": 10, "parlanc": 10, "counterapp": 10, "show": 10, "sever": 10, "perform": 10, "even": 10, "dynam": 10, "For": 10, "extend": 10, "expensiveapp": 10, "expens": 10, "demonstr": 10, "hash_it": 10, "hash": [], "iter": 10, "opup_app": 10, "reququest": [], "staticarrai": [], "liter": 10, "32": [8, 10], "application_id": 10, "255": 10, "scratchvar": 10, "load": 10, "sha256": 10, "decod": 10, "compos": 10, "nonetyp": [], "might": 6, "success": [], "One": [], "cours": [], "bit": 10, "normal": [], "definit": [5, 10], "anoth": [], "harder": [], "plain": [], "english": [], "explan": [], "_should_": [], "quit": [], "determin": [], "unhelpful_method_nam": [], "magic": 10, "prime": [], "els": [], "is_prim": [], "figur": [], "appropri": [], "In": 10, "via": 10, "inner": 10, "frequent": 10, "still": 10, "so": 10, "_use_": [], "pseudo": [], "ahead": [], "easier": [], "commun": 10, "applicationspec": [], "hint": 10, "constant": [5, 10], "hashm": 10, "consult": 10, "find": 10, "miss": [], "resolv": 10, "upon": 10, "simul": 3, "method_nam": 3, "param_nam": 3, "return_type_or_handl": 3, "applicationstateblob": 8, "accountstateblob": 8, "application_blob": 8, "16": 8, "account_blob": 8, "3": 8, "write_acct_blob": 8, "read_acct_blob": 8, "dynamicbyt": 8, "blob": [], "max_byt": 8, "write_app_blob": 8, "read_app_blob": 8, "logicsignatur": [5, 6], "logic_signatur": 5, "templatevari": 5, "templat": [5, 6], "hardcod": 5, "well": 5, "ref": 5, "evaulu": 5, "overridden": 5, "necessari": 5, "lsig": [5, 6], "arbitrari": 5, "get_nam": 5, "present": [5, 6], "has_return": [], "alwai": [], "type_of": [], "suppli": 5, "assign": 5, "signal": 6, "fulli": 6, "prior": 6, "construct": 6, "precompiletemplatevalu": 6, "pc": 6, "is_byt": 6, "line": 6, "bytecod": 6, "template_valu": 6, "populate_templ": 6, "patch": 6, "blank": 6, "same": 6, "populate_template_expr": 6, "template_address": 6, "logicsigtransactionsign": 6, "non": 6, "itself": 6, "offload": 6, "comput": 6, "max": 6, "20k": 6, "op": 6, "700": 6, "start": 8, "stop": 8, "buffer": 8, "read_byt": 8, "idx": 8, "buff": 8, "write_byt": 8, "That": 8, "staticbyt": 10, "defaultargu": [], "serv": 10, "execut": 10, "complex": 10, "than": 10, "abl": 10}, "objects": {"": [[4, 0, 0, "-", "beaker"]], "beaker": [[0, 0, 0, "-", "application"], [2, 0, 0, "-", "contracts"], [3, 0, 0, "-", "decorators"], [5, 0, 0, "-", "logic_signature"], [6, 0, 0, "-", "precompile"]], "beaker.application": [[0, 1, 1, "", "Application"]], "beaker.application.Application": [[0, 2, 1, "", "application_spec"], [0, 2, 1, "", "create"], [0, 2, 1, "", "initialize_account_state"], [0, 2, 1, "", "initialize_application_state"]], "beaker.client": [[1, 1, 1, "", "ApplicationClient"]], "beaker.client.ApplicationClient": [[1, 2, 1, "", "add_method_call"], [1, 2, 1, "", "call"], [1, 2, 1, "", "clear_state"], [1, 2, 1, "", "close_out"], [1, 2, 1, "", "create"], [1, 2, 1, "", "delete"], [1, 2, 1, "", "fund"], [1, 2, 1, "", "get_account_state"], [1, 2, 1, "", "get_application_account_info"], [1, 2, 1, "", "get_application_state"], [1, 2, 1, "", "opt_in"], [1, 2, 1, "", "prepare"], [1, 2, 1, "", "update"]], "beaker.contracts": [[2, 1, 1, "", "OpUp"]], "beaker.contracts.OpUp": [[2, 2, 1, "", "call_opup"], [2, 2, 1, "", "create_opup"], [2, 3, 1, "", "min_balance"], [2, 3, 1, "", "opup_app_id"], [2, 2, 1, "", "opup_bootstrap"]], "beaker.decorators": [[3, 1, 1, "", "Authorize"], [3, 1, 1, "", "MethodHints"], [3, 4, 1, "", "bare_external"], [3, 4, 1, "", "clear_state"], [3, 4, 1, "", "close_out"], [3, 4, 1, "", "create"], [3, 4, 1, "", "delete"], [3, 4, 1, "", "external"], [3, 4, 1, "", "internal"], [3, 4, 1, "", "opt_in"], [3, 4, 1, "", "update"]], "beaker.decorators.Authorize": [[3, 2, 1, "", "holds_token"], [3, 2, 1, "", "only"], [3, 2, 1, "", "opted_in"]], "beaker.decorators.MethodHints": [[3, 3, 1, "", "param_annotations"], [3, 3, 1, "", "read_only"], [3, 3, 1, "", "structs"]], "beaker.logic_signature": [[5, 1, 1, "", "LogicSignature"], [5, 1, 1, "", "TemplateVariable"]], "beaker.logic_signature.LogicSignature": [[5, 2, 1, "", "evaluate"]], "beaker.logic_signature.TemplateVariable": [[5, 2, 1, "", "get_name"]], "beaker.precompile": [[6, 1, 1, "", "Precompile"], [6, 1, 1, "", "PrecompileTemplateValue"]], "beaker.precompile.Precompile": [[6, 2, 1, "", "address"], [6, 2, 1, "", "populate_template"], [6, 2, 1, "", "populate_template_expr"], [6, 2, 1, "", "signer"], [6, 2, 1, "", "template_address"]], "beaker.precompile.PrecompileTemplateValue": [[6, 3, 1, "", "is_bytes"], [6, 3, 1, "", "line"], [6, 3, 1, "", "name"], [6, 3, 1, "", "pc"]], "beaker.sandbox": [[7, 1, 1, "", "SandboxAccount"], [7, 2, 1, "", "add_account"], [7, 2, 1, "", "get_accounts"], [7, 2, 1, "", "get_algod_client"], [7, 2, 1, "", "get_indexer_client"]], "beaker.sandbox.SandboxAccount": [[7, 3, 1, "", "address"], [7, 3, 1, "", "private_key"], [7, 3, 1, "", "signer"]], "beaker.state": [[8, 1, 1, "", "AccountState"], [8, 1, 1, "", "AccountStateBlob"], [8, 1, 1, "", "AccountStateValue"], [8, 1, 1, "", "ApplicationState"], [8, 1, 1, "", "ApplicationStateBlob"], [8, 1, 1, "", "ApplicationStateValue"], [8, 1, 1, "", "DynamicAccountStateValue"], [8, 1, 1, "", "DynamicApplicationStateValue"]], "beaker.state.AccountState": [[8, 2, 1, "", "dictify"], [8, 2, 1, "", "initialize"], [8, 2, 1, "", "schema"]], "beaker.state.AccountStateBlob": [[8, 2, 1, "", "read"], [8, 2, 1, "", "read_byte"], [8, 2, 1, "", "write"], [8, 2, 1, "", "write_byte"]], "beaker.state.AccountStateValue": [[8, 2, 1, "", "delete"], [8, 2, 1, "", "get"], [8, 2, 1, "", "get_else"], [8, 2, 1, "", "get_maybe"], [8, 2, 1, "", "get_must"], [8, 2, 1, "", "is_default"], [8, 2, 1, "", "set"]], "beaker.state.ApplicationState": [[8, 2, 1, "", "dictify"], [8, 2, 1, "", "initialize"], [8, 2, 1, "", "schema"]], "beaker.state.ApplicationStateBlob": [[8, 2, 1, "", "read"], [8, 2, 1, "", "read_byte"], [8, 2, 1, "", "write"], [8, 2, 1, "", "write_byte"]], "beaker.state.ApplicationStateValue": [[8, 2, 1, "", "decrement"], [8, 2, 1, "", "delete"], [8, 2, 1, "", "get"], [8, 2, 1, "", "get_else"], [8, 2, 1, "", "get_maybe"], [8, 2, 1, "", "get_must"], [8, 2, 1, "", "increment"], [8, 2, 1, "", "is_default"], [8, 2, 1, "", "set"]], "beaker.state.DynamicAccountStateValue": [[8, 2, 1, "", "__getitem__"]], "beaker.state.DynamicApplicationStateValue": [[8, 2, 1, "", "__getitem__"]], "beaker.testing": [[9, 1, 1, "", "UnitTestingApp"], [9, 4, 1, "", "assert_output"], [9, 4, 1, "", "get_balances"], [9, 4, 1, "", "get_deltas"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"applic": [0, 1, 8], "client": [1, 7], "full": [1, 8], "exampl": [1, 8], "contract": 2, "util": 2, "opup": 2, "decor": [3, 10], "abi": 3, "method": 3, "extern": 3, "author": 3, "hint": 3, "intern": 3, "bare": 3, "singl": 3, "multipl": 3, "beaker": 4, "instal": 4, "hello": 4, "usag": [4, 10], "indic": 4, "tabl": 4, "sandbox": 7, "account": [7, 8], "algod": 7, "index": 7, "state": [8, 9, 10], "valu": [8, 10], "dynam": 8, "accountstatevalu": 8, "dynamicaccountstatevalu": 8, "test": 9, "unit": 9, "balanc": 9, "check": 9, "tutori": 10, "manag": 10, "inherit": 10, "paramet": 10, "annot": [], "descript": [], "default": 10, "logic": 5, "signatur": 5, "precompil": 6, "blob": 8}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 56}})
\ No newline at end of file
diff --git a/docs/html/usage.html b/docs/html/usage.html
index 465b4d7c..f9fac168 100644
--- a/docs/html/usage.html
+++ b/docs/html/usage.html
@@ -45,8 +45,7 @@
- Tutorial
- Decorators
- State Management
-- Inheritance
-- Parameter Annotations
+- Inheritance
@@ -285,32 +284,25 @@ Usage
Here we subclassed the OpUp
contract which provides functionality to create a new Application on chain and store its app id for subsequent calls to increase budget.
We inherit the methods and class variables that OpUp
defined, allowing us to encapsulate and compose behavior.
-
-
-Parameter Annotations
-
--
-class beaker.decorators.ParameterAnnotation(*, descr: Optional[str] = None, default: Optional[beaker.decorators.DefaultArgument] = None)[source]
-
-
-A caller of our application should be provided with all the information they might need in order to make a successful application call.
-One example of this of information is of course the parameter name and type. These bits of information are already provided by the normal method definition.
+Also note that the opup_app
argument specifies a default value. This is a bit of magic that serves only to produce a hint for the caller in the resulting Application Spec.
Parameter Default Value
-In the OpUp
example the argument opup_app
should be the id of the application that we use to increase our budget via inner app calls. This value should not change frequently, if at all, but is still required to be passed by the caller so we may _use_ it in our logic.
-Using the default
field of the ParameterAnnotation
, we can specify a default value for the parameter.
-This allows the caller to know this pseudo-magic number ahead of time and makes calling your application easier. The information is communicated through the full ApplicationSpec as a hint the caller can use to figure out what the value should be.
+In the OpUp
example above, the argument opup_app
should be the id of the application that we use to increase our budget via inner app calls.
+This value should not change frequently, if at all, but is still required to be passed by the caller so we may use it in our logic, namely to execute an application call against it.
+By specifying the default value of the argument in the method signature, we can communicate to the caller, through the hints of the Application Spec, what the value should be.
Options for default arguments are:
-A constant, bytes | int | str
-State Values, ApplicationStateValue | AccountStateValue
-A read-only ABI method
+A constant: one of bytes | int | str | Bytes | Int
+State Values: one of ApplicationStateValue | AccountStateValue
+A read-only ABI method: a method defined to produce some more complex value than a state value or constant would be able to produce.
-The result is that we can call the method, omitting the opup_app argument:
+The result of specifying the default value here is that we can call the method, omitting the opup_app argument:
result = app_client.call(app.hash_it, input="hashme", iters=10)
-When invoked, the ApplicationClient consults the method definition to check that all the expected arguments are passed. If it finds one missing, it will check for hints for the method that may be resolvable. Upon finding a resolvable it will look up the state value, call the method, or return the constant value. The resolved value is passed in for argument.
+When invoked, the ApplicationClient
consults the method definition to check that all the expected arguments are passed.
+If it finds that an argument is not passed, it will check the hints for a default argument for the method that may be used directly (constant) or resolved (need to look it up on chain or call method).
+Upon finding a resolvable it will look up the state value, call the method. The resulting value is passed in for argument to the application call.
diff --git a/docs/source/usage.rst b/docs/source/usage.rst
index 390f38f2..1bf30440 100644
--- a/docs/source/usage.rst
+++ b/docs/source/usage.rst
@@ -130,42 +130,31 @@ Here we subclassed the ``OpUp`` contract which provides functionality to create
We inherit the methods and class variables that ``OpUp`` defined, allowing us to encapsulate and compose behavior.
-
-.. _parameter_annotations:
-
-Parameter Annotations
----------------------
-
-.. currentmodule:: beaker.decorators
-.. autoclass:: ParameterAnnotation
- :members:
-
-
-A caller of our application should be provided with all the information they might need in order to make a successful application call.
-
-One example of this of information is of course the parameter name and type. These bits of information are already provided by the normal method definition.
+Also note that the ``opup_app`` argument specifies a default value. This is a bit of magic that serves only to produce a hint for the caller in the resulting Application Spec.
.. _parameter_default:
Parameter Default Value
^^^^^^^^^^^^^^^^^^^^^^^
-In the ``OpUp`` example the argument ``opup_app`` should be the id of the application that we use to increase our budget via inner app calls. This value should not change frequently, if at all, but is still required to be passed by the caller so we may _use_ it in our logic.
+In the ``OpUp`` example above, the argument ``opup_app`` should be the id of the application that we use to increase our budget via inner app calls.
+This value should not change frequently, if at all, but is still required to be passed by the caller so we may **use** it in our logic, namely to execute an application call against it.
-Using the ``default`` field of the ``ParameterAnnotation``, we can specify a default value for the parameter.
-
-This allows the caller to know this pseudo-magic number ahead of time and makes calling your application easier. The information is communicated through the full ApplicationSpec as a hint the caller can use to figure out what the value should be.
+By specifying the default value of the argument in the method signature, we can communicate to the caller, through the hints of the Application Spec, what the value **should** be.
Options for default arguments are:
-- A constant, `bytes | int | str`
-- State Values, `ApplicationStateValue | AccountStateValue`
-- A read-only ABI method
+- A constant: one of ``bytes | int | str | Bytes | Int``
+- State Values: one of ``ApplicationStateValue | AccountStateValue``
+- A read-only ABI method: a method defined to produce some more complex value than a state value or constant would be able to produce.
+
-The result is that we can call the method, omitting the `opup_app` argument:
+The result of specifying the default value here is that we can call the method, omitting the `opup_app` argument:
.. code-block:: python
result = app_client.call(app.hash_it, input="hashme", iters=10)
-When invoked, the `ApplicationClient` consults the method definition to check that all the expected arguments are passed. If it finds one missing, it will check for hints for the method that may be resolvable. Upon finding a resolvable it will look up the state value, call the method, or return the constant value. The resolved value is passed in for argument.
\ No newline at end of file
+When invoked, the ``ApplicationClient`` consults the method definition to check that all the expected arguments are passed.
+If it finds that an argument is not passed, it will check the hints for a default argument for the method that may be used directly (constant) or resolved (need to look it up on chain or call method).
+Upon finding a resolvable it will look up the state value, call the method. The resulting value is passed in for argument to the application call.
\ No newline at end of file