Skip to content

Commit

Permalink
fix: remove demo method from readme
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin committed Mar 9, 2023
1 parent 24ff36e commit 6da6f55
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,28 @@ def hello(name: abi.String, *, output: abi.String) -> Expr:
return output.set(Concat(Bytes("Hello, "), name.get()))


def demo() -> None:
# Create an Application client
app_client = client.ApplicationClient(
# Get sandbox algod client
client=sandbox.get_algod_client(),
# Pass instance of app to client
app=hello_app,
# Get acct from sandbox and pass the signer
signer=sandbox.get_accounts().pop().signer,
)

# Deploy the app on-chain
app_id, app_addr, txid = app_client.create()
print(
f"""Deployed app in txid {txid}
App ID: {app_id}
Address: {app_addr}
"""
)

# Call the `hello` method
result = app_client.call(hello, name="Beaker")
print(result.return_value) # "Hello, Beaker"
# Create an Application client
app_client = client.ApplicationClient(
# Get sandbox algod client
client=sandbox.get_algod_client(),
# Pass instance of app to client
app=hello_app,
# Get acct from sandbox and pass the signer
signer=sandbox.get_accounts().pop().signer,
)

# Deploy the app on-chain
app_id, app_addr, txid = app_client.create()
print(
f"""Deployed app in txid {txid}
App ID: {app_id}
Address: {app_addr}
"""
)

# Call the `hello` method
result = app_client.call(hello, name="Beaker")
print(result.return_value) # "Hello, Beaker"

```

Expand Down

0 comments on commit 6da6f55

Please sign in to comment.