User interface for Upala protocol. Multipassport shows all available scores and delegates of a user. Provides explosion functionality.
- Uses deployments for contracts ABIs and addresses.
- Queries contract data from Upala subgraph.
- Queries individual scores and their proofs from DB.
- Manages user on-chain through Upala protocol.
- Explodes user through Upala groups.
- Uses metadata scheme from Upala groups.
- connect to Ethereum wallet (e.g. Metamask) and retrieve user address.
- querry Graph to get user id (Graph: "Get user UpalaID by address")
- if no id, switch to "create id" screen
- if there's an id, querry delegates (Graph: "Get owner and delegates for the Upala ID")
- get all scores for the user from DB (check here)
- get pool balances
- get base scores
- querry graph for group metadata (Graph "Get group metadata by address") and extract title for each group. See metaData structure in the pool contract.
- if user clicks "more..." load next 10 best scores (11..20, 21..30, etc.)
- check validity of the provided address
- call approveDelegate(address delegate) with the provided address as delegate
- show error if there's one from the contract.
- call removeDelegate(address delegate) with the provided address as delegate
- show error if there's one from the contract.
- call setIdentityOwner(address newIdentityOwner) with the provided address as newIdentityOwner
- show error if there's one from the contract.
- call newIdentity(address newIdentityOwner) function of Upala protocol. Use user address as newIdentityOwner
- show error if there's one from the contract.
- extract url from group metadata (load metadata if not yet loaded - see Populating dashboard section). If there's one show "Visit" button.
- extract joinLink from group metadata (load metadata if not yet loaded - see Populating dashboard section). If there's one show "Join" button.
- querry score if needed (see Populating dashboard section)
- querry Graph for score if needed (see Populating dashboard section)
- querry proof from db (see GET request here)
(after all precautions of the interface were passed - see figma prototype for the workflow)
- querry graph for the poolFactoryAddress (Graph: "Get poolFactoryAddress by group address")
- select ABI depending on poolFactoryAddress (from deployments)
- call attack function with proper arguments. E.g. attack(address identityID, uint8 score, bytes calldata signature) for SignedScoresPool