stakersunion / website

Stakers Union Member Area
https://members-beta.vercel.app
0 stars 1 forks source link

Automate eligibility check #5

Closed valefar-on-discord closed 2 months ago

valefar-on-discord commented 2 months ago

Currently when a user goes through the application flow, they provide a url to an etherscan signature and it is then verified manually.

This can be automated in a similar approach to this python example:

from web3.auto import w3
from eth_account.messages import encode_defunct

sig = "0xsignature"
message = encode_defunct(text="Oath")
address = (w3.eth.account.recover_message(message, signature=sig)).lower()

verify_address_exists_in_list(address)
valefar-on-discord commented 2 months ago

The user provides the etherscan url here

Which then calls /admin/user/verification

API logic

thame commented 2 months ago

2648b2286bdc37211fa27276d932c9291e7375ff