Update coordinator contract method name

pull/3588/head
Manuel Montenegro 2025-04-07 19:00:47 +02:00
parent 73674f1bd5
commit 2859ff2a16
No known key found for this signature in database
GPG Key ID: AB138CC82DC9FAD4
4 changed files with 5 additions and 7 deletions

View File

@ -258,7 +258,7 @@ class Operator(BaseActor):
def set_provider_public_key(self) -> Union[TxReceipt, None]:
# TODO: Here we're assuming there is one global key per node. See nucypher/#3167
node_global_ferveo_key_set = self.coordinator_agent.is_provider_public_key_set(
node_global_ferveo_key_set = self.coordinator_agent.is_provider_key_set(
self.staking_provider_address
)
if not node_global_ferveo_key_set:

View File

@ -748,8 +748,8 @@ class CoordinatorAgent(EthereumContractAgent):
return is_authorized
@contract_api(CONTRACT_CALL)
def is_provider_public_key_set(self, staking_provider: ChecksumAddress) -> bool:
result = self.contract.functions.isProviderPublicKeySet(staking_provider).call()
def is_provider_key_set(self, staking_provider: ChecksumAddress) -> bool:
result = self.contract.functions.isProviderKeySet(staking_provider).call()
return result
@contract_api(TRANSACTION)

View File

@ -104,9 +104,7 @@ class UrsulaConfiguration(CharacterConfiguration):
)
if staking_provider_address and staking_provider_address != NULL_ADDRESS:
if coordinator_agent.is_provider_public_key_set(
staking_provider_address
):
if coordinator_agent.is_provider_key_set(staking_provider_address):
message = (
f"Operator {self.operator_address} has already published a public key.\n"
f"It is not permitted to create a new node with this operator address."

View File

@ -210,7 +210,7 @@ class MockCoordinatorAgent(MockContractAgent):
# Read Calls - don't change state (only use copies of objects)
#
def is_provider_public_key_set(self, staking_provider: ChecksumAddress) -> bool:
def is_provider_key_set(self, staking_provider: ChecksumAddress) -> bool:
return staking_provider in self._participant_keys_history
def get_timeout(self) -> int: