All - Activity - danger_dave - Algorand

I was trying to create and deploy a smart contract using pyTEAL following the official guide, but something went wrong

Nov 2, 2021

Perhaps this is it?

#!/usr/bin/env python3

from pyteal import *
import uuid, params, base64
from algosdk import algod, transaction, account, mnemonic
from periodic_payment import periodic_pay_escrow

#------- compile & send transaction using Goal and Python SDK ----------

teal_source = periodic…

Why have both txn.sender() and txn.asset_sender() in PyTEAL?

Oct 21, 2021

Why is there a need for different syntax to check sender/receiver in AssetTransferTxns vs PaymentTxn? I’m not the only one who’s tried to debug their smart contract in PyTEAL only to realize the .sender() field is not valid. There isn’t even an error thrown when you compile with Algod Client!

Can I make a transaction to Tinyman from a logic sig escrow account or a stateful smart contract?

Oct 21, 2021

You can certainly authorize transactions to TinyMan pools using a LogicSig txn or with a stateful smart contract. A good place to get started is with the developer tutorials. I would also recommend asking questions to TinyMan directly on their Discord. Their GitHub repository containing the address…

SOS Lost funds after I access myalgo

Oct 4, 2021

Maybe this post will help? Someone else had a similar issue. I’m almost positive that if there is a bug, it’s with the wallet app, not the entire network…

Escrow stateless smart contract

Sep 24, 2021

Hey isha, Could you be more specific? Smart Contracts are written in TEAL (Transaction Execution Approval Language). There are several examples of stateless smart contracts available to help you learn more here. Some good ones for getting started in Python are:

How to store data on the blockchain and query it?

Aug 6, 2021

Yes! global state seems the best way to track the highest bid. That is a bit trickier! 20.000 bids would rule out the use of global state to track everything, so I think you would have to use the indexer with one of 2 approaches: Store the information in user local storage and query it through t…

Limits on Btoi() in PyTEAL

Jul 15, 2021
Thank you so much! That was extremely helpful!

Limits on Btoi() in PyTEAL

Jul 14, 2021
Great work on those conventions! They sound like an excellent idea! My only worry with following them is that they’ll complicate Btoi(txn.note()) operations. Bringing this full circle to my original question, what would happen if I set note = (123456789098765432100112).to_bytes(8,"big")

Limits on Btoi() in PyTEAL

Jul 14, 2021
Is there an easier way to pass a number through the “note” field of a transaction? Like is this the best one can do: note = '123'.encode()
I found another way to pass a note as a message pack, but I’m not sure if that makes TEAL conversion easier.

import base64
from algosdk import encoding

note =…

Where does "./sandbox goal clerk compile" execute?

Jun 16, 2021
Thank you, fabrice! That works perfectly!

Where does "./sandbox goal clerk compile" execute?

Jun 16, 2021
I’m having trouble compiling “.teal” files using sandbox. The file definitely exists, and I can run other goal commands successfully, like “goal node status”.

[where]

I have tried moving the “.teal” file to the “data” folder but see the same error. Any suggestions?