escrow_utils
Utility class for escrow-related operations.
Code Example
Module
class human_protocol_sdk.escrow.escrow_utils.EscrowData(chain_id, id, address, amount_paid, balance, count, factory_address, launcher, status, token, total_funded_amount, created_at, final_results_url=None, intermediate_results_url=None, manifest_hash=None, manifest_url=None, recording_oracle=None, reputation_oracle=None, exchange_oracle=None)
Bases: object
__init__(chain_id, id, address, amount_paid, balance, count, factory_address, launcher, status, token, total_funded_amount, created_at, final_results_url=None, intermediate_results_url=None, manifest_hash=None, manifest_url=None, recording_oracle=None, reputation_oracle=None, exchange_oracle=None)
Initializes an EscrowData instance.
Parameters:
id (
str
) – Identifieraddress (
str
) – Addressamount_paid (
int
) – Amount paidbalance (
int
) – Balancecount (
int
) – Countfactory_address (
str
) – Factory addresslauncher (
str
) – Launcherstatus (
str
) – Statustoken (
str
) – Tokentotal_funded_amount (
int
) – Total funded amountcreated_at (
datetime
) – Creation datefinal_results_url (
Optional
[str
]) – URL for final results.intermediate_results_url (
Optional
[str
]) – URL for intermediate results.manifest_hash (
Optional
[str
]) – Manifest hash.manifest_url (
Optional
[str
]) – Manifest URL.recording_oracle (
Optional
[str
]) – Recording Oracle address.reputation_oracle (
Optional
[str
]) – Reputation Oracle address.exchange_oracle (
Optional
[str
]) – Exchange Oracle address.
class human_protocol_sdk.escrow.escrow_utils.EscrowUtils
Bases: object
A utility class that provides additional escrow-related functionalities.
static get_escrow(chain_id, escrow_address)
Returns the escrow for a given address.
Parameters:
escrow_address (
str
) – Address of the escrow
Returns: Escrow data
Example:
static get_escrows(filter)
Get an array of escrow addresses based on the specified filter parameters.
Returns: List of escrows
Example:
static get_payouts(filter)
Fetch payouts from the subgraph based on the provided filter.
Return List[Payout]: List of payouts matching the query parameters.
static get_status_events(filter)
Retrieve status events for specified networks and statuses within a date range.
Return List[StatusEvent]: List of status events matching the query parameters.
class human_protocol_sdk.escrow.escrow_utils.Payout(id, escrow_address, recipient, amount, created_at)
Bases: object
Initializes a Payout instance.
Parameters:
id (
str
) – The id of the payout.chain_id – The chain identifier where the payout occurred.
escrow_address (
str
) – The address of the escrow that executed the payout.recipient (
str
) – The address of the recipient.amount (
int
) – The amount of the payout.created_at (
int
) – The time of creation of the payout.
__init__(id, escrow_address, recipient, amount, created_at)
class human_protocol_sdk.escrow.escrow_utils.StatusEvent(timestamp, status, chain_id, escrow_address)
Bases: object
Initializes a StatusEvent instance.
Parameters:
timestamp (
int
) – The timestamp of the event.status (
str
) – The status of the escrow.escrow_address (
str
) – The address of the escrow.
__init__(timestamp, status, chain_id, escrow_address)
Last updated