/* eslint-disable */ /** * This file was automatically generated by @algorandfoundation/algokit-client-generator. * DO NOT MODIFY IT BY HAND. * requires: @algorandfoundation/algokit-utils: ^7 */ import { type AlgorandClient } from '@algorandfoundation/algokit-utils/types/algorand-client' import { ABIReturn, AppReturn, SendAppTransactionResult } from '@algorandfoundation/algokit-utils/types/app' import { Arc56Contract, getArc56ReturnValue, getABIStructFromABITuple } from '@algorandfoundation/algokit-utils/types/app-arc56' import { AppClient as _AppClient, AppClientMethodCallParams, AppClientParams, AppClientBareCallParams, CallOnComplete, AppClientCompilationParams, ResolveAppClientByCreatorAndName, ResolveAppClientByNetwork, CloneAppClientParams, } from '@algorandfoundation/algokit-utils/types/app-client' import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions, RawSimulateOptions, SkipSignaturesSimulateOptions } from '@algorandfoundation/algokit-utils/types/composer' import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction' import { Address, encodeAddress, modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk' export const APP_SPEC: Arc56Contract = {"name":"FirstStage","structs":{"AssetInformation":[{"name":"adminWallet","type":"address"},{"name":"mainPool","type":"address"},{"name":"projectTaxBps","type":"uint64"},{"name":"burnTaxBps","type":"uint64"},{"name":"reflectionTaxBps","type":"uint64"},{"name":"freezeTaxBps","type":"uint64"},{"name":"liquidityTaxBps","type":"uint64"},{"name":"liquidityTarget","type":"address"},{"name":"freezeRewardBps","type":"uint64"},{"name":"maxFreezeReward","type":"uint64"},{"name":"liquidityDepositBps","type":"uint64"},{"name":"reflectionTokenIndex","type":"uint64"},{"name":"reflectionAlgoIndex","type":"uint64"},{"name":"eligibleForReflectionsTotal","type":"uint64"},{"name":"freezeRewardsAvailable","type":"uint64"},{"name":"reflectionsTokensAvailable","type":"uint64"},{"name":"reflectionsAlgoAvailable","type":"uint64"},{"name":"minimumReflections","type":"uint64"},{"name":"tokensCollected","type":"uint64"},{"name":"algoCollected","type":"uint64"},{"name":"pendingProjectTax","type":"uint64"},{"name":"pendingLiquidityTax","type":"uint64"},{"name":"buyTax","type":"bool"},{"name":"sellTax","type":"bool"},{"name":"taxesInAlgo","type":"bool"}],"ExemptApp":[{"name":"note","type":"string"},{"name":"interactionWhitelistable","type":"bool"}],"ExemptWallet":[{"name":"note","type":"string"},{"name":"interactionWhitelistable","type":"bool"}],"PotentialApp":[{"name":"depositor","type":"address"},{"name":"deposit","type":"uint64"},{"name":"expiry","type":"uint64"},{"name":"asset","type":"uint64"}],"UserAssetInfo":[{"name":"latestReflectionTokenIndex","type":"uint64"},{"name":"latestReflectionAlgoIndex","type":"uint64"},{"name":"pendingReflectionsTokens","type":"uint64"},{"name":"pendingReflectionsAlgo","type":"uint64"},{"name":"claimableFreezeRewards","type":"uint64"},{"name":"registeredBalance","type":"uint64"}]},"methods":[{"name":"set_global_state","args":[{"type":"uint64","name":"protocol_fee_bps"},{"type":"uint64","name":"total_max_tax_bps"},{"type":"uint64","name":"pool_app_id"},{"type":"uint64","name":"evidence_time"},{"type":"uint64","name":"evidence_deposit"},{"type":"uint64","name":"current_lp_app"},{"type":"uint64","name":"previous_lp_app"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"exempt_wallet","args":[{"type":"uint64","name":"scope"},{"type":"account","name":"address"},{"type":"uint64","name":"whitelist"},{"type":"string","name":"note"},{"type":"pay","name":"payment"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"unfreeze_exempt_wallet","args":[{"type":"account","name":"address"},{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"add_exempt_app","args":[{"type":"uint64","name":"scope"},{"type":"uint64","name":"whitelist"},{"type":"uint64","name":"app_id"},{"type":"string","name":"note"},{"type":"pay","name":"payment"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"remove_exempt_wallet","args":[{"type":"uint64","name":"scope"},{"type":"account","name":"address"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"remove_exempt_app","args":[{"type":"uint64","name":"scope"},{"type":"uint64","name":"app_id"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"global_admin_reset","args":[{"type":"account","name":"global_admin"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"desc":"Allows the contract creator to reset the global admin account.\nArgs: global_admin (Account): sets the administrator wallet for this contract.","events":[],"recommendations":{}},{"name":"project_admin_reset","args":[{"type":"account","name":"project_admin"},{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"desc":"Allows the asset admin to reset a new admin account.\nArgs: project_admin (Account): sets the administrator wallet for this asset.","events":[],"recommendations":{}},{"name":"register_asa","args":[{"type":"asset","name":"asset"},{"type":"pay","name":"payment"},{"type":"uint64","name":"project_tax_bps"},{"type":"uint64","name":"burn_tax_bps"},{"type":"uint64","name":"reflection_tax_bps"},{"type":"uint64","name":"freeze_tax_bps"},{"type":"uint64","name":"liquidity_tax_bps"},{"type":"uint64","name":"freeze_reward_bps"},{"type":"uint64","name":"max_freeze_reward"},{"type":"uint64","name":"liquidity_deposit_bps"},{"type":"uint64","name":"minimum_reflections"},{"type":"uint64","name":"tax_case"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"reconfigure_asset","args":[{"type":"asset","name":"asset"},{"type":"account","name":"project_tax_account"},{"type":"uint64","name":"project_tax_bps"},{"type":"uint64","name":"burn_tax_bps"},{"type":"uint64","name":"reflection_tax_bps"},{"type":"uint64","name":"liquidity_tax_bps"},{"type":"account","name":"liquidity_target"},{"type":"uint64","name":"freeze_tax_bps"},{"type":"uint64","name":"freeze_reward_bps"},{"type":"uint64","name":"max_freeze_reward"},{"type":"uint64","name":"liquidity_deposit_bps"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"switch_tax_mode","args":[{"type":"asset","name":"asset"},{"type":"uint64","name":"tax_mode"},{"type":"account","name":"main_pool"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"freeze","args":[{"type":"asset","name":"asset"},{"type":"account","name":"refreeze_address"},{"type":"pay","name":"mbr"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"desc":"A method that is used to refreeze addresses.","events":[],"recommendations":{}},{"name":"general_operations_top","args":[{"type":"uint64","name":"flagtop"},{"type":"asset","name":"asset"},{"type":"uint64","name":"user_balance"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"general_operations_bottom","args":[{"type":"uint64","name":"flag_bottom"},{"type":"asset","name":"asset"},{"type":"axfer","name":"tax_txn"},{"type":"account","name":"referall_address"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"send_to_frozen_top","args":[{"type":"uint64","name":"flagtop"},{"type":"asset","name":"asset"},{"type":"uint64","name":"sender_balance"},{"type":"account","name":"receiver_account"},{"type":"uint64","name":"receiver_balance"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"send_to_frozen_bottom","args":[{"type":"uint64","name":"flag_bottom"},{"type":"asset","name":"asset"},{"type":"axfer","name":"tax_txn"},{"type":"account","name":"referall_address"},{"type":"account","name":"receiver_account"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"whitelisted_app_top","args":[{"type":"uint64","name":"flagtop"},{"type":"asset","name":"asset"},{"type":"uint64","name":"application_id"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"whitelisted_app_bottom","args":[{"type":"uint64","name":"flagbottom"},{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"liquidity_top","args":[{"type":"uint64","name":"flag_top"},{"type":"asset","name":"asset"},{"type":"asset","name":"lpasset"},{"type":"uint64","name":"user_balance"},{"type":"uint64","name":"user_lp_balance"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"liquidity_bottom","args":[{"type":"uint64","name":"flagbottom"},{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"add_algo_rewards","args":[{"type":"asset","name":"asset"},{"type":"pay","name":"payment"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"add_asa_rewards","args":[{"type":"asset","name":"asset"},{"type":"uint64","name":"type"},{"type":"axfer","name":"reward_txn"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"exempt_app_approval","args":[{"type":"uint64","name":"application_id"},{"type":"asset","name":"asset"},{"type":"string","name":"note"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"exempt_or_whitelist_app","args":[{"type":"uint64","name":"application_id"},{"type":"asset","name":"asset"},{"type":"string","name":"note"},{"type":"pay","name":"mbr"},{"type":"uint64","name":"mode"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"claim_reflections","args":[{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"claim_freeze_rewards","args":[{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"add_pending_lp","args":[{"type":"asset","name":"asset"}],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"check_is_address_exempt","args":[{"type":"account","name":"address"},{"type":"asset","name":"asset"}],"returns":{"type":"bool"},"actions":{"create":[],"call":["NoOp"]},"readonly":true,"events":[],"recommendations":{}},{"name":"check_is_address_maybe_exempt_app","args":[{"type":"account","name":"address"},{"type":"asset","name":"asset"}],"returns":{"type":"bool"},"actions":{"create":[],"call":["NoOp"]},"readonly":true,"events":[],"recommendations":{}},{"name":"check_app_status","args":[{"type":"uint64","name":"app_id"}],"returns":{"type":"(bool,bool)"},"actions":{"create":[],"call":["NoOp"]},"readonly":true,"events":[],"recommendations":{}},{"name":"check_lp_deposit_bps","args":[{"type":"asset","name":"asset"}],"returns":{"type":"uint64"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"increase_budget","args":[],"returns":{"type":"void"},"actions":{"create":[],"call":["NoOp"]},"readonly":false,"events":[],"recommendations":{}},{"name":"get_reflection_preview","args":[{"type":"asset","name":"asset"},{"type":"account","name":"user"}],"returns":{"type":"(uint64,uint64)"},"actions":{"create":[],"call":["NoOp"]},"readonly":true,"events":[],"recommendations":{}}],"arcs":[22,28],"networks":{},"state":{"schema":{"global":{"ints":8,"bytes":2},"local":{"ints":0,"bytes":0}},"keys":{"global":{"global_admin":{"keyType":"AVMString","valueType":"address","key":"Z2xvYmFsX2FkbWlu"},"global_burn_wallet":{"keyType":"AVMString","valueType":"address","key":"Z2xvYmFsX2J1cm5fd2FsbGV0"},"pool_app_id":{"keyType":"AVMString","valueType":"AVMUint64","key":"cG9vbF9hcHBfaWQ="},"protocol_fee_bps":{"keyType":"AVMString","valueType":"AVMUint64","key":"cHJvdG9jb2xfZmVlX2Jwcw=="},"evidence_time":{"keyType":"AVMString","valueType":"AVMUint64","key":"ZXZpZGVuY2VfdGltZQ=="},"evidence_deposit":{"keyType":"AVMString","valueType":"AVMUint64","key":"ZXZpZGVuY2VfZGVwb3NpdA=="},"total_max_tax_bps":{"keyType":"AVMString","valueType":"AVMUint64","key":"dG90YWxfbWF4X3RheF9icHM="},"total_launched_asas":{"keyType":"AVMString","valueType":"AVMUint64","key":"dG90YWxfbGF1bmNoZWRfYXNhcw=="},"current_lp_deposit_app":{"keyType":"AVMString","valueType":"AVMUint64","key":"Y3VycmVudF9scF9kZXBvc2l0X2FwcA=="},"previous_lp_deposit_app":{"keyType":"AVMString","valueType":"AVMUint64","key":"cHJldmlvdXNfbHBfZGVwb3NpdF9hcHA="}},"local":{},"box":{}},"maps":{"global":{},"local":{},"box":{"registered_asset":{"keyType":"uint64","valueType":"AssetInformation","prefix":"YQ=="},"exempted_wallet":{"keyType":"address","valueType":"ExemptWallet","prefix":"Zw=="},"exempted_wallet_rekeyed":{"keyType":"address","valueType":"ExemptWallet","prefix":"cg=="},"exempted_app_deployer":{"keyType":"address","valueType":"ExemptWallet","prefix":"ZA=="},"exempted_app_id":{"keyType":"uint64","valueType":"ExemptApp","prefix":"aQ=="},"exempted_app_approval":{"keyType":"AVMBytes","valueType":"ExemptApp","prefix":"cQ=="},"user_asset_info":{"keyType":"AVMBytes","valueType":"UserAssetInfo","prefix":""},"potential_exempt_app":{"keyType":"address","valueType":"PotentialApp","prefix":"aA=="}}}},"bareActions":{"create":["NoOp"],"call":["UpdateApplication"]},"sourceInfo":{"approval":{"sourceInfo":[{"pc":[6628],"errorMessage":"Address is not a whitelisted dapp"},{"pc":[4429],"errorMessage":"Address is not exempt"},{"pc":[7367],"errorMessage":"App is not exempt"},{"pc":[7456],"errorMessage":"App is not interaction_whitelistable"},{"pc":[6846],"errorMessage":"Asset balances do not match"},{"pc":[4864],"errorMessage":"Asset has too few units"},{"pc":[4826],"errorMessage":"Caller is not project admin"},{"pc":[5281],"errorMessage":"Cannot adjust total tax post launch"},{"pc":[4238],"errorMessage":"Cannot be more than 100%"},{"pc":[6486],"errorMessage":"Cannot send to self to avoid unneeded taxes"},{"pc":[6210,6383,6621,6824],"errorMessage":"Duplicate top found"},{"pc":[1776,2784,3724,4820,5206,5460,5646,5674,5789,5959,7093,7134,7883,7938],"errorMessage":"Index access is out of bounds"},{"pc":[3635],"errorMessage":"Insufficient tax payment"},{"pc":[4370,4550,4681,4752],"errorMessage":"Invalid global exemption scope"},{"pc":[7453],"errorMessage":"Invalid mode"},{"pc":[6697],"errorMessage":"Invalid transfer detected"},{"pc":[4437],"errorMessage":"Is already unfrozen"},{"pc":[5492,5706],"errorMessage":"Is not a valid pool"},{"pc":[6868],"errorMessage":"LP balances do not match"},{"pc":[4966,5294],"errorMessage":"LP deposit cannot exceed total max tax + 5%"},{"pc":[4970,5298],"errorMessage":"LP deposit must be higher than total tax"},{"pc":[5755],"errorMessage":"MBR to wrong address"},{"pc":[4979],"errorMessage":"Manager must be this app"},{"pc":[6200,6373,6611,6814],"errorMessage":"Matching bottom transaction not found"},{"pc":[6271,6480,6755,6943],"errorMessage":"Matching top transaction not found"},{"pc":[6364],"errorMessage":"Mismatched receiver balance"},{"pc":[6360],"errorMessage":"Mismatched sender balance"},{"pc":[6190],"errorMessage":"Mismatched user balance"},{"pc":[6990],"errorMessage":"No one to reward"},{"pc":[6895],"errorMessage":"No valid LP intermediate call found"},{"pc":[601,635,644,668,704,738,772,790,808,826,868,896,928,956,978,1014,1036,1062,1106,1142,1180,1206,1240,1268,1330,1398,1422,1440,1460,1482,1522,1546,1588],"errorMessage":"OnCompletion is not NoOp"},{"pc":[4191],"errorMessage":"Only the creator can update the contract."},{"pc":[6976,7074],"errorMessage":"Payment must be to this address"},{"pc":[7351],"errorMessage":"Payment must be to this app"},{"pc":[4851],"errorMessage":"Payment ransaction was not to the correct address"},{"pc":[6391],"errorMessage":"Receiver's asset is not frozen"},{"pc":[5011],"errorMessage":"Sender must be asset creator or global admin"},{"pc":[6261,6469],"errorMessage":"Tax receiver must be this app"},{"pc":[5212,5652],"errorMessage":"The caller of this method must be the asset admin"},{"pc":[7139],"errorMessage":"There is no one to receive the reflections"},{"pc":[5747],"errorMessage":"This address is immune from freeze"},{"pc":[5020,5194],"errorMessage":"This contract must be the freeze account"},{"pc":[1660],"errorMessage":"This method is reserved for the global admin address."},{"pc":[4953],"errorMessage":"Total max tax exceeded"},{"pc":[6253,6461],"errorMessage":"Wrong asset transfered as tax"},{"pc":[6179,6245,6341,6453,6600,6745],"errorMessage":"Wrong flag"},{"pc":[6933],"errorMessage":"Wrong flag identified"},{"pc":[6140],"errorMessage":"You need to put up a deposit for this address"},{"pc":[5320],"errorMessage":"You should remove the tax BPS if you are also removing your tax address"},{"pc":[1675,1760,1809,1820,1833,1853,1861,1871,2920,3006,4176,4252,4483,4615,4634,4702,4723,5025,5483,5697,5760,7343],"errorMessage":"account funded"},{"pc":[2263,2612,4436,5874,5997,6007,6186,6282,6348,6355,6497,6506,6842,6864],"errorMessage":"account opted into asset"},{"pc":[1899,4555,4757,5490,5704,6655,7246,7251,7338],"errorMessage":"application exists"},{"pc":[1789,3129,3141,3168,3183,4856,4922,4975,4989,5016,5190,5303,5326,5331,5360,5370,5388,5398,5974],"errorMessage":"asset exists"},{"pc":[1641],"errorMessage":"can only call when creating"},{"pc":[604,638,647,671,707,741,775,793,811,829,871,899,931,959,981,1017,1039,1065,1109,1145,1183,1209,1243,1271,1333,1401,1425,1443,1463,1485,1525,1549,1591,1646],"errorMessage":"can only call when not creating"},{"pc":[6887],"errorMessage":"check self.current_lp_deposit_app exists"},{"pc":[6136],"errorMessage":"check self.evidence_deposit exists"},{"pc":[6151],"errorMessage":"check self.evidence_time exists"},{"pc":[1916],"errorMessage":"check self.exempted_app_deployer entry exists"},{"pc":[1955],"errorMessage":"check self.exempted_app_id entry exists"},{"pc":[1658,3455,3482,4775,4800,4997],"errorMessage":"check self.global_admin exists"},{"pc":[3052,8007],"errorMessage":"check self.global_burn_wallet exists"},{"pc":[2809,2823,2846,2859,2872,2926,5487,5701,7892,7905,7918,7931,7944,7998],"errorMessage":"check self.pool_app_id exists"},{"pc":[5788,5796,5803,7426],"errorMessage":"check self.potential_exempt_app entry exists"},{"pc":[6873],"errorMessage":"check self.previous_lp_deposit_app exists"},{"pc":[3667],"errorMessage":"check self.protocol_fee_bps exists"},{"pc":[1741,2256,2448,2468,2507,2531,2563,2622,2643,2683,2783,3091,3102,3119,3227,3261,3283,3303,3349,3371,3391,3516,3759,3771,3837,3857,3963,4067,4097,4819,4829,5205,5218,5428,5453,5473,5510,5532,5554,5580,5602,5628,5645,5664,5673,5687,5720,5852,5859,5917,5929,5940,5958,6014,6028,6046,6091,6927,6986,6993,7009,7019,7025,7042,7083,7118,7178,7191,7508,7544,7589,7609,7775,7856,7874,7881,8110,8170],"errorMessage":"check self.registered_asset entry exists"},{"pc":[5170],"errorMessage":"check self.total_launched_asas exists"},{"pc":[4951,4958,5286],"errorMessage":"check self.total_max_tax_bps exists"},{"pc":[2267,2286,2294,2314,2434,2496,2515,2553,2571,2593,2697,4050,6103,6114,7691,7701,7721,7737,7757,7838],"errorMessage":"check self.user_asset_info entry exists"},{"pc":[919,1085,1165],"errorMessage":"transaction type is axfer"},{"pc":[855,947,1231,1349,1513,1579],"errorMessage":"transaction type is pay"}],"pcOffsetMethod":"none"},"clear":{"sourceInfo":[],"pcOffsetMethod":"none"}},"events":[]} as unknown as Arc56Contract /** * A state record containing binary data */ export interface BinaryState { /** * Gets the state value as a Uint8Array */ asByteArray(): Uint8Array | undefined /** * Gets the state value as a string */ asString(): string | undefined } class BinaryStateValue implements BinaryState { constructor(private value: Uint8Array | undefined) {} asByteArray(): Uint8Array | undefined { return this.value } asString(): string | undefined { return this.value !== undefined ? Buffer.from(this.value).toString('utf-8') : undefined } } /** * Expands types for IntelliSense so they are more human readable * See https://stackoverflow.com/a/69288824 */ export type Expand = T extends (...args: infer A) => infer R ? (...args: Expand) => Expand : T extends infer O ? { [K in keyof O]: O[K] } : never // Type definitions for ARC-56 structs export type AssetInformation = { adminWallet: string, mainPool: string, projectTaxBps: bigint, burnTaxBps: bigint, reflectionTaxBps: bigint, freezeTaxBps: bigint, liquidityTaxBps: bigint, liquidityTarget: string, freezeRewardBps: bigint, maxFreezeReward: bigint, liquidityDepositBps: bigint, reflectionTokenIndex: bigint, reflectionAlgoIndex: bigint, eligibleForReflectionsTotal: bigint, freezeRewardsAvailable: bigint, reflectionsTokensAvailable: bigint, reflectionsAlgoAvailable: bigint, minimumReflections: bigint, tokensCollected: bigint, algoCollected: bigint, pendingProjectTax: bigint, pendingLiquidityTax: bigint, buyTax: boolean, sellTax: boolean, taxesInAlgo: boolean } /** * Converts the ABI tuple representation of a AssetInformation to the struct representation */ export function AssetInformationFromTuple(abiTuple: [string, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean, boolean, boolean]) { return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.AssetInformation, APP_SPEC.structs) as AssetInformation } export type ExemptApp = { note: string, interactionWhitelistable: boolean } /** * Converts the ABI tuple representation of a ExemptApp to the struct representation */ export function ExemptAppFromTuple(abiTuple: [string, boolean]) { return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.ExemptApp, APP_SPEC.structs) as ExemptApp } export type ExemptWallet = { note: string, interactionWhitelistable: boolean } /** * Converts the ABI tuple representation of a ExemptWallet to the struct representation */ export function ExemptWalletFromTuple(abiTuple: [string, boolean]) { return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.ExemptWallet, APP_SPEC.structs) as ExemptWallet } export type PotentialApp = { depositor: string, deposit: bigint, expiry: bigint, asset: bigint } /** * Converts the ABI tuple representation of a PotentialApp to the struct representation */ export function PotentialAppFromTuple(abiTuple: [string, bigint, bigint, bigint]) { return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.PotentialApp, APP_SPEC.structs) as PotentialApp } export type UserAssetInfo = { latestReflectionTokenIndex: bigint, latestReflectionAlgoIndex: bigint, pendingReflectionsTokens: bigint, pendingReflectionsAlgo: bigint, claimableFreezeRewards: bigint, registeredBalance: bigint } /** * Converts the ABI tuple representation of a UserAssetInfo to the struct representation */ export function UserAssetInfoFromTuple(abiTuple: [bigint, bigint, bigint, bigint, bigint, bigint]) { return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.UserAssetInfo, APP_SPEC.structs) as UserAssetInfo } /** * The argument types for the FirstStage contract */ export type FirstStageArgs = { /** * The object representation of the arguments for each method */ obj: { 'set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void': { protocolFeeBps: bigint | number totalMaxTaxBps: bigint | number poolAppId: bigint | number evidenceTime: bigint | number evidenceDeposit: bigint | number currentLpApp: bigint | number previousLpApp: bigint | number } 'exempt_wallet(uint64,account,uint64,string,pay)void': { scope: bigint | number address: Uint8Array | string whitelist: bigint | number note: string payment: AppMethodCallTransactionArgument } 'unfreeze_exempt_wallet(account,asset)void': { address: Uint8Array | string asset: bigint } 'add_exempt_app(uint64,uint64,uint64,string,pay)void': { scope: bigint | number whitelist: bigint | number appId: bigint | number note: string payment: AppMethodCallTransactionArgument } 'remove_exempt_wallet(uint64,account)void': { scope: bigint | number address: Uint8Array | string } 'remove_exempt_app(uint64,uint64)void': { scope: bigint | number appId: bigint | number } 'global_admin_reset(account)void': { globalAdmin: Uint8Array | string } 'project_admin_reset(account,asset)void': { projectAdmin: Uint8Array | string asset: bigint } 'register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void': { asset: bigint payment: AppMethodCallTransactionArgument projectTaxBps: bigint | number burnTaxBps: bigint | number reflectionTaxBps: bigint | number freezeTaxBps: bigint | number liquidityTaxBps: bigint | number freezeRewardBps: bigint | number maxFreezeReward: bigint | number liquidityDepositBps: bigint | number minimumReflections: bigint | number taxCase: bigint | number } 'reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void': { asset: bigint projectTaxAccount: Uint8Array | string projectTaxBps: bigint | number burnTaxBps: bigint | number reflectionTaxBps: bigint | number liquidityTaxBps: bigint | number liquidityTarget: Uint8Array | string freezeTaxBps: bigint | number freezeRewardBps: bigint | number maxFreezeReward: bigint | number liquidityDepositBps: bigint | number } 'switch_tax_mode(asset,uint64,account)void': { asset: bigint taxMode: bigint | number mainPool: Uint8Array | string } 'freeze(asset,account,pay)void': { asset: bigint refreezeAddress: Uint8Array | string mbr: AppMethodCallTransactionArgument } 'general_operations_top(uint64,asset,uint64)void': { flagtop: bigint | number asset: bigint userBalance: bigint | number } 'general_operations_bottom(uint64,asset,axfer,account)void': { flagBottom: bigint | number asset: bigint taxTxn: AppMethodCallTransactionArgument referallAddress: Uint8Array | string } 'send_to_frozen_top(uint64,asset,uint64,account,uint64)void': { flagtop: bigint | number asset: bigint senderBalance: bigint | number receiverAccount: Uint8Array | string receiverBalance: bigint | number } 'send_to_frozen_bottom(uint64,asset,axfer,account,account)void': { flagBottom: bigint | number asset: bigint taxTxn: AppMethodCallTransactionArgument referallAddress: Uint8Array | string receiverAccount: Uint8Array | string } 'whitelisted_app_top(uint64,asset,uint64)void': { flagtop: bigint | number asset: bigint applicationId: bigint | number } 'whitelisted_app_bottom(uint64,asset)void': { flagbottom: bigint | number asset: bigint } 'liquidity_top(uint64,asset,asset,uint64,uint64)void': { flagTop: bigint | number asset: bigint lpasset: bigint userBalance: bigint | number userLpBalance: bigint | number } 'liquidity_bottom(uint64,asset)void': { flagbottom: bigint | number asset: bigint } 'add_algo_rewards(asset,pay)void': { asset: bigint payment: AppMethodCallTransactionArgument } 'add_asa_rewards(asset,uint64,axfer)void': { asset: bigint type: bigint | number rewardTxn: AppMethodCallTransactionArgument } 'exempt_app_approval(uint64,asset,string)void': { applicationId: bigint | number asset: bigint note: string } 'exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void': { applicationId: bigint | number asset: bigint note: string mbr: AppMethodCallTransactionArgument mode: bigint | number } 'claim_reflections(asset)void': { asset: bigint } 'claim_freeze_rewards(asset)void': { asset: bigint } 'add_pending_lp(asset)void': { asset: bigint } 'check_is_address_exempt(account,asset)bool': { address: Uint8Array | string asset: bigint } 'check_is_address_maybe_exempt_app(account,asset)bool': { address: Uint8Array | string asset: bigint } 'check_app_status(uint64)(bool,bool)': { appId: bigint | number } 'check_lp_deposit_bps(asset)uint64': { asset: bigint } 'increase_budget()void': Record 'get_reflection_preview(asset,account)(uint64,uint64)': { asset: bigint user: Uint8Array | string } } /** * The tuple representation of the arguments for each method */ tuple: { 'set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void': [protocolFeeBps: bigint | number, totalMaxTaxBps: bigint | number, poolAppId: bigint | number, evidenceTime: bigint | number, evidenceDeposit: bigint | number, currentLpApp: bigint | number, previousLpApp: bigint | number] 'exempt_wallet(uint64,account,uint64,string,pay)void': [scope: bigint | number, address: Uint8Array | string, whitelist: bigint | number, note: string, payment: AppMethodCallTransactionArgument] 'unfreeze_exempt_wallet(account,asset)void': [address: Uint8Array | string, asset: bigint] 'add_exempt_app(uint64,uint64,uint64,string,pay)void': [scope: bigint | number, whitelist: bigint | number, appId: bigint | number, note: string, payment: AppMethodCallTransactionArgument] 'remove_exempt_wallet(uint64,account)void': [scope: bigint | number, address: Uint8Array | string] 'remove_exempt_app(uint64,uint64)void': [scope: bigint | number, appId: bigint | number] 'global_admin_reset(account)void': [globalAdmin: Uint8Array | string] 'project_admin_reset(account,asset)void': [projectAdmin: Uint8Array | string, asset: bigint] 'register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void': [asset: bigint, payment: AppMethodCallTransactionArgument, projectTaxBps: bigint | number, burnTaxBps: bigint | number, reflectionTaxBps: bigint | number, freezeTaxBps: bigint | number, liquidityTaxBps: bigint | number, freezeRewardBps: bigint | number, maxFreezeReward: bigint | number, liquidityDepositBps: bigint | number, minimumReflections: bigint | number, taxCase: bigint | number] 'reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void': [asset: bigint, projectTaxAccount: Uint8Array | string, projectTaxBps: bigint | number, burnTaxBps: bigint | number, reflectionTaxBps: bigint | number, liquidityTaxBps: bigint | number, liquidityTarget: Uint8Array | string, freezeTaxBps: bigint | number, freezeRewardBps: bigint | number, maxFreezeReward: bigint | number, liquidityDepositBps: bigint | number] 'switch_tax_mode(asset,uint64,account)void': [asset: bigint, taxMode: bigint | number, mainPool: Uint8Array | string] 'freeze(asset,account,pay)void': [asset: bigint, refreezeAddress: Uint8Array | string, mbr: AppMethodCallTransactionArgument] 'general_operations_top(uint64,asset,uint64)void': [flagtop: bigint | number, asset: bigint, userBalance: bigint | number] 'general_operations_bottom(uint64,asset,axfer,account)void': [flagBottom: bigint | number, asset: bigint, taxTxn: AppMethodCallTransactionArgument, referallAddress: Uint8Array | string] 'send_to_frozen_top(uint64,asset,uint64,account,uint64)void': [flagtop: bigint | number, asset: bigint, senderBalance: bigint | number, receiverAccount: Uint8Array | string, receiverBalance: bigint | number] 'send_to_frozen_bottom(uint64,asset,axfer,account,account)void': [flagBottom: bigint | number, asset: bigint, taxTxn: AppMethodCallTransactionArgument, referallAddress: Uint8Array | string, receiverAccount: Uint8Array | string] 'whitelisted_app_top(uint64,asset,uint64)void': [flagtop: bigint | number, asset: bigint, applicationId: bigint | number] 'whitelisted_app_bottom(uint64,asset)void': [flagbottom: bigint | number, asset: bigint] 'liquidity_top(uint64,asset,asset,uint64,uint64)void': [flagTop: bigint | number, asset: bigint, lpasset: bigint, userBalance: bigint | number, userLpBalance: bigint | number] 'liquidity_bottom(uint64,asset)void': [flagbottom: bigint | number, asset: bigint] 'add_algo_rewards(asset,pay)void': [asset: bigint, payment: AppMethodCallTransactionArgument] 'add_asa_rewards(asset,uint64,axfer)void': [asset: bigint, type: bigint | number, rewardTxn: AppMethodCallTransactionArgument] 'exempt_app_approval(uint64,asset,string)void': [applicationId: bigint | number, asset: bigint, note: string] 'exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void': [applicationId: bigint | number, asset: bigint, note: string, mbr: AppMethodCallTransactionArgument, mode: bigint | number] 'claim_reflections(asset)void': [asset: bigint] 'claim_freeze_rewards(asset)void': [asset: bigint] 'add_pending_lp(asset)void': [asset: bigint] 'check_is_address_exempt(account,asset)bool': [address: Uint8Array | string, asset: bigint] 'check_is_address_maybe_exempt_app(account,asset)bool': [address: Uint8Array | string, asset: bigint] 'check_app_status(uint64)(bool,bool)': [appId: bigint | number] 'check_lp_deposit_bps(asset)uint64': [asset: bigint] 'increase_budget()void': [] 'get_reflection_preview(asset,account)(uint64,uint64)': [asset: bigint, user: Uint8Array | string] } } /** * The return type for each method */ export type FirstStageReturns = { 'set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void': void 'exempt_wallet(uint64,account,uint64,string,pay)void': void 'unfreeze_exempt_wallet(account,asset)void': void 'add_exempt_app(uint64,uint64,uint64,string,pay)void': void 'remove_exempt_wallet(uint64,account)void': void 'remove_exempt_app(uint64,uint64)void': void 'global_admin_reset(account)void': void 'project_admin_reset(account,asset)void': void 'register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void': void 'reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void': void 'switch_tax_mode(asset,uint64,account)void': void 'freeze(asset,account,pay)void': void 'general_operations_top(uint64,asset,uint64)void': void 'general_operations_bottom(uint64,asset,axfer,account)void': void 'send_to_frozen_top(uint64,asset,uint64,account,uint64)void': void 'send_to_frozen_bottom(uint64,asset,axfer,account,account)void': void 'whitelisted_app_top(uint64,asset,uint64)void': void 'whitelisted_app_bottom(uint64,asset)void': void 'liquidity_top(uint64,asset,asset,uint64,uint64)void': void 'liquidity_bottom(uint64,asset)void': void 'add_algo_rewards(asset,pay)void': void 'add_asa_rewards(asset,uint64,axfer)void': void 'exempt_app_approval(uint64,asset,string)void': void 'exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void': void 'claim_reflections(asset)void': void 'claim_freeze_rewards(asset)void': void 'add_pending_lp(asset)void': void 'check_is_address_exempt(account,asset)bool': boolean 'check_is_address_maybe_exempt_app(account,asset)bool': boolean 'check_app_status(uint64)(bool,bool)': [boolean, boolean] 'check_lp_deposit_bps(asset)uint64': bigint 'increase_budget()void': void 'get_reflection_preview(asset,account)(uint64,uint64)': [bigint, bigint] } /** * Defines the types of available calls and state of the FirstStage smart contract. */ export type FirstStageTypes = { /** * Maps method signatures / names to their argument and return types. */ methods: & Record<'set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void' | 'set_global_state', { argsObj: FirstStageArgs['obj']['set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] argsTuple: FirstStageArgs['tuple']['set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] returns: FirstStageReturns['set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] }> & Record<'exempt_wallet(uint64,account,uint64,string,pay)void' | 'exempt_wallet', { argsObj: FirstStageArgs['obj']['exempt_wallet(uint64,account,uint64,string,pay)void'] argsTuple: FirstStageArgs['tuple']['exempt_wallet(uint64,account,uint64,string,pay)void'] returns: FirstStageReturns['exempt_wallet(uint64,account,uint64,string,pay)void'] }> & Record<'unfreeze_exempt_wallet(account,asset)void' | 'unfreeze_exempt_wallet', { argsObj: FirstStageArgs['obj']['unfreeze_exempt_wallet(account,asset)void'] argsTuple: FirstStageArgs['tuple']['unfreeze_exempt_wallet(account,asset)void'] returns: FirstStageReturns['unfreeze_exempt_wallet(account,asset)void'] }> & Record<'add_exempt_app(uint64,uint64,uint64,string,pay)void' | 'add_exempt_app', { argsObj: FirstStageArgs['obj']['add_exempt_app(uint64,uint64,uint64,string,pay)void'] argsTuple: FirstStageArgs['tuple']['add_exempt_app(uint64,uint64,uint64,string,pay)void'] returns: FirstStageReturns['add_exempt_app(uint64,uint64,uint64,string,pay)void'] }> & Record<'remove_exempt_wallet(uint64,account)void' | 'remove_exempt_wallet', { argsObj: FirstStageArgs['obj']['remove_exempt_wallet(uint64,account)void'] argsTuple: FirstStageArgs['tuple']['remove_exempt_wallet(uint64,account)void'] returns: FirstStageReturns['remove_exempt_wallet(uint64,account)void'] }> & Record<'remove_exempt_app(uint64,uint64)void' | 'remove_exempt_app', { argsObj: FirstStageArgs['obj']['remove_exempt_app(uint64,uint64)void'] argsTuple: FirstStageArgs['tuple']['remove_exempt_app(uint64,uint64)void'] returns: FirstStageReturns['remove_exempt_app(uint64,uint64)void'] }> & Record<'global_admin_reset(account)void' | 'global_admin_reset', { argsObj: FirstStageArgs['obj']['global_admin_reset(account)void'] argsTuple: FirstStageArgs['tuple']['global_admin_reset(account)void'] returns: FirstStageReturns['global_admin_reset(account)void'] }> & Record<'project_admin_reset(account,asset)void' | 'project_admin_reset', { argsObj: FirstStageArgs['obj']['project_admin_reset(account,asset)void'] argsTuple: FirstStageArgs['tuple']['project_admin_reset(account,asset)void'] returns: FirstStageReturns['project_admin_reset(account,asset)void'] }> & Record<'register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void' | 'register_asa', { argsObj: FirstStageArgs['obj']['register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] argsTuple: FirstStageArgs['tuple']['register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] returns: FirstStageReturns['register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] }> & Record<'reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void' | 'reconfigure_asset', { argsObj: FirstStageArgs['obj']['reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void'] argsTuple: FirstStageArgs['tuple']['reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void'] returns: FirstStageReturns['reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void'] }> & Record<'switch_tax_mode(asset,uint64,account)void' | 'switch_tax_mode', { argsObj: FirstStageArgs['obj']['switch_tax_mode(asset,uint64,account)void'] argsTuple: FirstStageArgs['tuple']['switch_tax_mode(asset,uint64,account)void'] returns: FirstStageReturns['switch_tax_mode(asset,uint64,account)void'] }> & Record<'freeze(asset,account,pay)void' | 'freeze', { argsObj: FirstStageArgs['obj']['freeze(asset,account,pay)void'] argsTuple: FirstStageArgs['tuple']['freeze(asset,account,pay)void'] returns: FirstStageReturns['freeze(asset,account,pay)void'] }> & Record<'general_operations_top(uint64,asset,uint64)void' | 'general_operations_top', { argsObj: FirstStageArgs['obj']['general_operations_top(uint64,asset,uint64)void'] argsTuple: FirstStageArgs['tuple']['general_operations_top(uint64,asset,uint64)void'] returns: FirstStageReturns['general_operations_top(uint64,asset,uint64)void'] }> & Record<'general_operations_bottom(uint64,asset,axfer,account)void' | 'general_operations_bottom', { argsObj: FirstStageArgs['obj']['general_operations_bottom(uint64,asset,axfer,account)void'] argsTuple: FirstStageArgs['tuple']['general_operations_bottom(uint64,asset,axfer,account)void'] returns: FirstStageReturns['general_operations_bottom(uint64,asset,axfer,account)void'] }> & Record<'send_to_frozen_top(uint64,asset,uint64,account,uint64)void' | 'send_to_frozen_top', { argsObj: FirstStageArgs['obj']['send_to_frozen_top(uint64,asset,uint64,account,uint64)void'] argsTuple: FirstStageArgs['tuple']['send_to_frozen_top(uint64,asset,uint64,account,uint64)void'] returns: FirstStageReturns['send_to_frozen_top(uint64,asset,uint64,account,uint64)void'] }> & Record<'send_to_frozen_bottom(uint64,asset,axfer,account,account)void' | 'send_to_frozen_bottom', { argsObj: FirstStageArgs['obj']['send_to_frozen_bottom(uint64,asset,axfer,account,account)void'] argsTuple: FirstStageArgs['tuple']['send_to_frozen_bottom(uint64,asset,axfer,account,account)void'] returns: FirstStageReturns['send_to_frozen_bottom(uint64,asset,axfer,account,account)void'] }> & Record<'whitelisted_app_top(uint64,asset,uint64)void' | 'whitelisted_app_top', { argsObj: FirstStageArgs['obj']['whitelisted_app_top(uint64,asset,uint64)void'] argsTuple: FirstStageArgs['tuple']['whitelisted_app_top(uint64,asset,uint64)void'] returns: FirstStageReturns['whitelisted_app_top(uint64,asset,uint64)void'] }> & Record<'whitelisted_app_bottom(uint64,asset)void' | 'whitelisted_app_bottom', { argsObj: FirstStageArgs['obj']['whitelisted_app_bottom(uint64,asset)void'] argsTuple: FirstStageArgs['tuple']['whitelisted_app_bottom(uint64,asset)void'] returns: FirstStageReturns['whitelisted_app_bottom(uint64,asset)void'] }> & Record<'liquidity_top(uint64,asset,asset,uint64,uint64)void' | 'liquidity_top', { argsObj: FirstStageArgs['obj']['liquidity_top(uint64,asset,asset,uint64,uint64)void'] argsTuple: FirstStageArgs['tuple']['liquidity_top(uint64,asset,asset,uint64,uint64)void'] returns: FirstStageReturns['liquidity_top(uint64,asset,asset,uint64,uint64)void'] }> & Record<'liquidity_bottom(uint64,asset)void' | 'liquidity_bottom', { argsObj: FirstStageArgs['obj']['liquidity_bottom(uint64,asset)void'] argsTuple: FirstStageArgs['tuple']['liquidity_bottom(uint64,asset)void'] returns: FirstStageReturns['liquidity_bottom(uint64,asset)void'] }> & Record<'add_algo_rewards(asset,pay)void' | 'add_algo_rewards', { argsObj: FirstStageArgs['obj']['add_algo_rewards(asset,pay)void'] argsTuple: FirstStageArgs['tuple']['add_algo_rewards(asset,pay)void'] returns: FirstStageReturns['add_algo_rewards(asset,pay)void'] }> & Record<'add_asa_rewards(asset,uint64,axfer)void' | 'add_asa_rewards', { argsObj: FirstStageArgs['obj']['add_asa_rewards(asset,uint64,axfer)void'] argsTuple: FirstStageArgs['tuple']['add_asa_rewards(asset,uint64,axfer)void'] returns: FirstStageReturns['add_asa_rewards(asset,uint64,axfer)void'] }> & Record<'exempt_app_approval(uint64,asset,string)void' | 'exempt_app_approval', { argsObj: FirstStageArgs['obj']['exempt_app_approval(uint64,asset,string)void'] argsTuple: FirstStageArgs['tuple']['exempt_app_approval(uint64,asset,string)void'] returns: FirstStageReturns['exempt_app_approval(uint64,asset,string)void'] }> & Record<'exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void' | 'exempt_or_whitelist_app', { argsObj: FirstStageArgs['obj']['exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void'] argsTuple: FirstStageArgs['tuple']['exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void'] returns: FirstStageReturns['exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void'] }> & Record<'claim_reflections(asset)void' | 'claim_reflections', { argsObj: FirstStageArgs['obj']['claim_reflections(asset)void'] argsTuple: FirstStageArgs['tuple']['claim_reflections(asset)void'] returns: FirstStageReturns['claim_reflections(asset)void'] }> & Record<'claim_freeze_rewards(asset)void' | 'claim_freeze_rewards', { argsObj: FirstStageArgs['obj']['claim_freeze_rewards(asset)void'] argsTuple: FirstStageArgs['tuple']['claim_freeze_rewards(asset)void'] returns: FirstStageReturns['claim_freeze_rewards(asset)void'] }> & Record<'add_pending_lp(asset)void' | 'add_pending_lp', { argsObj: FirstStageArgs['obj']['add_pending_lp(asset)void'] argsTuple: FirstStageArgs['tuple']['add_pending_lp(asset)void'] returns: FirstStageReturns['add_pending_lp(asset)void'] }> & Record<'check_is_address_exempt(account,asset)bool' | 'check_is_address_exempt', { argsObj: FirstStageArgs['obj']['check_is_address_exempt(account,asset)bool'] argsTuple: FirstStageArgs['tuple']['check_is_address_exempt(account,asset)bool'] returns: FirstStageReturns['check_is_address_exempt(account,asset)bool'] }> & Record<'check_is_address_maybe_exempt_app(account,asset)bool' | 'check_is_address_maybe_exempt_app', { argsObj: FirstStageArgs['obj']['check_is_address_maybe_exempt_app(account,asset)bool'] argsTuple: FirstStageArgs['tuple']['check_is_address_maybe_exempt_app(account,asset)bool'] returns: FirstStageReturns['check_is_address_maybe_exempt_app(account,asset)bool'] }> & Record<'check_app_status(uint64)(bool,bool)' | 'check_app_status', { argsObj: FirstStageArgs['obj']['check_app_status(uint64)(bool,bool)'] argsTuple: FirstStageArgs['tuple']['check_app_status(uint64)(bool,bool)'] returns: FirstStageReturns['check_app_status(uint64)(bool,bool)'] }> & Record<'check_lp_deposit_bps(asset)uint64' | 'check_lp_deposit_bps', { argsObj: FirstStageArgs['obj']['check_lp_deposit_bps(asset)uint64'] argsTuple: FirstStageArgs['tuple']['check_lp_deposit_bps(asset)uint64'] returns: FirstStageReturns['check_lp_deposit_bps(asset)uint64'] }> & Record<'increase_budget()void' | 'increase_budget', { argsObj: FirstStageArgs['obj']['increase_budget()void'] argsTuple: FirstStageArgs['tuple']['increase_budget()void'] returns: FirstStageReturns['increase_budget()void'] }> & Record<'get_reflection_preview(asset,account)(uint64,uint64)' | 'get_reflection_preview', { argsObj: FirstStageArgs['obj']['get_reflection_preview(asset,account)(uint64,uint64)'] argsTuple: FirstStageArgs['tuple']['get_reflection_preview(asset,account)(uint64,uint64)'] returns: FirstStageReturns['get_reflection_preview(asset,account)(uint64,uint64)'] }> /** * Defines the shape of the state of the application. */ state: { global: { keys: { globalAdmin: string globalBurnWallet: string poolAppId: bigint protocolFeeBps: bigint evidenceTime: bigint evidenceDeposit: bigint totalMaxTaxBps: bigint totalLaunchedAsas: bigint currentLpDepositApp: bigint previousLpDepositApp: bigint } maps: {} } box: { keys: {} maps: { registeredAsset: Map exemptedWallet: Map exemptedWalletRekeyed: Map exemptedAppDeployer: Map exemptedAppId: Map exemptedAppApproval: Map userAssetInfo: Map potentialExemptApp: Map } } } } /** * Defines the possible abi call signatures. */ export type FirstStageSignatures = keyof FirstStageTypes['methods'] /** * Defines the possible abi call signatures for methods that return a non-void value. */ export type FirstStageNonVoidMethodSignatures = keyof FirstStageTypes['methods'] extends infer T ? T extends keyof FirstStageTypes['methods'] ? MethodReturn extends void ? never : T : never : never /** * Defines an object containing all relevant parameters for a single call to the contract. */ export type CallParams = Expand< Omit & { /** The args for the ABI method call, either as an ordered array or an object */ args: Expand } > /** * Maps a method signature from the FirstStage smart contract to the method's arguments in either tuple or struct form */ export type MethodArgs = FirstStageTypes['methods'][TSignature]['argsObj' | 'argsTuple'] /** * Maps a method signature from the FirstStage smart contract to the method's return type */ export type MethodReturn = FirstStageTypes['methods'][TSignature]['returns'] /** * Defines the shape of the keyed global state of the application. */ export type GlobalKeysState = FirstStageTypes['state']['global']['keys'] /** * Defines the shape of the keyed box state of the application. */ export type BoxKeysState = FirstStageTypes['state']['box']['keys'] /** * Exposes methods for constructing `AppClient` params objects for ABI calls to the FirstStage smart contract */ export abstract class FirstStageParamsFactory { /** * Constructs a no op call for the set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static setGlobalState(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.protocolFeeBps, params.args.totalMaxTaxBps, params.args.poolAppId, params.args.evidenceTime, params.args.evidenceDeposit, params.args.currentLpApp, params.args.previousLpApp], } } /** * Constructs a no op call for the exempt_wallet(uint64,account,uint64,string,pay)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static exemptWallet(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'exempt_wallet(uint64,account,uint64,string,pay)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.scope, params.args.address, params.args.whitelist, params.args.note, params.args.payment], } } /** * Constructs a no op call for the unfreeze_exempt_wallet(account,asset)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static unfreezeExemptWallet(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'unfreeze_exempt_wallet(account,asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.address, params.args.asset], } } /** * Constructs a no op call for the add_exempt_app(uint64,uint64,uint64,string,pay)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static addExemptApp(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'add_exempt_app(uint64,uint64,uint64,string,pay)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.scope, params.args.whitelist, params.args.appId, params.args.note, params.args.payment], } } /** * Constructs a no op call for the remove_exempt_wallet(uint64,account)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static removeExemptWallet(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'remove_exempt_wallet(uint64,account)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.scope, params.args.address], } } /** * Constructs a no op call for the remove_exempt_app(uint64,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static removeExemptApp(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'remove_exempt_app(uint64,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.scope, params.args.appId], } } /** * Constructs a no op call for the global_admin_reset(account)void ABI method * * Allows the contract creator to reset the global admin account. Args: global_admin (Account): sets the administrator wallet for this contract. * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static globalAdminReset(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'global_admin_reset(account)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.globalAdmin], } } /** * Constructs a no op call for the project_admin_reset(account,asset)void ABI method * * Allows the asset admin to reset a new admin account. Args: project_admin (Account): sets the administrator wallet for this asset. * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static projectAdminReset(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'project_admin_reset(account,asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.projectAdmin, params.args.asset], } } /** * Constructs a no op call for the register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static registerAsa(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.payment, params.args.projectTaxBps, params.args.burnTaxBps, params.args.reflectionTaxBps, params.args.freezeTaxBps, params.args.liquidityTaxBps, params.args.freezeRewardBps, params.args.maxFreezeReward, params.args.liquidityDepositBps, params.args.minimumReflections, params.args.taxCase], } } /** * Constructs a no op call for the reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static reconfigureAsset(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.projectTaxAccount, params.args.projectTaxBps, params.args.burnTaxBps, params.args.reflectionTaxBps, params.args.liquidityTaxBps, params.args.liquidityTarget, params.args.freezeTaxBps, params.args.freezeRewardBps, params.args.maxFreezeReward, params.args.liquidityDepositBps], } } /** * Constructs a no op call for the switch_tax_mode(asset,uint64,account)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static switchTaxMode(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'switch_tax_mode(asset,uint64,account)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.taxMode, params.args.mainPool], } } /** * Constructs a no op call for the freeze(asset,account,pay)void ABI method * * A method that is used to refreeze addresses. * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static freeze(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'freeze(asset,account,pay)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.refreezeAddress, params.args.mbr], } } /** * Constructs a no op call for the general_operations_top(uint64,asset,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static generalOperationsTop(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'general_operations_top(uint64,asset,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagtop, params.args.asset, params.args.userBalance], } } /** * Constructs a no op call for the general_operations_bottom(uint64,asset,axfer,account)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static generalOperationsBottom(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'general_operations_bottom(uint64,asset,axfer,account)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagBottom, params.args.asset, params.args.taxTxn, params.args.referallAddress], } } /** * Constructs a no op call for the send_to_frozen_top(uint64,asset,uint64,account,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static sendToFrozenTop(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'send_to_frozen_top(uint64,asset,uint64,account,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagtop, params.args.asset, params.args.senderBalance, params.args.receiverAccount, params.args.receiverBalance], } } /** * Constructs a no op call for the send_to_frozen_bottom(uint64,asset,axfer,account,account)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static sendToFrozenBottom(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'send_to_frozen_bottom(uint64,asset,axfer,account,account)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagBottom, params.args.asset, params.args.taxTxn, params.args.referallAddress, params.args.receiverAccount], } } /** * Constructs a no op call for the whitelisted_app_top(uint64,asset,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static whitelistedAppTop(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'whitelisted_app_top(uint64,asset,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagtop, params.args.asset, params.args.applicationId], } } /** * Constructs a no op call for the whitelisted_app_bottom(uint64,asset)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static whitelistedAppBottom(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'whitelisted_app_bottom(uint64,asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagbottom, params.args.asset], } } /** * Constructs a no op call for the liquidity_top(uint64,asset,asset,uint64,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static liquidityTop(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'liquidity_top(uint64,asset,asset,uint64,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagTop, params.args.asset, params.args.lpasset, params.args.userBalance, params.args.userLpBalance], } } /** * Constructs a no op call for the liquidity_bottom(uint64,asset)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static liquidityBottom(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'liquidity_bottom(uint64,asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.flagbottom, params.args.asset], } } /** * Constructs a no op call for the add_algo_rewards(asset,pay)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static addAlgoRewards(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'add_algo_rewards(asset,pay)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.payment], } } /** * Constructs a no op call for the add_asa_rewards(asset,uint64,axfer)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static addAsaRewards(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'add_asa_rewards(asset,uint64,axfer)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.type, params.args.rewardTxn], } } /** * Constructs a no op call for the exempt_app_approval(uint64,asset,string)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static exemptAppApproval(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'exempt_app_approval(uint64,asset,string)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.applicationId, params.args.asset, params.args.note], } } /** * Constructs a no op call for the exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static exemptOrWhitelistApp(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.applicationId, params.args.asset, params.args.note, params.args.mbr, params.args.mode], } } /** * Constructs a no op call for the claim_reflections(asset)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static claimReflections(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'claim_reflections(asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset], } } /** * Constructs a no op call for the claim_freeze_rewards(asset)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static claimFreezeRewards(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'claim_freeze_rewards(asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset], } } /** * Constructs a no op call for the add_pending_lp(asset)void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static addPendingLp(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'add_pending_lp(asset)void' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset], } } /** * Constructs a no op call for the check_is_address_exempt(account,asset)bool ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static checkIsAddressExempt(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'check_is_address_exempt(account,asset)bool' as const, args: Array.isArray(params.args) ? params.args : [params.args.address, params.args.asset], } } /** * Constructs a no op call for the check_is_address_maybe_exempt_app(account,asset)bool ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static checkIsAddressMaybeExemptApp(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'check_is_address_maybe_exempt_app(account,asset)bool' as const, args: Array.isArray(params.args) ? params.args : [params.args.address, params.args.asset], } } /** * Constructs a no op call for the check_app_status(uint64)(bool,bool) ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static checkAppStatus(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'check_app_status(uint64)(bool,bool)' as const, args: Array.isArray(params.args) ? params.args : [params.args.appId], } } /** * Constructs a no op call for the check_lp_deposit_bps(asset)uint64 ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static checkLpDepositBps(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'check_lp_deposit_bps(asset)uint64' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset], } } /** * Constructs a no op call for the increase_budget()void ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static increaseBudget(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'increase_budget()void' as const, args: Array.isArray(params.args) ? params.args : [], } } /** * Constructs a no op call for the get_reflection_preview(asset,account)(uint64,uint64) ABI method * * @param params Parameters for the call * @returns An `AppClientMethodCallParams` object for the call */ static getReflectionPreview(params: CallParams & CallOnComplete): AppClientMethodCallParams & CallOnComplete { return { ...params, method: 'get_reflection_preview(asset,account)(uint64,uint64)' as const, args: Array.isArray(params.args) ? params.args : [params.args.asset, params.args.user], } } } /** * A client to make calls to the FirstStage smart contract */ export class FirstStageClient { /** * The underlying `AppClient` for when you want to have more flexibility */ public readonly appClient: _AppClient /** * Creates a new instance of `FirstStageClient` * * @param appClient An `AppClient` instance which has been created with the FirstStage app spec */ constructor(appClient: _AppClient) /** * Creates a new instance of `FirstStageClient` * * @param params The parameters to initialise the app client with */ constructor(params: Omit) constructor(appClientOrParams: _AppClient | Omit) { this.appClient = appClientOrParams instanceof _AppClient ? appClientOrParams : new _AppClient({ ...appClientOrParams, appSpec: APP_SPEC, }) } /** * Checks for decode errors on the given return value and maps the return value to the return type for the given method * @returns The typed return value or undefined if there was no value */ decodeReturnValue(method: TSignature, returnValue: ABIReturn | undefined) { return returnValue !== undefined ? getArc56ReturnValue>(returnValue, this.appClient.getABIMethod(method), APP_SPEC.structs) : undefined } /** * Returns a new `FirstStageClient` client, resolving the app by creator address and name * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note). * @param params The parameters to create the app client */ public static async fromCreatorAndName(params: Omit): Promise { return new FirstStageClient(await _AppClient.fromCreatorAndName({...params, appSpec: APP_SPEC})) } /** * Returns an `FirstStageClient` instance for the current network based on * pre-determined network-specific app IDs specified in the ARC-56 app spec. * * If no IDs are in the app spec or the network isn't recognised, an error is thrown. * @param params The parameters to create the app client */ static async fromNetwork( params: Omit ): Promise { return new FirstStageClient(await _AppClient.fromNetwork({...params, appSpec: APP_SPEC})) } /** The ID of the app instance this client is linked to. */ public get appId() { return this.appClient.appId } /** The app address of the app instance this client is linked to. */ public get appAddress() { return this.appClient.appAddress } /** The name of the app. */ public get appName() { return this.appClient.appName } /** The ARC-56 app spec being used */ public get appSpec() { return this.appClient.appSpec } /** A reference to the underlying `AlgorandClient` this app client is using. */ public get algorand(): AlgorandClient { return this.appClient.algorand } /** * Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation. */ readonly params = { /** * Makes a clear_state call to an existing instance of the FirstStage smart contract. * * @param params The params for the bare (raw) call * @returns The clearState result */ clearState: (params?: Expand) => { return this.appClient.params.bare.clearState(params) }, /** * Makes a call to the FirstStage smart contract using the `set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ setGlobalState: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.setGlobalState(params)) }, /** * Makes a call to the FirstStage smart contract using the `exempt_wallet(uint64,account,uint64,string,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ exemptWallet: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.exemptWallet(params)) }, /** * Makes a call to the FirstStage smart contract using the `unfreeze_exempt_wallet(account,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ unfreezeExemptWallet: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.unfreezeExemptWallet(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_exempt_app(uint64,uint64,uint64,string,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ addExemptApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.addExemptApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `remove_exempt_wallet(uint64,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ removeExemptWallet: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.removeExemptWallet(params)) }, /** * Makes a call to the FirstStage smart contract using the `remove_exempt_app(uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ removeExemptApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.removeExemptApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `global_admin_reset(account)void` ABI method. * * Allows the contract creator to reset the global admin account. Args: global_admin (Account): sets the administrator wallet for this contract. * * @param params The params for the smart contract call * @returns The call params */ globalAdminReset: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.globalAdminReset(params)) }, /** * Makes a call to the FirstStage smart contract using the `project_admin_reset(account,asset)void` ABI method. * * Allows the asset admin to reset a new admin account. Args: project_admin (Account): sets the administrator wallet for this asset. * * @param params The params for the smart contract call * @returns The call params */ projectAdminReset: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.projectAdminReset(params)) }, /** * Makes a call to the FirstStage smart contract using the `register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ registerAsa: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.registerAsa(params)) }, /** * Makes a call to the FirstStage smart contract using the `reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ reconfigureAsset: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.reconfigureAsset(params)) }, /** * Makes a call to the FirstStage smart contract using the `switch_tax_mode(asset,uint64,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ switchTaxMode: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.switchTaxMode(params)) }, /** * Makes a call to the FirstStage smart contract using the `freeze(asset,account,pay)void` ABI method. * * A method that is used to refreeze addresses. * * @param params The params for the smart contract call * @returns The call params */ freeze: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.freeze(params)) }, /** * Makes a call to the FirstStage smart contract using the `general_operations_top(uint64,asset,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ generalOperationsTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.generalOperationsTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `general_operations_bottom(uint64,asset,axfer,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ generalOperationsBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.generalOperationsBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `send_to_frozen_top(uint64,asset,uint64,account,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ sendToFrozenTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.sendToFrozenTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `send_to_frozen_bottom(uint64,asset,axfer,account,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ sendToFrozenBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.sendToFrozenBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `whitelisted_app_top(uint64,asset,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ whitelistedAppTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.whitelistedAppTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `whitelisted_app_bottom(uint64,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ whitelistedAppBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.whitelistedAppBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `liquidity_top(uint64,asset,asset,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ liquidityTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.liquidityTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `liquidity_bottom(uint64,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ liquidityBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.liquidityBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_algo_rewards(asset,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ addAlgoRewards: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.addAlgoRewards(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_asa_rewards(asset,uint64,axfer)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ addAsaRewards: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.addAsaRewards(params)) }, /** * Makes a call to the FirstStage smart contract using the `exempt_app_approval(uint64,asset,string)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ exemptAppApproval: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.exemptAppApproval(params)) }, /** * Makes a call to the FirstStage smart contract using the `exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ exemptOrWhitelistApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.exemptOrWhitelistApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `claim_reflections(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ claimReflections: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.claimReflections(params)) }, /** * Makes a call to the FirstStage smart contract using the `claim_freeze_rewards(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ claimFreezeRewards: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.claimFreezeRewards(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_pending_lp(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ addPendingLp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.addPendingLp(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_is_address_exempt(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call params */ checkIsAddressExempt: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.checkIsAddressExempt(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_is_address_maybe_exempt_app(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call params */ checkIsAddressMaybeExemptApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.checkIsAddressMaybeExemptApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_app_status(uint64)(bool,bool)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call params */ checkAppStatus: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.checkAppStatus(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_lp_deposit_bps(asset)uint64` ABI method. * * @param params The params for the smart contract call * @returns The call params */ checkLpDepositBps: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.checkLpDepositBps(params)) }, /** * Makes a call to the FirstStage smart contract using the `increase_budget()void` ABI method. * * @param params The params for the smart contract call * @returns The call params */ increaseBudget: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => { return this.appClient.params.call(FirstStageParamsFactory.increaseBudget(params)) }, /** * Makes a call to the FirstStage smart contract using the `get_reflection_preview(asset,account)(uint64,uint64)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call params */ getReflectionPreview: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.params.call(FirstStageParamsFactory.getReflectionPreview(params)) }, } /** * Create transactions for the current app */ readonly createTransaction = { /** * Makes a clear_state call to an existing instance of the FirstStage smart contract. * * @param params The params for the bare (raw) call * @returns The clearState result */ clearState: (params?: Expand) => { return this.appClient.createTransaction.bare.clearState(params) }, /** * Makes a call to the FirstStage smart contract using the `set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ setGlobalState: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.setGlobalState(params)) }, /** * Makes a call to the FirstStage smart contract using the `exempt_wallet(uint64,account,uint64,string,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ exemptWallet: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.exemptWallet(params)) }, /** * Makes a call to the FirstStage smart contract using the `unfreeze_exempt_wallet(account,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ unfreezeExemptWallet: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.unfreezeExemptWallet(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_exempt_app(uint64,uint64,uint64,string,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ addExemptApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.addExemptApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `remove_exempt_wallet(uint64,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ removeExemptWallet: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.removeExemptWallet(params)) }, /** * Makes a call to the FirstStage smart contract using the `remove_exempt_app(uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ removeExemptApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.removeExemptApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `global_admin_reset(account)void` ABI method. * * Allows the contract creator to reset the global admin account. Args: global_admin (Account): sets the administrator wallet for this contract. * * @param params The params for the smart contract call * @returns The call transaction */ globalAdminReset: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.globalAdminReset(params)) }, /** * Makes a call to the FirstStage smart contract using the `project_admin_reset(account,asset)void` ABI method. * * Allows the asset admin to reset a new admin account. Args: project_admin (Account): sets the administrator wallet for this asset. * * @param params The params for the smart contract call * @returns The call transaction */ projectAdminReset: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.projectAdminReset(params)) }, /** * Makes a call to the FirstStage smart contract using the `register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ registerAsa: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.registerAsa(params)) }, /** * Makes a call to the FirstStage smart contract using the `reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ reconfigureAsset: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.reconfigureAsset(params)) }, /** * Makes a call to the FirstStage smart contract using the `switch_tax_mode(asset,uint64,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ switchTaxMode: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.switchTaxMode(params)) }, /** * Makes a call to the FirstStage smart contract using the `freeze(asset,account,pay)void` ABI method. * * A method that is used to refreeze addresses. * * @param params The params for the smart contract call * @returns The call transaction */ freeze: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.freeze(params)) }, /** * Makes a call to the FirstStage smart contract using the `general_operations_top(uint64,asset,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ generalOperationsTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.generalOperationsTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `general_operations_bottom(uint64,asset,axfer,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ generalOperationsBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.generalOperationsBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `send_to_frozen_top(uint64,asset,uint64,account,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ sendToFrozenTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.sendToFrozenTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `send_to_frozen_bottom(uint64,asset,axfer,account,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ sendToFrozenBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.sendToFrozenBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `whitelisted_app_top(uint64,asset,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ whitelistedAppTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.whitelistedAppTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `whitelisted_app_bottom(uint64,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ whitelistedAppBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.whitelistedAppBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `liquidity_top(uint64,asset,asset,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ liquidityTop: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.liquidityTop(params)) }, /** * Makes a call to the FirstStage smart contract using the `liquidity_bottom(uint64,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ liquidityBottom: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.liquidityBottom(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_algo_rewards(asset,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ addAlgoRewards: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.addAlgoRewards(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_asa_rewards(asset,uint64,axfer)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ addAsaRewards: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.addAsaRewards(params)) }, /** * Makes a call to the FirstStage smart contract using the `exempt_app_approval(uint64,asset,string)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ exemptAppApproval: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.exemptAppApproval(params)) }, /** * Makes a call to the FirstStage smart contract using the `exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ exemptOrWhitelistApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.exemptOrWhitelistApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `claim_reflections(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ claimReflections: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.claimReflections(params)) }, /** * Makes a call to the FirstStage smart contract using the `claim_freeze_rewards(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ claimFreezeRewards: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.claimFreezeRewards(params)) }, /** * Makes a call to the FirstStage smart contract using the `add_pending_lp(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ addPendingLp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.addPendingLp(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_is_address_exempt(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call transaction */ checkIsAddressExempt: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.checkIsAddressExempt(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_is_address_maybe_exempt_app(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call transaction */ checkIsAddressMaybeExemptApp: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.checkIsAddressMaybeExemptApp(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_app_status(uint64)(bool,bool)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call transaction */ checkAppStatus: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.checkAppStatus(params)) }, /** * Makes a call to the FirstStage smart contract using the `check_lp_deposit_bps(asset)uint64` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ checkLpDepositBps: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.checkLpDepositBps(params)) }, /** * Makes a call to the FirstStage smart contract using the `increase_budget()void` ABI method. * * @param params The params for the smart contract call * @returns The call transaction */ increaseBudget: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.increaseBudget(params)) }, /** * Makes a call to the FirstStage smart contract using the `get_reflection_preview(asset,account)(uint64,uint64)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call transaction */ getReflectionPreview: (params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { return this.appClient.createTransaction.call(FirstStageParamsFactory.getReflectionPreview(params)) }, } /** * Send calls to the current app */ readonly send = { /** * Makes a clear_state call to an existing instance of the FirstStage smart contract. * * @param params The params for the bare (raw) call * @returns The clearState result */ clearState: (params?: Expand) => { return this.appClient.send.bare.clearState(params) }, /** * Makes a call to the FirstStage smart contract using the `set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ setGlobalState: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.setGlobalState(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `exempt_wallet(uint64,account,uint64,string,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ exemptWallet: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.exemptWallet(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['exempt_wallet(uint64,account,uint64,string,pay)void'])} }, /** * Makes a call to the FirstStage smart contract using the `unfreeze_exempt_wallet(account,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ unfreezeExemptWallet: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.unfreezeExemptWallet(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['unfreeze_exempt_wallet(account,asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `add_exempt_app(uint64,uint64,uint64,string,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ addExemptApp: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.addExemptApp(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['add_exempt_app(uint64,uint64,uint64,string,pay)void'])} }, /** * Makes a call to the FirstStage smart contract using the `remove_exempt_wallet(uint64,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ removeExemptWallet: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.removeExemptWallet(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['remove_exempt_wallet(uint64,account)void'])} }, /** * Makes a call to the FirstStage smart contract using the `remove_exempt_app(uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ removeExemptApp: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.removeExemptApp(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['remove_exempt_app(uint64,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `global_admin_reset(account)void` ABI method. * * Allows the contract creator to reset the global admin account. Args: global_admin (Account): sets the administrator wallet for this contract. * * @param params The params for the smart contract call * @returns The call result */ globalAdminReset: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.globalAdminReset(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['global_admin_reset(account)void'])} }, /** * Makes a call to the FirstStage smart contract using the `project_admin_reset(account,asset)void` ABI method. * * Allows the asset admin to reset a new admin account. Args: project_admin (Account): sets the administrator wallet for this asset. * * @param params The params for the smart contract call * @returns The call result */ projectAdminReset: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.projectAdminReset(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['project_admin_reset(account,asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ registerAsa: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.registerAsa(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ reconfigureAsset: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.reconfigureAsset(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `switch_tax_mode(asset,uint64,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ switchTaxMode: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.switchTaxMode(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['switch_tax_mode(asset,uint64,account)void'])} }, /** * Makes a call to the FirstStage smart contract using the `freeze(asset,account,pay)void` ABI method. * * A method that is used to refreeze addresses. * * @param params The params for the smart contract call * @returns The call result */ freeze: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.freeze(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['freeze(asset,account,pay)void'])} }, /** * Makes a call to the FirstStage smart contract using the `general_operations_top(uint64,asset,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ generalOperationsTop: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.generalOperationsTop(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['general_operations_top(uint64,asset,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `general_operations_bottom(uint64,asset,axfer,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ generalOperationsBottom: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.generalOperationsBottom(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['general_operations_bottom(uint64,asset,axfer,account)void'])} }, /** * Makes a call to the FirstStage smart contract using the `send_to_frozen_top(uint64,asset,uint64,account,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ sendToFrozenTop: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.sendToFrozenTop(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['send_to_frozen_top(uint64,asset,uint64,account,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `send_to_frozen_bottom(uint64,asset,axfer,account,account)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ sendToFrozenBottom: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.sendToFrozenBottom(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['send_to_frozen_bottom(uint64,asset,axfer,account,account)void'])} }, /** * Makes a call to the FirstStage smart contract using the `whitelisted_app_top(uint64,asset,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ whitelistedAppTop: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.whitelistedAppTop(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['whitelisted_app_top(uint64,asset,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `whitelisted_app_bottom(uint64,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ whitelistedAppBottom: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.whitelistedAppBottom(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['whitelisted_app_bottom(uint64,asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `liquidity_top(uint64,asset,asset,uint64,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ liquidityTop: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.liquidityTop(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['liquidity_top(uint64,asset,asset,uint64,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `liquidity_bottom(uint64,asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ liquidityBottom: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.liquidityBottom(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['liquidity_bottom(uint64,asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `add_algo_rewards(asset,pay)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ addAlgoRewards: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.addAlgoRewards(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['add_algo_rewards(asset,pay)void'])} }, /** * Makes a call to the FirstStage smart contract using the `add_asa_rewards(asset,uint64,axfer)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ addAsaRewards: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.addAsaRewards(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['add_asa_rewards(asset,uint64,axfer)void'])} }, /** * Makes a call to the FirstStage smart contract using the `exempt_app_approval(uint64,asset,string)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ exemptAppApproval: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.exemptAppApproval(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['exempt_app_approval(uint64,asset,string)void'])} }, /** * Makes a call to the FirstStage smart contract using the `exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ exemptOrWhitelistApp: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.exemptOrWhitelistApp(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void'])} }, /** * Makes a call to the FirstStage smart contract using the `claim_reflections(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ claimReflections: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.claimReflections(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['claim_reflections(asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `claim_freeze_rewards(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ claimFreezeRewards: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.claimFreezeRewards(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['claim_freeze_rewards(asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `add_pending_lp(asset)void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ addPendingLp: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.addPendingLp(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['add_pending_lp(asset)void'])} }, /** * Makes a call to the FirstStage smart contract using the `check_is_address_exempt(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ checkIsAddressExempt: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.checkIsAddressExempt(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['check_is_address_exempt(account,asset)bool'])} }, /** * Makes a call to the FirstStage smart contract using the `check_is_address_maybe_exempt_app(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ checkIsAddressMaybeExemptApp: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.checkIsAddressMaybeExemptApp(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['check_is_address_maybe_exempt_app(account,asset)bool'])} }, /** * Makes a call to the FirstStage smart contract using the `check_app_status(uint64)(bool,bool)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ checkAppStatus: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.checkAppStatus(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['check_app_status(uint64)(bool,bool)'])} }, /** * Makes a call to the FirstStage smart contract using the `check_lp_deposit_bps(asset)uint64` ABI method. * * @param params The params for the smart contract call * @returns The call result */ checkLpDepositBps: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.checkLpDepositBps(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['check_lp_deposit_bps(asset)uint64'])} }, /** * Makes a call to the FirstStage smart contract using the `increase_budget()void` ABI method. * * @param params The params for the smart contract call * @returns The call result */ increaseBudget: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.increaseBudget(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['increase_budget()void'])} }, /** * Makes a call to the FirstStage smart contract using the `get_reflection_preview(asset,account)(uint64,uint64)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ getReflectionPreview: async (params: CallParams & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => { const result = await this.appClient.send.call(FirstStageParamsFactory.getReflectionPreview(params)) return {...result, return: result.return as unknown as (undefined | FirstStageReturns['get_reflection_preview(asset,account)(uint64,uint64)'])} }, } /** * Clone this app client with different params * * @param params The params to use for the the cloned app client. Omit a param to keep the original value. Set a param to override the original value. Setting to undefined will clear the original value. * @returns A new app client with the altered params */ public clone(params: CloneAppClientParams) { return new FirstStageClient(this.appClient.clone(params)) } /** * Makes a readonly (simulated) call to the FirstStage smart contract using the `check_is_address_exempt(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ async checkIsAddressExempt(params: CallParams) { const result = await this.appClient.send.call(FirstStageParamsFactory.checkIsAddressExempt(params)) return result.return as unknown as FirstStageReturns['check_is_address_exempt(account,asset)bool'] } /** * Makes a readonly (simulated) call to the FirstStage smart contract using the `check_is_address_maybe_exempt_app(account,asset)bool` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ async checkIsAddressMaybeExemptApp(params: CallParams) { const result = await this.appClient.send.call(FirstStageParamsFactory.checkIsAddressMaybeExemptApp(params)) return result.return as unknown as FirstStageReturns['check_is_address_maybe_exempt_app(account,asset)bool'] } /** * Makes a readonly (simulated) call to the FirstStage smart contract using the `check_app_status(uint64)(bool,bool)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ async checkAppStatus(params: CallParams) { const result = await this.appClient.send.call(FirstStageParamsFactory.checkAppStatus(params)) return result.return as unknown as FirstStageReturns['check_app_status(uint64)(bool,bool)'] } /** * Makes a readonly (simulated) call to the FirstStage smart contract using the `get_reflection_preview(asset,account)(uint64,uint64)` ABI method. * * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction. * * @param params The params for the smart contract call * @returns The call result */ async getReflectionPreview(params: CallParams) { const result = await this.appClient.send.call(FirstStageParamsFactory.getReflectionPreview(params)) return result.return as unknown as FirstStageReturns['get_reflection_preview(asset,account)(uint64,uint64)'] } /** * Methods to access state for the current FirstStage app */ state = { /** * Methods to access global state for the current FirstStage app */ global: { /** * Get all current keyed values from global state */ getAll: async (): Promise>> => { const result = await this.appClient.state.global.getAll() return { globalAdmin: result.global_admin, globalBurnWallet: result.global_burn_wallet, poolAppId: result.pool_app_id, protocolFeeBps: result.protocol_fee_bps, evidenceTime: result.evidence_time, evidenceDeposit: result.evidence_deposit, totalMaxTaxBps: result.total_max_tax_bps, totalLaunchedAsas: result.total_launched_asas, currentLpDepositApp: result.current_lp_deposit_app, previousLpDepositApp: result.previous_lp_deposit_app, } }, /** * Get the current value of the global_admin key in global state */ globalAdmin: async (): Promise => { return (await this.appClient.state.global.getValue("global_admin")) as string | undefined }, /** * Get the current value of the global_burn_wallet key in global state */ globalBurnWallet: async (): Promise => { return (await this.appClient.state.global.getValue("global_burn_wallet")) as string | undefined }, /** * Get the current value of the pool_app_id key in global state */ poolAppId: async (): Promise => { return (await this.appClient.state.global.getValue("pool_app_id")) as bigint | undefined }, /** * Get the current value of the protocol_fee_bps key in global state */ protocolFeeBps: async (): Promise => { return (await this.appClient.state.global.getValue("protocol_fee_bps")) as bigint | undefined }, /** * Get the current value of the evidence_time key in global state */ evidenceTime: async (): Promise => { return (await this.appClient.state.global.getValue("evidence_time")) as bigint | undefined }, /** * Get the current value of the evidence_deposit key in global state */ evidenceDeposit: async (): Promise => { return (await this.appClient.state.global.getValue("evidence_deposit")) as bigint | undefined }, /** * Get the current value of the total_max_tax_bps key in global state */ totalMaxTaxBps: async (): Promise => { return (await this.appClient.state.global.getValue("total_max_tax_bps")) as bigint | undefined }, /** * Get the current value of the total_launched_asas key in global state */ totalLaunchedAsas: async (): Promise => { return (await this.appClient.state.global.getValue("total_launched_asas")) as bigint | undefined }, /** * Get the current value of the current_lp_deposit_app key in global state */ currentLpDepositApp: async (): Promise => { return (await this.appClient.state.global.getValue("current_lp_deposit_app")) as bigint | undefined }, /** * Get the current value of the previous_lp_deposit_app key in global state */ previousLpDepositApp: async (): Promise => { return (await this.appClient.state.global.getValue("previous_lp_deposit_app")) as bigint | undefined }, }, /** * Methods to access box state for the current FirstStage app */ box: { /** * Get all current keyed values from box state */ getAll: async (): Promise>> => { const result = await this.appClient.state.box.getAll() return { } }, /** * Get values from the registered_asset map in box state */ registeredAsset: { /** * Get all current values of the registered_asset map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("registered_asset")) as Map }, /** * Get a current value of the registered_asset map by key from box state */ value: async (key: bigint | number): Promise => { return await this.appClient.state.box.getMapValue("registered_asset", key) as AssetInformation | undefined }, }, /** * Get values from the exempted_wallet map in box state */ exemptedWallet: { /** * Get all current values of the exempted_wallet map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("exempted_wallet")) as Map }, /** * Get a current value of the exempted_wallet map by key from box state */ value: async (key: string): Promise => { return await this.appClient.state.box.getMapValue("exempted_wallet", key) as ExemptWallet | undefined }, }, /** * Get values from the exempted_wallet_rekeyed map in box state */ exemptedWalletRekeyed: { /** * Get all current values of the exempted_wallet_rekeyed map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("exempted_wallet_rekeyed")) as Map }, /** * Get a current value of the exempted_wallet_rekeyed map by key from box state */ value: async (key: string): Promise => { return await this.appClient.state.box.getMapValue("exempted_wallet_rekeyed", key) as ExemptWallet | undefined }, }, /** * Get values from the exempted_app_deployer map in box state */ exemptedAppDeployer: { /** * Get all current values of the exempted_app_deployer map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("exempted_app_deployer")) as Map }, /** * Get a current value of the exempted_app_deployer map by key from box state */ value: async (key: string): Promise => { return await this.appClient.state.box.getMapValue("exempted_app_deployer", key) as ExemptWallet | undefined }, }, /** * Get values from the exempted_app_id map in box state */ exemptedAppId: { /** * Get all current values of the exempted_app_id map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("exempted_app_id")) as Map }, /** * Get a current value of the exempted_app_id map by key from box state */ value: async (key: bigint | number): Promise => { return await this.appClient.state.box.getMapValue("exempted_app_id", key) as ExemptApp | undefined }, }, /** * Get values from the exempted_app_approval map in box state */ exemptedAppApproval: { /** * Get all current values of the exempted_app_approval map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("exempted_app_approval")) as Map }, /** * Get a current value of the exempted_app_approval map by key from box state */ value: async (key: Uint8Array | string): Promise => { return await this.appClient.state.box.getMapValue("exempted_app_approval", key) as ExemptApp | undefined }, }, /** * Get values from the user_asset_info map in box state */ userAssetInfo: { /** * Get all current values of the user_asset_info map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("user_asset_info")) as Map }, /** * Get a current value of the user_asset_info map by key from box state */ value: async (key: Uint8Array | string): Promise => { return await this.appClient.state.box.getMapValue("user_asset_info", key) as UserAssetInfo | undefined }, }, /** * Get values from the potential_exempt_app map in box state */ potentialExemptApp: { /** * Get all current values of the potential_exempt_app map in box state */ getMap: async (): Promise> => { return (await this.appClient.state.box.getMap("potential_exempt_app")) as Map }, /** * Get a current value of the potential_exempt_app map by key from box state */ value: async (key: string): Promise => { return await this.appClient.state.box.getMapValue("potential_exempt_app", key) as PotentialApp | undefined }, }, }, } public newGroup(): FirstStageComposer { const client = this const composer = this.algorand.newGroup() let promiseChain:Promise = Promise.resolve() const resultMappers: Array any)> = [] return { /** * Add a set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void method call against the FirstStage contract */ setGlobalState(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.setGlobalState(params))) resultMappers.push(undefined) return this }, /** * Add a exempt_wallet(uint64,account,uint64,string,pay)void method call against the FirstStage contract */ exemptWallet(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.exemptWallet(params))) resultMappers.push(undefined) return this }, /** * Add a unfreeze_exempt_wallet(account,asset)void method call against the FirstStage contract */ unfreezeExemptWallet(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.unfreezeExemptWallet(params))) resultMappers.push(undefined) return this }, /** * Add a add_exempt_app(uint64,uint64,uint64,string,pay)void method call against the FirstStage contract */ addExemptApp(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.addExemptApp(params))) resultMappers.push(undefined) return this }, /** * Add a remove_exempt_wallet(uint64,account)void method call against the FirstStage contract */ removeExemptWallet(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.removeExemptWallet(params))) resultMappers.push(undefined) return this }, /** * Add a remove_exempt_app(uint64,uint64)void method call against the FirstStage contract */ removeExemptApp(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.removeExemptApp(params))) resultMappers.push(undefined) return this }, /** * Add a global_admin_reset(account)void method call against the FirstStage contract */ globalAdminReset(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.globalAdminReset(params))) resultMappers.push(undefined) return this }, /** * Add a project_admin_reset(account,asset)void method call against the FirstStage contract */ projectAdminReset(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.projectAdminReset(params))) resultMappers.push(undefined) return this }, /** * Add a register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void method call against the FirstStage contract */ registerAsa(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.registerAsa(params))) resultMappers.push(undefined) return this }, /** * Add a reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void method call against the FirstStage contract */ reconfigureAsset(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.reconfigureAsset(params))) resultMappers.push(undefined) return this }, /** * Add a switch_tax_mode(asset,uint64,account)void method call against the FirstStage contract */ switchTaxMode(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.switchTaxMode(params))) resultMappers.push(undefined) return this }, /** * Add a freeze(asset,account,pay)void method call against the FirstStage contract */ freeze(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.freeze(params))) resultMappers.push(undefined) return this }, /** * Add a general_operations_top(uint64,asset,uint64)void method call against the FirstStage contract */ generalOperationsTop(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.generalOperationsTop(params))) resultMappers.push(undefined) return this }, /** * Add a general_operations_bottom(uint64,asset,axfer,account)void method call against the FirstStage contract */ generalOperationsBottom(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.generalOperationsBottom(params))) resultMappers.push(undefined) return this }, /** * Add a send_to_frozen_top(uint64,asset,uint64,account,uint64)void method call against the FirstStage contract */ sendToFrozenTop(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.sendToFrozenTop(params))) resultMappers.push(undefined) return this }, /** * Add a send_to_frozen_bottom(uint64,asset,axfer,account,account)void method call against the FirstStage contract */ sendToFrozenBottom(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.sendToFrozenBottom(params))) resultMappers.push(undefined) return this }, /** * Add a whitelisted_app_top(uint64,asset,uint64)void method call against the FirstStage contract */ whitelistedAppTop(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.whitelistedAppTop(params))) resultMappers.push(undefined) return this }, /** * Add a whitelisted_app_bottom(uint64,asset)void method call against the FirstStage contract */ whitelistedAppBottom(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.whitelistedAppBottom(params))) resultMappers.push(undefined) return this }, /** * Add a liquidity_top(uint64,asset,asset,uint64,uint64)void method call against the FirstStage contract */ liquidityTop(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.liquidityTop(params))) resultMappers.push(undefined) return this }, /** * Add a liquidity_bottom(uint64,asset)void method call against the FirstStage contract */ liquidityBottom(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.liquidityBottom(params))) resultMappers.push(undefined) return this }, /** * Add a add_algo_rewards(asset,pay)void method call against the FirstStage contract */ addAlgoRewards(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.addAlgoRewards(params))) resultMappers.push(undefined) return this }, /** * Add a add_asa_rewards(asset,uint64,axfer)void method call against the FirstStage contract */ addAsaRewards(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.addAsaRewards(params))) resultMappers.push(undefined) return this }, /** * Add a exempt_app_approval(uint64,asset,string)void method call against the FirstStage contract */ exemptAppApproval(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.exemptAppApproval(params))) resultMappers.push(undefined) return this }, /** * Add a exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void method call against the FirstStage contract */ exemptOrWhitelistApp(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.exemptOrWhitelistApp(params))) resultMappers.push(undefined) return this }, /** * Add a claim_reflections(asset)void method call against the FirstStage contract */ claimReflections(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.claimReflections(params))) resultMappers.push(undefined) return this }, /** * Add a claim_freeze_rewards(asset)void method call against the FirstStage contract */ claimFreezeRewards(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.claimFreezeRewards(params))) resultMappers.push(undefined) return this }, /** * Add a add_pending_lp(asset)void method call against the FirstStage contract */ addPendingLp(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.addPendingLp(params))) resultMappers.push(undefined) return this }, /** * Add a check_is_address_exempt(account,asset)bool method call against the FirstStage contract */ checkIsAddressExempt(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.checkIsAddressExempt(params))) resultMappers.push((v) => client.decodeReturnValue('check_is_address_exempt(account,asset)bool', v)) return this }, /** * Add a check_is_address_maybe_exempt_app(account,asset)bool method call against the FirstStage contract */ checkIsAddressMaybeExemptApp(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.checkIsAddressMaybeExemptApp(params))) resultMappers.push((v) => client.decodeReturnValue('check_is_address_maybe_exempt_app(account,asset)bool', v)) return this }, /** * Add a check_app_status(uint64)(bool,bool) method call against the FirstStage contract */ checkAppStatus(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.checkAppStatus(params))) resultMappers.push((v) => client.decodeReturnValue('check_app_status(uint64)(bool,bool)', v)) return this }, /** * Add a check_lp_deposit_bps(asset)uint64 method call against the FirstStage contract */ checkLpDepositBps(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.checkLpDepositBps(params))) resultMappers.push((v) => client.decodeReturnValue('check_lp_deposit_bps(asset)uint64', v)) return this }, /** * Add a increase_budget()void method call against the FirstStage contract */ increaseBudget(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.increaseBudget(params))) resultMappers.push(undefined) return this }, /** * Add a get_reflection_preview(asset,account)(uint64,uint64) method call against the FirstStage contract */ getReflectionPreview(params: CallParams & {onComplete?: OnApplicationComplete.NoOpOC}) { promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getReflectionPreview(params))) resultMappers.push((v) => client.decodeReturnValue('get_reflection_preview(asset,account)(uint64,uint64)', v)) return this }, /** * Add a clear state call to the FirstStage contract */ clearState(params: AppClientBareCallParams) { promiseChain = promiseChain.then(() => composer.addAppCall(client.params.clearState(params))) return this }, addTransaction(txn: Transaction, signer?: TransactionSigner) { promiseChain = promiseChain.then(() => composer.addTransaction(txn, signer)) return this }, async composer() { await promiseChain return composer }, async simulate(options?: SimulateOptions) { await promiseChain const result = await (!options ? composer.simulate() : composer.simulate(options)) return { ...result, returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue) } }, async send(params?: SendParams) { await promiseChain const result = await composer.send(params) return { ...result, returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue) } } } as unknown as FirstStageComposer } } export type FirstStageComposer = { /** * Calls the set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ setGlobalState(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['set_global_state(uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] | undefined]> /** * Calls the exempt_wallet(uint64,account,uint64,string,pay)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ exemptWallet(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['exempt_wallet(uint64,account,uint64,string,pay)void'] | undefined]> /** * Calls the unfreeze_exempt_wallet(account,asset)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ unfreezeExemptWallet(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['unfreeze_exempt_wallet(account,asset)void'] | undefined]> /** * Calls the add_exempt_app(uint64,uint64,uint64,string,pay)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ addExemptApp(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['add_exempt_app(uint64,uint64,uint64,string,pay)void'] | undefined]> /** * Calls the remove_exempt_wallet(uint64,account)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ removeExemptWallet(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['remove_exempt_wallet(uint64,account)void'] | undefined]> /** * Calls the remove_exempt_app(uint64,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ removeExemptApp(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['remove_exempt_app(uint64,uint64)void'] | undefined]> /** * Calls the global_admin_reset(account)void ABI method. * * Allows the contract creator to reset the global admin account. Args: global_admin (Account): sets the administrator wallet for this contract. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ globalAdminReset(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['global_admin_reset(account)void'] | undefined]> /** * Calls the project_admin_reset(account,asset)void ABI method. * * Allows the asset admin to reset a new admin account. Args: project_admin (Account): sets the administrator wallet for this asset. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ projectAdminReset(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['project_admin_reset(account,asset)void'] | undefined]> /** * Calls the register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ registerAsa(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['register_asa(asset,pay,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void'] | undefined]> /** * Calls the reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ reconfigureAsset(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['reconfigure_asset(asset,account,uint64,uint64,uint64,uint64,account,uint64,uint64,uint64,uint64)void'] | undefined]> /** * Calls the switch_tax_mode(asset,uint64,account)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ switchTaxMode(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['switch_tax_mode(asset,uint64,account)void'] | undefined]> /** * Calls the freeze(asset,account,pay)void ABI method. * * A method that is used to refreeze addresses. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ freeze(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['freeze(asset,account,pay)void'] | undefined]> /** * Calls the general_operations_top(uint64,asset,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ generalOperationsTop(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['general_operations_top(uint64,asset,uint64)void'] | undefined]> /** * Calls the general_operations_bottom(uint64,asset,axfer,account)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ generalOperationsBottom(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['general_operations_bottom(uint64,asset,axfer,account)void'] | undefined]> /** * Calls the send_to_frozen_top(uint64,asset,uint64,account,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ sendToFrozenTop(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['send_to_frozen_top(uint64,asset,uint64,account,uint64)void'] | undefined]> /** * Calls the send_to_frozen_bottom(uint64,asset,axfer,account,account)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ sendToFrozenBottom(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['send_to_frozen_bottom(uint64,asset,axfer,account,account)void'] | undefined]> /** * Calls the whitelisted_app_top(uint64,asset,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ whitelistedAppTop(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['whitelisted_app_top(uint64,asset,uint64)void'] | undefined]> /** * Calls the whitelisted_app_bottom(uint64,asset)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ whitelistedAppBottom(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['whitelisted_app_bottom(uint64,asset)void'] | undefined]> /** * Calls the liquidity_top(uint64,asset,asset,uint64,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ liquidityTop(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['liquidity_top(uint64,asset,asset,uint64,uint64)void'] | undefined]> /** * Calls the liquidity_bottom(uint64,asset)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ liquidityBottom(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['liquidity_bottom(uint64,asset)void'] | undefined]> /** * Calls the add_algo_rewards(asset,pay)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ addAlgoRewards(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['add_algo_rewards(asset,pay)void'] | undefined]> /** * Calls the add_asa_rewards(asset,uint64,axfer)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ addAsaRewards(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['add_asa_rewards(asset,uint64,axfer)void'] | undefined]> /** * Calls the exempt_app_approval(uint64,asset,string)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ exemptAppApproval(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['exempt_app_approval(uint64,asset,string)void'] | undefined]> /** * Calls the exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ exemptOrWhitelistApp(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['exempt_or_whitelist_app(uint64,asset,string,pay,uint64)void'] | undefined]> /** * Calls the claim_reflections(asset)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ claimReflections(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['claim_reflections(asset)void'] | undefined]> /** * Calls the claim_freeze_rewards(asset)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ claimFreezeRewards(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['claim_freeze_rewards(asset)void'] | undefined]> /** * Calls the add_pending_lp(asset)void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ addPendingLp(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['add_pending_lp(asset)void'] | undefined]> /** * Calls the check_is_address_exempt(account,asset)bool ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ checkIsAddressExempt(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['check_is_address_exempt(account,asset)bool'] | undefined]> /** * Calls the check_is_address_maybe_exempt_app(account,asset)bool ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ checkIsAddressMaybeExemptApp(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['check_is_address_maybe_exempt_app(account,asset)bool'] | undefined]> /** * Calls the check_app_status(uint64)(bool,bool) ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ checkAppStatus(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['check_app_status(uint64)(bool,bool)'] | undefined]> /** * Calls the check_lp_deposit_bps(asset)uint64 ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ checkLpDepositBps(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['check_lp_deposit_bps(asset)uint64'] | undefined]> /** * Calls the increase_budget()void ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ increaseBudget(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['increase_budget()void'] | undefined]> /** * Calls the get_reflection_preview(asset,account)(uint64,uint64) ABI method. * * @param args The arguments for the contract call * @param params Any additional parameters for the call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ getReflectionPreview(params?: CallParams): FirstStageComposer<[...TReturns, FirstStageReturns['get_reflection_preview(asset,account)(uint64,uint64)'] | undefined]> /** * Makes a clear_state call to an existing instance of the FirstStage smart contract. * * @param args The arguments for the bare call * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions */ clearState(params?: AppClientBareCallParams): FirstStageComposer<[...TReturns, undefined]> /** * Adds a transaction to the composer * * @param txn A transaction to add to the transaction group * @param signer The optional signer to use when signing this transaction. */ addTransaction(txn: Transaction, signer?: TransactionSigner): FirstStageComposer /** * Returns the underlying AtomicTransactionComposer instance */ composer(): Promise /** * Simulates the transaction group and returns the result */ simulate(): Promise & { simulateResponse: modelsv2.SimulateResponse }> simulate(options: SkipSignaturesSimulateOptions): Promise & { simulateResponse: modelsv2.SimulateResponse }> simulate(options: RawSimulateOptions): Promise & { simulateResponse: modelsv2.SimulateResponse }> /** * Sends the transaction group to the network and returns the results */ send(params?: SendParams): Promise> } export type FirstStageComposerResults = Expand