Skip to content

Commit

Permalink
adding more readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin committed Oct 20, 2022
1 parent 40eca33 commit 99affcd
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 205 deletions.
7 changes: 7 additions & 0 deletions examples/account_storage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Account Storage Example
-----------------------

This example is meant to demonstrate the usage of a ``Precompile`` for a ``LogicSignature`` to extend the applications storage.


See the comments inline for detailed information about what each line is doing.
7 changes: 7 additions & 0 deletions examples/c2c/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Contract To Contract Example
-----------------------------


This demo is meant to show the use of both a ``Precompile`` for an ``Application`` and the ease of making Contract to Contract calls using the method signature provided by the ``Application`` method using the `get_method_signature` method provided by `Beaker`.

Additionally, this also shows the use of the `unfunded senders` feature since the sub application is never funded but over the course of a single transaction opts in to an asset, receives it, and closes out of the asset.
6 changes: 6 additions & 0 deletions examples/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Application Client Example
--------------------------

The Application Client is a very convenient way to provide the most common interactions with an Application.

This example is meant to demonstrate some of those.
9 changes: 8 additions & 1 deletion examples/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
sandbox,
consts,
)
from beaker.client.application_client import ApplicationClient
from beaker.client.logic_error import LogicException


Expand Down Expand Up @@ -115,10 +116,16 @@ def demo():
app_client2.call(ClientExample.set_manager, new_manager=acct1.address)
print(f"Current app state: {app_client1.get_application_state()}")


## Create a new client that just sets the app id we wish to interact with
app_client3 = ApplicationClient(
client=sandbox.get_algod_client(), app=ClientExample(), signer=acct1.signer, app_id=app_client1.app_id
)

try:
app_client1.close_out()
app_client2.close_out()
app_client1.delete()
app_client3.delete()
except Exception as e:
print(e)

Expand Down
1 change: 0 additions & 1 deletion examples/jackpot/Jackpot.json

This file was deleted.

35 changes: 0 additions & 35 deletions examples/jackpot/application.py

This file was deleted.

128 changes: 0 additions & 128 deletions examples/jackpot/approval.teal

This file was deleted.

3 changes: 0 additions & 3 deletions examples/jackpot/clear.teal

This file was deleted.

1 change: 0 additions & 1 deletion examples/jackpot/contract.json

This file was deleted.

36 changes: 0 additions & 36 deletions examples/jackpot/main.py

This file was deleted.

0 comments on commit 99affcd

Please sign in to comment.