Merge pull request #3589 from derekpierre/fix-regex-warning

Fix BigInt Regex Warning
v7.5.x
Derek Pierre 2025-04-04 16:05:15 -04:00 committed by GitHub
commit c392457f18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View File

View File

@ -229,7 +229,7 @@ def check_and_convert_big_int_string_to_int(value: str) -> Union[str, int]:
"""
Check if a string is a big int string and convert it to an integer, otherwise return the string.
"""
if re.fullmatch("^-?\d+n$", value):
if re.fullmatch(r"^-?\d+n$", value):
try:
result = int(value[:-1])
return result

View File

@ -247,9 +247,13 @@ def fee_model(nucypher_dependency, deployer_account, coordinator, ritual_token):
ritual_token.address,
FEE_RATE,
)
treasury_role = coordinator.TREASURY_ROLE()
coordinator.grantRole(
treasury_role, deployer_account.address, sender=deployer_account
coordinator.TREASURY_ROLE(), deployer_account.address, sender=deployer_account
)
coordinator.grantRole(
coordinator.FEE_MODEL_MANAGER_ROLE(),
deployer_account.address,
sender=deployer_account,
)
coordinator.approveFeeModel(contract.address, sender=deployer_account)