@@ -10,18 +10,18 @@ from human_protocol_sdk.operator import OperatorUtils, LeaderFilter
1010
1111print (
1212 OperatorUtils.get_leaders(
13- LeaderFilter(networks = [ChainId.POLYGON_MUMBAI ], role = " Job Launcher" )
13+ LeaderFilter(networks = [ChainId.POLYGON_AMOY ], role = " Job Launcher" )
1414 )
1515)
1616```
1717
1818## Module
1919
20- ### * class* human_protocol_sdk.operator.operator_utils.LeaderData(chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_launched, role=None, fee=None, public_key=None, webhook_url=None, url=None)
20+ ### * class* human_protocol_sdk.operator.operator_utils.LeaderData(chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_launched, role=None, fee=None, public_key=None, webhook_url=None, url=None, job_types=None )
2121
2222Bases: ` object `
2323
24- #### \_\_ init_ \_ (chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_launched, role=None, fee=None, public_key=None, webhook_url=None, url=None)
24+ #### \_\_ init_ \_ (chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_launched, role=None, fee=None, public_key=None, webhook_url=None, url=None, job_types=None )
2525
2626Initializes an LeaderData instance.
2727
@@ -43,6 +43,7 @@ Initializes an LeaderData instance.
4343 * ** public_key** (` Optional ` [ ` str ` ] ) – Public key
4444 * ** webhook_url** (` Optional ` [ ` str ` ] ) – Webhook url
4545 * ** url** (` Optional ` [ ` str ` ] ) – Url
46+ * ** job_types** (` Optional ` [ ` str ` ] ) – Job types
4647
4748### * class* human_protocol_sdk.operator.operator_utils.LeaderFilter(networks, role=None)
4849
@@ -58,11 +59,11 @@ Initializes a LeaderFilter instance.
5859 * ** networks** (` List ` [[ ` ChainId ` ] ( human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId )] ) – Networks to request data
5960 * ** role** (` Optional ` [ ` str ` ] ) – Leader role
6061
61- ### * class* human_protocol_sdk.operator.operator_utils.Operator(address, role)
62+ ### * class* human_protocol_sdk.operator.operator_utils.Operator(address, role, url='', job_types='' )
6263
6364Bases: ` object `
6465
65- #### \_\_ init_ \_ (address, role)
66+ #### \_\_ init_ \_ (address, role, url='', job_types='' )
6667
6768Initializes an Operator instance.
6869
@@ -93,7 +94,7 @@ Get the leader details.
9394 from human_protocol_sdk.operator import OperatorUtils
9495
9596 leader = OperatorUtils.get_leader(
96- ChainId.POLYGON_MUMBAI ,
97+ ChainId.POLYGON_AMOY ,
9798 ' 0x62dD51230A30401C455c8398d06F85e4EaB6309f'
9899 )
99100 ```
@@ -115,7 +116,7 @@ Get leaders data of the protocol
115116
116117 print (
117118 OperatorUtils.get_leaders(
118- LeaderFilter(networks = [ChainId.POLYGON_MUMBAI ])
119+ LeaderFilter(networks = [ChainId.POLYGON_AMOY ])
119120 )
120121 )
121122 ```
@@ -128,6 +129,8 @@ Get the reputation network operators of the specified address.
128129 * ** chain_id** ([ ` ChainId ` ] ( human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId ) ) – Network in which the reputation network exists
129130 * ** address** (` str ` ) – Address of the reputation oracle
130131 * ** role** (` Optional ` [ ` str ` ] ) – (Optional) Role of the operator
132+ * ** Parem job_types:**
133+ (Optional) Job types of the operator
131134* ** Return type:**
132135 ` List ` [[ ` Operator ` ] ( #human_protocol_sdk.operator.operator_utils.Operator )]
133136* ** Returns:**
@@ -138,7 +141,7 @@ Get the reputation network operators of the specified address.
138141 from human_protocol_sdk.operator import OperatorUtils
139142
140143 leader = OperatorUtils.get_reputation_network_operators(
141- ChainId.POLYGON_MUMBAI ,
144+ ChainId.POLYGON_AMOY ,
142145 ' 0x62dD51230A30401C455c8398d06F85e4EaB6309f'
143146 )
144147 ```
@@ -160,7 +163,7 @@ Get rewards of the given slasher
160163 from human_protocol_sdk.operator import OperatorUtils
161164
162165 rewards_info = OperatorUtils.get_rewards_info(
163- ChainId.POLYGON_MUMBAI ,
166+ ChainId.POLYGON_AMOY ,
164167 ' 0x62dD51230A30401C455c8398d06F85e4EaB6309f'
165168 )
166169 ```
0 commit comments