All - Activity - JasonW - Algorand
TOKEN with an address generated from a Smart Contract creation
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
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
Only if local state is used, which is the only reason to opt an account into a smart contract 🙂
Deploy a stateful contract through a stateful contract
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?
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?
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?
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 way.
Optin to a token through a wallet within the App
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
You logic in the escrow is rejecting the transaction.
State Proofs Current Status?
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.
Stateful vs Stateless smart contracts
There are no plans to add this functionality currently.
Phone directory program. Algorand blockchain as a replacement for a sql table
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
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)?
You should be able to do this.
Maximum input data size for a stateful contract
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
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?
If you just want to setup a testing node, just use sandbox, which can connect to testnet or mainnet. ie ./sandbox up mainnet. get the nodes IP and connect to that IP using port 4001 with algod.
Algorand Smart Contracts Integration
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 publishing such information can be sensitive.
How about automatic payments on a schedule?
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 have that feature.
What format are these Buffers in?
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
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?
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?
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
You need to use the onCompletion field, to get the application subtype. Txn.on_completion() == OnComplete.OptIn
Algoexplorer.io API returning 403 for some calls
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?
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
Algorand uses ed25519 keys. I think KMS supports those but I am not 100% sure.
Question about Stateful Smart Contracts
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)
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.