-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: see 1.0 migration guide at https://algorand-devrel.github.io/beaker/html/migration.html
- Loading branch information
Showing
52 changed files
with
1,994 additions
and
796 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
Application | ||
============ | ||
|
||
.. warning:: Out of date, needs to be updated to 1.0 | ||
|
||
.. module:: beaker.application | ||
|
||
This is the base class that all Beaker Applications should inherit from. | ||
|
||
This class should **not** be initialized directly. | ||
This is the class that should be initialized for all Beaker Applications. | ||
|
||
.. autoclass:: Application | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. _boxes: | ||
|
||
Boxes | ||
===== | ||
|
||
.. currentmodule:: beaker.lib.storage | ||
|
||
Applications that need to maintain a large amount of state can use ``Box`` data storage. | ||
|
||
:ref:`Full Example <box_example>` | ||
|
||
While ``PyTeal`` provides the basic tools for working with boxes, ``Beaker`` provides a few handy abstractions for working with them. | ||
|
||
.. _mapping: | ||
|
||
|
||
BoxMapping | ||
---------- | ||
|
||
A ``BoxMapping`` provides a way to store data with a given key. | ||
|
||
.. warning:: | ||
Care should be taken to ensure if multiple ``BoxMapping`` types are used, there is no overlap with keys. If there may be overlap, a ``prefix`` argument *MUST* be set in order to provide a unique namespace. | ||
|
||
.. autoclass:: BoxMapping | ||
:members: | ||
|
||
.. _listing: | ||
|
||
BoxList | ||
------- | ||
|
||
A ``BoxList`` provides a way to store some number of some _static_ abi type. | ||
|
||
.. note:: | ||
Since the ``BoxList`` uses the size of the element to compute the offset into the box, the data type *MUST* be static. | ||
|
||
.. autoclass:: BoxList | ||
:members: | ||
|
||
.. _box_example: | ||
|
||
Full Example | ||
------------ | ||
|
||
.. literalinclude:: ../../examples/boxen/application.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.