Replies - Activity - JasonW - Algorand

TOKEN with an address generated from a Smart Contract creation

May 17, 2023

Tokens on Algorand do not require smart contracts. You can read how to create, transfer, etc here: Algorand Standard Assets (ASAs) - Algorand Developer Portal That said if you want to use logic(smart contract) with a token you can do that. Take a look at this ARC: ARCs/arc-0020.md at main · algoran…

Boxes in Inner Transactions

Dec 7, 2022

I understand the use case. Right now you can set 8 box names per outer tx that can be used by the inner tx as well. That said if you are creating the asset in the first call and want to use that with the inner as the box name that is currently not possible as you won’t know beforehand what the id is…

Reserve: Smart contract Opt in

Dec 6, 2022

Only if local state is used, which is the only reason to opt an account into a smart contract.

Boxes in Inner Transactions

Dec 6, 2022

Boxes use the outer tx group for the references. IE you can change whats already available inside an inner tx.

Deploy a stateful contract through a stateful contract

Dec 1, 2022

Why not do something like what is shown in this example: beaker/examples/c2c at master · algorand-devrel/beaker · GitHub

TEAL: How can I supply arguments to an inner transaction?

Sep 28, 2022

Take a look at this: The Algorand Virtual Machine (AVM) and TEAL. - Algorand Developer Portal Just reuse this property itxn_field ApplicationArgs so something like int 5 //first parm itxn_field ApplicationArgs int 6 //second parm

How can I store structs, arrays and mappings in PyTeal?

Sep 21, 2022

On problem 2, most structs, lists, etc can be converted to byte arrays which can be stored in local or global state. That said, writing teal or Pyteal to manipulate or read the structs inside the contract can be difficult. The Beaker project implements some key functionality that makes handling this…

Can you create a dapp with smart contracts written in multiple forms of code?

Sep 16, 2022

Currently dapps(smart contracts) on Algorand are only written with TEAL and many tools convert to teal including PyTeal and Reach, but that has little to do with cross chain dapps. This is one of the reasons Algorand is working on State Proofs, so tokens and other things can cross chains in a decent…

Optin to a token through a wallet within the App

Sep 8, 2022

Take a look at receiving an asset here:

Hi! I'm trying to do an asset transfer using escrow but it's showing me this error

Aug 31, 2022

You logic in the escrow is rejecting the transaction.

State Proofs Current Status?

Aug 9, 2022

We should be posting some state proof initial docs later this week. I believe some of the basic tech is already been merged to master.

Statefull vs Stateless smart contracts

Jul 14, 2022

There are no plans to add this functionality currently.

Phone directory program. Algorand blockchain as a replacement for a sql table

May 25, 2022

Does this data need to be private? You could enter contacts using the notefield on a payment tx and not use smart contracts at all. Use the indexer to look up notes. This tutorial needs to be updated but should give you the general idea.

Use the indexer to search:

indexer.searchForTransactions().limit(10).do() is returning older transactions

Apr 12, 2022

Currently, that is not in the indexer API, but you could go round by round until you got the 1k or write your own query against the indexer DB.

Subroutine for security checks (RekeyTo, AssetCloseTo etc)?

Mar 14, 2022

You should be able to do this.

Maximum input data size for a stateful contract

Feb 18, 2022

You are correct on the 3k and you could group three app transactions in one atomic and access the additional data.

Retrieve the amount of a swap transaction

Feb 11, 2022

Using the Algorand SDKs, if you have the signed or unsigned transactions, you can just loop through them and get the txids. for unsigned something like: txids = [tx.get_txid() for tx in grouped_txns] For signed: txids = [tx.txn.get_txid() for tx in signed_txns]

Private network - node accessible from another VM within network or remotely?

Feb 11, 2022

If you just want to setup a testing node, just use sandbox, which can connect to testnet or mainnet. ie ./sandbox up mainnet.

Algorand Smart Contracts Integration

Feb 9, 2022

We just finished up the base ABI which is basically a way (in JSON) for a smart contract creator to describe the contract. Without this users of the contract have to read the contract code. The SDK now has support for reading these ABI JSON files and invoking the method. That said, giving out or pub…

How about automatic payments on a schedule?

Jan 28, 2022

Smart Signatures are written in TEAL or Python (using Pyteal) just like smart contracts but they are evaluated when they are submitted. Smart contracts “live” on the blockchain. Rounds happen approx every 4.5 seconds. Smart contracts can get the time of the last round but smart signatures don’t yet …

What format are these Buffers in?

Jan 5, 2022

Those are the address bytes. You should be able to get the string address using something like: const rec = algosdk.encodeAddress(confirmation.txn.txn.rcv); or for an asset const rec = algosdk.encodeAddress(confirmation.txn.txn.arcv);

Handling multiple Algorand accounts that deals with internal transfer

Jan 5, 2022

Without knowing more details its a bit hard to comment. Your solution seems very plausible though.

Is it possible to tell if an account already opt-in to an ASA?

Jan 5, 2022

Opcodes - Algorand Developer Portal returns two values, The first is 1/0 depending on if the user opted into the asset and the second value is the balance of that asset.

Does the JS SDK support BigInt or not?

Jan 4, 2022

I totally missed the issue you were having. The JS SDK has an issue handling larger assetid/appid numbers than 2^53. This will be fixed in the future. It will be a long time before it matters (>10,000 years), so for now you are pretty safe just using number.

Checking the Txn.type_enum() during Optin

Jan 4, 2022

You need to use the onCompletion field, to get the application subtype.

Algoexplorer.io API returning 403 for some calls

Jan 4, 2022

Algoexplorer is deprecating some calls for performance reasons. Here is the list of available calls now AlgoExplorer API v2 , If you want to use this call, it’s best to set up your own node.

Does the JS SDK support BigInt or not?

Jan 4, 2022

Can you try something like the following (note the let totalIssuance = BigInt(‘18446744073709551615’)!😜 let params = await client.getTransactionParams().do(); params.fee = 1000; params.flatFee = true; let note = undefined; // Asset creation specific parameters // The following parameters are asset sp…

AWS KMS with Algorand

Dec 20, 2021

Algorand uses ed25519 keys. I think KMS supports those but I am not 100% sure.

Question about Stateful Smart Contracts

Oct 27, 2021

Currently, assets or algos can only leave a smart contract with an inner tx.

How to find error line number in PyTEAL/TEAL? (developer experience)

Sep 21, 2021

Tealdbg is pretty simple to use but you can also do a dryrun using goal like ./goal clerk dryrun -t signed.tx Where signed.tx is the outputted signed transaction or group of transactions.

Python getting suggested_fee in v2

Aug 25, 2021

params in the following code contains a min_fee property that you can examine.