Skip to content

Commit 1f20552

Browse files
committed
Add block number parameter to get_name function in Account SC wrapper
1 parent fca2408 commit 1f20552

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sdk/contracts/AccountsWrapper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,18 @@ def generate_proof_of_key_possession(self, account: str, signer: str) -> SignedM
278278
signature = signer_acc.sign_message(message)
279279
return signature
280280

281-
def get_name(self, account: str) -> str:
281+
def get_name(self, account: str, block_number: int = None) -> str:
282282
"""
283283
Returns the set name for the account
284284
285285
Parameters:
286286
account: str
287287
Account address
288288
"""
289-
return self._contract.functions.getName(account).call()
289+
if block_number != None:
290+
return self._contract.functions.getName(account).call(block_number=block_number)
291+
else:
292+
return self._contract.functions.getName(account).call()
290293

291294
def get_data_encryption_key(self, account: str) -> str:
292295
"""

0 commit comments

Comments
 (0)