Create Verifications
Last updated
Last updated
The primary way we recommend you to create verifications is with this method - read more here: https://docs.phi.box/explore-phi/phi-protocol/signature-verifier For cases where this doesn't apply, you can use the simple illustrative example below to create verifications for Creds. This won't be applicable for all Creds.
Let's say you are creating a Phi Cred for all users who have "Made 1 swap on Aerodrome on Base". For this you would require data for the verification logic of this Cred. This data could be provided in:
CSV Upload/File upload
Aerodrome API
Basescan/Base API (super easy - recommended)
This example will walk through how you can use Basescan and the Base API to provide high quality verification data for the Cred. Our aim is to build this URL with the necessary information so that we can paste it in the "API Endpoint" field during the "Verification" step of Create Cred URL: https://phi-community-verifier.vercel.app/api/base/[contract]?methodId=xxx We need to find the Contract ID and the Method ID (shown in red) You can also have multiple methods in the URL for more complex verifications, for example: https://phi-community-verifier.vercel.app/api/base/[contract]?methodId=xxx&methodId=yyy&methodId=zzz
Find the contract ID for Aerodrome swaps. You can do this by looking through Basescan or by looking at your past transactions on your wallet. Select the transaction, then click on "View on block explorer" - this will get you all the data you require.
On the block explorer, look for the "To" section and you can then copy the Contract ID and paste it into the template URL we provided earlier. This is what your URL will look like for the Aerodrome example: https://phi-community-verifier.vercel.app/api/base/0x6Cb442acF35158D5eDa88fe602221b67B400Be3E?methodId=xxx
We still have to find the MethodID
On the same Basescan page, scroll down to find the "More Details" section. Click "Click to show more"
Once you have expanded this section, scroll down to the "Input Data" section to find the "MethodID"
Copy and paste the MethodID into your URL. This is what your URL will look like for the Aerodrome example: https://phi-community-verifier.vercel.app/api/base/0x6Cb442acF35158D5eDa88fe602221b67B400Be3E?methodId=0x24856bc3
Now you can paste the completed verification URL into the "API Endpoint" field. Click "Check" to make sure the Status and Response Schema are working as expected. Congratulations on creating verification logic for your Cred 🎉
API Reliability: For API verifications, ensure your endpoint is reliable and follows the required response format.