All - Activity - cotunho - Algorand

Exponential and Logarithm Operations

Hi everybody, I’m writing a smart contract stateful in PyTeal in which I have to implement some operations, including the power and logarithm operation. It’s known that it isn’t possible to use loops in PyTeal, but which can be an arithmetic alternative to implement power and logarithm?


Approval Program's Length

Where can I get the email?


I use negative_t, t and h in other function call too, so I don’t think these can be a real problem. If for you is ok, I can send you the whole project, because I split functions in different files.


I noticed one thing: my compiled file with the approval program is 1 KB dimension until I don’t add this call: x = calculate_and_check_negative5(negative_t, t, h) that referred to this: def calculate_and_check_negative5(negative: Expr, a: Expr, b: Expr) -> TealType.uint64: return If (Eq(negative, ...


I know everything involved in smart contract is public, but I don’t pass the biometrics in clear, so I don’t think there is some problem. The real problem is to know if it is possible to develop a complex logic using smart contract, considering all these problem.


Actually my work is bachelor’s degree project, in which I try to implement an authentication system, based on biometrics, in-chain. So I tried to manage negative or float values, to avoid using of loops (repeating body n times) and so on. My logic is (I think) too complex to run in-chain (this is w...


What do you mean with ? I’m not very practical with contracts and apps in this platform. I’m using a program like this: PyTeal Examples — PyTeal documentation, so the only thing I’m using is an application defined by approval program. I can’t understand the difference between application and con...


Globalget and Globalput Function in PyTeal and Branching IF

My code is in an approval_program function, so my last call is compiled = compileTeal(approval_program(), Mode.Application)


I’m writing a smart contract in PyTeal, so an approval program and a clear program. After I added some functions, I got this error: invalid: approval program too long. max len 1024 bytes, that let me think approval program couldn’t be longer. For me that’s a problem because I have to add so many l...


Through dryrun I get this error: invalid: 33 app_global_get not allowed in current mode. I hope I’ve used dry run in the right way.


Hi everybody, I have a problem in a Smart Contract: because of some operations, I could have some negative values, so, to avoid this problem, for any operations, like x = v1-h I want the absolute value. So, using the function globalput and globalget, I tried this: If(Lt(v1, h), App.globalPut(...


Arithmetic Operations in Teal (PyTeal)

Hi everybody, I’m writing a Smart Contract in PyTeal, in which I do some arithmetic operations that could return decimal and negative values. So, what is the variables’ content have negative or decimal values?


Debugger for Smart Contract

Hi everybody, I’m working with Stateless Smart Contract using PyTeal. I need to use a debugger for it, but the only way I found to use a debugger is through tealdgb. My problem is I’m working on Windows, so, if I don’t wrong, I can’t install a node in which I can use toolkit like goal or tealdgb,...


Using of Array in PyTeal

Yes, I need a constant-size array. However, I didn’t understand how I can use byte slices to simulate array.


Hi everybody, I’m working with Smart Contract and so I’m using PyTeal. I need to declare and fill an array. Is it possible? How can I do both in PyTeal? Thank you!


Using Assets in Smart Contracts

Hi everybody, I work on a authentication system project where a user tries to authenticate itself through a Smart Contract I’m writing in PyTeal. So I need to put and to get assets (of user’s identity) located in Blockchain directly in Smart Contract code. Is it possible? How can I do it in PyTeal...


How to Get Arguments in Smart Contract Using PYTEAL

Hi everybody, this is my first approach to TEAL and Smart Contracts, that’s why I’m using PYTEAL to generate TEAL file and so I have some questions.

According to pyteal documentation’s examples (here: PyTeal Examples — PyTeal documentation), I’m trying to put my arguments from my python program ...


Limit of Teal Language

Hi everybody, so I have some doubts about Teal: I have to use Smart Contracts, so code in TEAL, to implement some algorithms that use constructs belonging to more expressive languages (e.g. loop cycle), such as Python. So, my question: which are the limits of language?