Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions libsimba/simba.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ async def get_receipt(
self,
app_id: str,
contract_name: str,
receipt_hash: str,
transaction_hash: str,
login: Login = None,
config: ConnectionConfig = None,
) -> dict:
return await GetRequest(
endpoint=Path.CONTRACT_RECEIPT.format(app_id, contract_name, receipt_hash),
endpoint=Path.CONTRACT_RECEIPT.format(app_id, contract_name, transaction_hash),
login=login,
).get(config=config)

Expand Down Expand Up @@ -436,17 +436,14 @@ async def list_transactions_by_contract(
login=login,
).retrieve_iter(config=config)

async def get_events_by_contract(
async def admin_get_events(
self,
app_id: str,
contract_name: str,
event_name: str,
query_args: Optional[SearchFilter] = None,
login: Login = None,
config: ConnectionConfig = None,
) -> List[dict]:
return await SimbaRequest(
endpoint=Path.CONTRACT_EVENTS.format(app_id, contract_name, event_name),
endpoint=Path.ADMIN_EVENTS,
query_params=query_args,
login=login,
).retrieve(config=config)
Expand Down
6 changes: 3 additions & 3 deletions libsimba/simba_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def get_receipt(
self,
app_id: str,
contract_name: str,
receipt_hash: str,
transaction_hash: str,
login: Login = None,
config: ConnectionConfig = None,
):
Expand All @@ -867,7 +867,7 @@ def get_receipt(
:type app_id: str
:param contract_name: Contract API name
:type contract_name: str
:param receipt_hash: The hash of the receipt
:param transaction_hash: The hash of the transaction
:type receipt_hash: str
:param \**kwargs:
See below
Expand All @@ -878,7 +878,7 @@ def get_receipt(
:rtype: dict
"""
return GetRequest(
endpoint=Path.CONTRACT_RECEIPT.format(app_id, contract_name, receipt_hash),
endpoint=Path.CONTRACT_RECEIPT.format(app_id, contract_name, transaction_hash),
login=login,
).get_sync(config=config)

Expand Down
1 change: 1 addition & 0 deletions libsimba/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

class Path(str, Enum):
WHOAMI = "/user/whoami/"
ADMIN_EVENTS = "/admin/events/"
APPS = "/v2/apps/"
APP = "/v2/organisations/{}/applications/{}/"
APP_TXNS = "/v2/apps/{}/transactions/"
Expand Down