Skip to content

Commit

Permalink
feat: include num_log, log, create_app and created_asset prop…
Browse files Browse the repository at this point in the history
…erties for group transactions
  • Loading branch information
daniel-makerx authored and achidlow committed Aug 16, 2024
1 parent a5c57ef commit 5359c4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
15 changes: 15 additions & 0 deletions stubs/algopy-stubs/_transaction.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ class _AssetConfigProtocol(typing.Protocol):
def clawback(self) -> Account:
"""32 byte address"""

@property
def created_asset(self) -> Asset:
"""Asset ID allocated by the creation of an ASA"""

class _AssetTransferProtocol(typing.Protocol):
@property
def xfer_asset(self) -> Asset:
Expand Down Expand Up @@ -234,6 +238,17 @@ class _ApplicationProtocol(typing.Protocol):
def last_log(self) -> Bytes:
"""The last message emitted. Empty bytes if none were emitted. Application mode only"""

def logs(self, index: UInt64 | int) -> Bytes:
"""Log messages emitted by an application call"""

@property
def num_logs(self) -> UInt64:
"""Number of logs"""

@property
def created_app(self) -> Application:
"""ApplicationID allocated by the creation of an application"""

@property
def num_approval_program_pages(self) -> UInt64:
"""Number of Approval Program pages"""
Expand Down
14 changes: 0 additions & 14 deletions stubs/algopy-stubs/itxn.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ class KeyRegistrationInnerTransaction(
class AssetConfigInnerTransaction(_AssetConfigProtocol, _TransactionBaseProtocol, typing.Protocol):
"""Asset Config inner transaction"""

@property
def created_asset(self) -> Asset: ...

class AssetTransferInnerTransaction(
_AssetTransferProtocol, _TransactionBaseProtocol, typing.Protocol
):
Expand All @@ -47,17 +44,6 @@ class ApplicationCallInnerTransaction(
):
"""Application Call inner transaction"""

def logs(self, index: UInt64 | int) -> Bytes:
"""Log messages emitted by an application call"""

@property
def num_logs(self) -> UInt64:
"""Number of logs"""

@property
def created_app(self) -> Application:
"""ApplicationID allocated by the creation of an application"""

class InnerTransactionResult(
PaymentInnerTransaction,
KeyRegistrationInnerTransaction,
Expand Down

0 comments on commit 5359c4d

Please sign in to comment.