You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
356 B
Python
13 lines
356 B
Python
from eth_account.messages import encode_defunct
|
|
|
|
from suchwowx.factory import w3
|
|
|
|
|
|
def verify_signature(message, signature, public_address):
|
|
msg = encode_defunct(text=message)
|
|
recovered = w3.eth.account.recover_message(msg, signature=signature)
|
|
if recovered.lower() == public_address.lower():
|
|
return True
|
|
else:
|
|
return False
|