Skip to content

Commit

Permalink
Fix linter in config controller
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Dec 23, 2024
1 parent 7536fc5 commit 60ea73e
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions skale/contracts/config_controller/config_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,28 @@ def is_address_whitelisted(self, address: ChecksumAddress) -> bool:
return bool(self.contract.functions.isAddressWhitelisted(address).call())

def is_deployment_allowed(
self,
transaction_origin: ChecksumAddress,
deployer: ChecksumAddress
) -> bool:
return bool(self.contract.functions.isDeploymentAllowed(transaction_origin, deployer).call())
self, transaction_origin: ChecksumAddress, deployer: ChecksumAddress
) -> bool:
return bool(
self.contract.functions.isDeploymentAllowed(
transaction_origin, deployer
).call()
)

@transaction_method
def grant_role(
self,
role: bytes,
address: ChecksumAddress
) -> TxRes:
def grant_role(self, role: bytes, address: ChecksumAddress) -> TxRes:
return self.contract.functions.grantRole(role, address)

@transaction_method
def add_allowed_origin_role_admin(
self,
role: bytes,
address: ChecksumAddress
) -> TxRes:
self, role: bytes, address: ChecksumAddress
) -> TxRes:
return self.contract.functions.addAllowedOriginRoleAdmin(role, address)

@transaction_method
def allow_origin(
self,
transaction_origin: ChecksumAddress,
deployer: ChecksumAddress
) -> TxRes:
self, transaction_origin: ChecksumAddress, deployer: ChecksumAddress
) -> TxRes:
return self.contract.functions.allowOrigin(transaction_origin, deployer)

@transaction_method
Expand All @@ -103,18 +97,14 @@ def renounce_role(self, role: bytes, address: ChecksumAddress) -> TxRes:

@transaction_method
def remove_allowed_origin_role_admin(
self,
role: bytes,
address: ChecksumAddress
) -> TxRes:
self, role: bytes, address: ChecksumAddress
) -> TxRes:
return self.contract.functions.removeAllowedOriginRoleAdmin(role, address)

@transaction_method
def forbid_origin(
self,
transaction_origin: ChecksumAddress,
deployer: ChecksumAddress
) -> TxRes:
self, transaction_origin: ChecksumAddress, deployer: ChecksumAddress
) -> TxRes:
return self.contract.functions.forbidOrigin(transaction_origin, deployer)

@transaction_method
Expand Down

0 comments on commit 60ea73e

Please sign in to comment.