Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
return operator address in contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
darcys22 authored and Doy-lee committed Oct 24, 2024
1 parent 9b80567 commit f2193d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contracts/service_node_contribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ def get_service_node_params(self):
'fee': params[3]
}

def get_operator(self):
"""
returns the service node operator
"""
contributor_addresses = self.get_contributor_addresses()
return contributor_addresses[0]


def get_contributor_addresses(self):
"""
Get the list of contributor addresses.
Expand Down
2 changes: 2 additions & 0 deletions sent.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ def fetch_contract_statuses(signum):
#contributor_addresses = contract_interface.get_contributor_addresses()
total_contributions = contract_interface.total_contribution()
contributions = contract_interface.get_individual_contributions()
operator = contract_interface.get_operator()

app.contracts[contract_address] = {
'contract_state': 'finalized' if is_finalized else 'cancelled' if is_cancelled else 'awaiting_contributors',
Expand All @@ -428,6 +429,7 @@ def fetch_contract_statuses(signum):
'contributions': [
{"address": addr, "amount": amt} for addr, amt in contributions.items()
],
'operator': operator,
'total_contributions': total_contributions,
}

Expand Down

0 comments on commit f2193d6

Please sign in to comment.