diff --git a/pyteal/ast/app.py b/pyteal/ast/app.py index dc699cedf..b71512c68 100644 --- a/pyteal/ast/app.py +++ b/pyteal/ast/app.py @@ -91,9 +91,9 @@ def optedIn(cls, account: Expr, app: Expr) -> "App": account: An index into Txn.Accounts that corresponds to the account to check, must be evaluated to uint64 (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender, must be evaluated to bytes). - app: An index into Txn.ForeignApps that corresponds to the application to read from, + app: An index into Txn.applications that corresponds to the application to read from, must be evaluated to uint64 (or, since v4, an application id that appears in - Txn.ForeignApps or is the CurrentApplicationID, must be evaluated to int). + Txn.applications or is the CurrentApplicationID, must be evaluated to int). """ require_type(account, TealType.anytype) require_type(app, TealType.uint64) @@ -121,9 +121,9 @@ def localGetEx(cls, account: Expr, app: Expr, key: Expr) -> MaybeValue: account: An index into Txn.Accounts that corresponds to the account to check, must be evaluated to uint64 (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender, must be evaluated to bytes). - app: An index into Txn.ForeignApps that corresponds to the application to read from, + app: An index into Txn.applications that corresponds to the application to read from, must be evaluated to uint64 (or, since v4, an application id that appears in - Txn.ForeignApps or is the CurrentApplicationID, must be evaluated to int). + Txn.applications or is the CurrentApplicationID, must be evaluated to int). key: The key to read from the account's local state. Must evaluate to bytes. """ require_type(account, TealType.anytype) @@ -148,9 +148,9 @@ def globalGetEx(cls, app: Expr, key: Expr) -> MaybeValue: """Read from the global state of an application. Args: - app: An index into Txn.ForeignApps that corresponds to the application to read from, + app: An index into Txn.applications that corresponds to the application to read from, must be evaluated to uint64 (or, since v4, an application id that appears in - Txn.ForeignApps or is the CurrentApplicationID, must be evaluated to uint64). + Txn.applications or is the CurrentApplicationID, must be evaluated to uint64). key: The key to read from the global application state. Must evaluate to bytes. """ require_type(app, TealType.uint64) @@ -221,7 +221,7 @@ def approvalProgram(cls, app: Expr) -> MaybeValue: """Get the bytecode of Approval Program for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -237,7 +237,7 @@ def clearStateProgram(cls, app: Expr) -> MaybeValue: """Get the bytecode of Clear State Program for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -253,7 +253,7 @@ def globalNumUint(cls, app: Expr) -> MaybeValue: """Get the number of uint64 values allowed in Global State for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -269,7 +269,7 @@ def globalNumByteSlice(cls, app: Expr) -> MaybeValue: """Get the number of byte array values allowed in Global State for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -285,7 +285,7 @@ def localNumUint(cls, app: Expr) -> MaybeValue: """Get the number of uint64 values allowed in Local State for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -301,7 +301,7 @@ def localNumByteSlice(cls, app: Expr) -> MaybeValue: """Get the number of byte array values allowed in Local State for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -317,7 +317,7 @@ def extraProgramPages(cls, app: Expr) -> MaybeValue: """Get the number of Extra Program Pages of code space for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -333,7 +333,7 @@ def creator(cls, app: Expr) -> MaybeValue: """Get the creator address for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) @@ -346,7 +346,7 @@ def address(cls, app: Expr) -> MaybeValue: """Get the escrow address for the application. Args: - app: An index into Txn.ForeignApps that correspond to the application to check. + app: An index into Txn.applications that correspond to the application to check. Must evaluate to uint64. """ require_type(app, TealType.uint64) diff --git a/pyteal/ast/asset.py b/pyteal/ast/asset.py index a39879be2..5e15d0361 100644 --- a/pyteal/ast/asset.py +++ b/pyteal/ast/asset.py @@ -14,7 +14,7 @@ def balance(cls, account: Expr, asset: Expr) -> MaybeValue: must be evaluated to uint64 (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender, must be evaluated to bytes). asset: The ID of the asset to get, must be evaluated to uint64 (or, since v4, - a Txn.ForeignAssets offset). + a Txn.assets offset). """ require_type(account, TealType.anytype) require_type(asset, TealType.uint64) @@ -36,7 +36,7 @@ def frozen(cls, account: Expr, asset: Expr) -> MaybeValue: must be evaluated to uint64 (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender, must be evaluated to bytes). asset: The ID of the asset to get, must be evaluated to uint64 (or, since v4, - a Txn.ForeignAssets offset). + a Txn.assets offset). """ require_type(account, TealType.anytype) require_type(asset, TealType.uint64) @@ -57,9 +57,9 @@ def total(cls, asset: Expr) -> MaybeValue: """Get the total number of units of an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -74,9 +74,9 @@ def decimals(cls, asset: Expr) -> MaybeValue: """Get the number of decimals for an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -91,9 +91,9 @@ def defaultFrozen(cls, asset: Expr) -> MaybeValue: """Check if an asset is frozen by default. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -108,9 +108,9 @@ def unitName(cls, asset: Expr) -> MaybeValue: """Get the unit name of an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -125,9 +125,9 @@ def name(cls, asset: Expr) -> MaybeValue: """Get the name of an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -142,9 +142,9 @@ def url(cls, asset: Expr) -> MaybeValue: """Get the URL of an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -161,9 +161,9 @@ def metadataHash(cls, asset: Expr) -> MaybeValue: If set, this will be 32 bytes long. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -178,9 +178,9 @@ def manager(cls, asset: Expr) -> MaybeValue: """Get the manager address for an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -195,9 +195,9 @@ def reserve(cls, asset: Expr) -> MaybeValue: """Get the reserve address for an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -212,9 +212,9 @@ def freeze(cls, asset: Expr) -> MaybeValue: """Get the freeze address for an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -229,9 +229,9 @@ def clawback(cls, asset: Expr) -> MaybeValue: """Get the clawback address for an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check, + asset: An index into Txn.assets that corresponds to the asset to check, must be evaluated to uint64 (or since v4, an asset ID that appears in - Txn.ForeignAssets). + Txn.assets). """ require_type(asset, TealType.uint64) return MaybeValue( @@ -246,7 +246,7 @@ def creator(cls, asset: Expr) -> MaybeValue: """Get the creator address for an asset. Args: - asset: An index into Txn.ForeignAssets that corresponds to the asset to check. Must + asset: An index into Txn.assets that corresponds to the asset to check. Must evaluate to uint64. """ require_type(asset, TealType.uint64)