Available packages:
Algo Builder is also a repository of verified smart contract templates that will speedup your dapp design and development process.
Support us! Algo Builder is a community project and we want to provide the best tool for developing Algorand Dapps! Send us ALGOs to the following address:
QN4LFBXSWN3RHZYDOTCZZBKHGRDNP3FHU4EYBK4OMUIHSA6OQ2MENAWCVI
Check a bare SDK implementaion (it takes approx. 450 LOC). Below snippet demonstrates the same thing using algob in 18x less code:
// Transfer Algo, create "gold" ASA and opt-in
import { executeTx, balanceOf } from '@algo-builder/algob';
import { types } from '@algo-builder/web';
async function run (runtimeEnv, deployer) {
const masterAccount `=` deployer.accountsByName.get('master-account');
const goldOwner `=` deployer.accountsByName.get('alice');
const bob `=` deployer.accountsByName.get('bob');
// transfer ALGO
await deployer.executeTx({
type: types.TransactionType.TransferAlgo,
sign: types.SignType.SecretKey,
fromAccount: masterAccount,
toAccountAddr: goldOwner.addr,
amountMicroAlgos: 5e6, // 5 ALGO
payFlags: { note: 'funding account' }
})
await deployer.deployASA('gold', { creator: goldOwner, totalFee: 1001 });
await deployer.optInAccountToASA('gold', 'bob', {});
}
algob
and
runtime
.
Do you need a help with writing a smart contracts or to audit your code? Contact us: